Skip to content

🎥 Make videos programmatically with React

Editor Starter: List of backend routes

Jonny Burger4531b09d8415
diff --git a/packages/docs/docs/editor-starter/backend-routes.mdx b/packages/docs/docs/editor-starter/backend-routes.mdx
new file mode 100644
index 0000000000..08b27f131e
--- /dev/null
+++ b/packages/docs/docs/editor-starter/backend-routes.mdx
@@ -0,0 +1,45 @@
+---
+image: /generated/articles-docs-editor-starter-backend-routes.png
+title: Backend routes
+sidebar_label: Backend routes
+id: backend-routes
+crumb: Editor Starter
+---
+
+Some backend endpoints must be implemented by for all features to work.
+The default implementation uses the React Router 7 framework.
+
+### `POST /api/captions`
+
+Used to generate captions for a video based on an audio file.
+
+- [Reference implementation](https://github.com/remotion-dev/editor-starter/blob/main/src/app/routes/api/captions.ts)
+- [See usages](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter%20%2Fapi%2Fcaptions&type=code)
+
+### `GET /api/font/:name`
+
+Returns the metadata for a specific font, such as available weights and styles and their corresponding Google Fonts URLs. This information is provided by the backend because the metadata of all default fonts would be more than 10MB.
+
+- [Reference implementation](https://github.com/remotion-dev/editor-starter/blob/main/src/app/routes/api/font.ts)
+- [See usages](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter%20%2Fapi%2Ffont&type=code)
+
+### `POST /api/upload`
+
+Needed to create a presigned URL for uploading a file to S3.
+
+- [Reference implementation](https://github.com/remotion-dev/editor-starter/blob/main/src/app/routes/api/upload.ts)
+- [See usages](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter%20%2Fapi%2Fupload&type=code)
+
+### `POST /api/render`
+
+Triggers a render on Remotion Lambda.
+
+- [Reference implementation](https://github.com/remotion-dev/editor-starter/blob/main/src/app/routes/api/render.ts)
+- [See usages](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter%20%2Fapi%2Frender&type=code)
+
+### `POST /api/progress`
+
+Gets the current progress of a render on Remotion Lambda.
+
+- [Reference implementation](https://github.com/remotion-dev/editor-starter/blob/main/src/app/routes/api/progress.ts)
+- [See usages](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter%20%2Fapi%2Fprogress&type=code)
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index a6a5d553cc..6b7aeaedca 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -1335,7 +1335,11 @@ const sidebars: SidebarsConfig = {
type: 'doc',
id: 'editor-starter/features',
},
- items: ['editor-starter/features', 'editor-starter/undo-redo'],
+ items: [
+ 'editor-starter/features',
+ 'editor-starter/undo-redo',
+ 'editor-starter/backend-routes',
+ ],
},
{
type: 'link',
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index f431281391..bf1c5bf75d 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -1277,6 +1277,15 @@ export const articles = [
noAi: false,
slug: 'easing',
},
+ {
+ id: 'backend-routes',
+ title: 'Backend routes',
+ relativePath: 'docs/editor-starter/backend-routes.mdx',
+ compId: 'articles-docs-editor-starter-backend-routes',
+ crumb: 'Editor Starter',
+ noAi: false,
+ slug: 'editor-starter/backend-routes',
+ },
{
id: 'features',
title: 'Features',
diff --git a/packages/docs/static/generated/articles-docs-editor-starter-backend-routes.png b/packages/docs/static/generated/articles-docs-editor-starter-backend-routes.png
new file mode 100644
index 0000000000..5b40f38969
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-editor-starter-backend-routes.png differ