- React + Vite frontend in
frontend/ - Express + MongoDB backend in
backend/ - JWT auth for registration and login
Use backend/.env:
MONGODB_URI=mongodb://localhost:27017/IremboGov
PORT=5000
JWT_SECRET=replace_with_a_real_secretYou can also copy from backend/.env.example.
cd frontend
npm install
cd ../backend
npm installStart the backend:
cd backend
npm run devStart the frontend in another terminal:
cd frontend
npm run devThe frontend is served from frontend/ and proxies /api/* to http://localhost:5000.
GET /api/healthPOST /api/auth/registerPOST /api/auth/login