Project Link: https://easygoing-respect-frontend.up.railway.app/
This project is a Dockerized full-stack app using a React frontend and a Flask backend, designed for clean team collaboration and fast development.
- Docker Desktop
- No need to install Python, Node, or use virtual environments locally!
cpp-hackathon-2025/
│
├── backend/ # Flask API
│ ├── app.py
│ ├── requirements.txt
│ ├── .env.example
│ └── Dockerfile
│
├── frontend/ # React (Vite) App
│ ├── src/
│ ├── public/
│ ├── package.json
│ └── Dockerfile
│
├── docker-compose.yml
├── .gitignore
└── .env.example # Root .env for Docker Compose (optional)
From the root directory:
docker compose up --build- Flask backend: http://localhost:5003
- React frontend (built + served by Nginx): http://localhost:3000
✅ Backend auto-reloads on code changes
- Start the backend in Docker (Flask runs with hot reload):
docker compose up -d🧼 Pro tip: Once a week, you can clean up unused containers/images to free up space:
docker system prune -f- Start the frontend with Vite hot reload (outside Docker):
cd frontend
npm install # Only the first time
npm run dev✅ Open http://localhost:5173 to view the frontend
✅ API calls should go tohttp://localhost:5003
- Edit code in:
frontend/→ auto reloads in browserbackend/→ Flask auto-restarts inside Docker (thanks toFLASK_ENV=development)
- Stop everything when done:
docker compose down-
Copy the example file:
cp backend/.env.example backend/.env
-
(Optional) If using root-level
.envwith Docker Compose:cp .env.example .env
curl http://localhost:5003/Expected output:
{ "message": "Hello from Flask backend!" }docker exec -it cpp-backend pip install <package>
docker exec cpp-backend pip freeze > backend/requirements.txtThen:
git add backend/requirements.txt
git commit -m "Added <package>"
git pushIf you or a teammate updates dependencies:
docker compose down
docker compose up --buildAll code should be merged into
mainthrough pull requests!
- Checkout a feature branch (e.g.,
backend,frontend) - Commit and push your changes
- Open a Pull Request (PR) from your branch into
main - Another teammate should review and approve before merging
- After merge, pull the latest
maininto your branch
Pull Request template is located at:
.github/PULL_REQUEST_TEMPLATE.md
- Use
docker compose downto stop containers - Use
docker psordocker compose psto see what’s running - Use
docker exec -it cpp-backend bashto enter the backend container - You can skip frontend Docker during dev and just use
npm run dev