A development stack using:
supporting:
graph LR
A[Browser] -->|HTML/API| B[Next.js Backend<br/>Node.js]
B -->|SSE| A
B --> |proxy<br/>/api/v1| C[FastAPI<br/>Backend]
C --> D[Request topic<br/>Kafka]
D --> E[Worker]
E --> F[Response topic<br/>Kafka]
F --> B
Install NPM packages:
pnpm i
Install Python packages:
cd backend
poetry install
Create Kafka topics:
pnpm run topics:create
Start worker:
pnpm run worker:dev
Start back-end:
pnpm run backend:dev
Start front-end:
pnpm run dev
Both front-end and back-end load environment variables from .env.development
, .env.local
and .env
. The variables required for development are defined in .env.development
. Create .env.local
or .env
to overwrite them.
See startup scripts scripts/dev.sh
, scripts/backend/dev.sh
and the following Nex.js document for more details.