This project is a full-stack application that combines a Next.js frontend with a FastAPI backend. Below are the instructions for setting up and running both parts of the application.
nextjs-streaming-api
├── backend
│ ├── api
│ │ └── index.py
│ ├── requirements.txt
│ └── README.md
├── frontend
│ ├── pages
│ │ └── index.tsx
│ ├── public
│ ├── package.json
│ ├── tsconfig.json
│ └── README.md
├── Makefile
└── README.md
- Node.js (for the frontend)
- Python 3.7 or higher (for the backend)
make(to use the Makefile)
To quickly install dependencies and start both the frontend and backend servers, run the following command from the project root:
make allThe Makefile provides convenient commands for common tasks:
-
Setup: Install dependencies for both frontend and backend:
make setup
-
Start: Start both the frontend and backend servers:
make start
-
Clean: Remove
node_modulesfrom the frontend and clear Python cache from the backend:make clean
Once both servers are running, you can access the frontend at http://localhost:3000 and the FastAPI backend at http://localhost:8000.
If you prefer manual setup, follow these steps:
make setup && make start-frontendmake setup && make start-backendFeel free to submit issues or pull requests if you have suggestions or improvements for the project.
This project is licensed under the MIT License.