You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Complete initial setup of web dashboard
* feat(recordings): Add simple view to start, stop and list recordings
* fix: Fix sqlite thread issue and a few dashbaord ui improvements
* feat: Add script to download npm dependencies and update installer script
* chore: Code cleanup and workflow fix
<palign="center">Simple Next.js boilerplate that uses <ahref="https://fastapi.tiangolo.com/">FastAPI</a> as the API backend.</p>
9
+
10
+
<br/>
11
+
12
+
## Introduction
13
+
14
+
This is a hybrid Next.js + Python app that uses Next.js as the frontend and FastAPI as the API backend. One great use case of this is to write Next.js apps that use Python AI libraries on the backend.
15
+
16
+
## How It Works
17
+
18
+
The Python/FastAPI server is mapped into to Next.js app under `/api/`.
19
+
20
+
This is implemented using [`next.config.js` rewrites](https://github.com/digitros/nextjs-fastapi/blob/main/next.config.js) to map any request to `/api/:path*` to the FastAPI API, which is hosted in the `/api` folder.
21
+
22
+
On localhost, the rewrite will be made to the `127.0.0.1:8000` port, which is where the FastAPI server is running.
23
+
24
+
In production, the FastAPI server is hosted as [Python serverless functions](https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/python) on Vercel.
25
+
26
+
## Demo
27
+
28
+
https://nextjs-fastapi-starter.vercel.app/
29
+
30
+
## Deploy Your Own
31
+
32
+
You can clone & deploy it to Vercel with one click:
33
+
34
+
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fdigitros%2Fnextjs-fastapi%2Ftree%2Fmain)
35
+
36
+
## Developing Locally
37
+
38
+
You can clone & create this repo with the following command
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
67
+
68
+
The FastApi server will be running on [http://127.0.0.1:8000](http://127.0.0.1:8000) – feel free to change the port in `package.json` (you'll also need to update it in `next.config.js`).
69
+
70
+
## Learn More
71
+
72
+
To learn more about Next.js, take a look at the following resources:
73
+
74
+
-[Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
75
+
-[Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
76
+
-[FastAPI Documentation](https://fastapi.tiangolo.com/) - learn about FastAPI features and API.
77
+
78
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
0 commit comments