A production-minded MERN starter for a phased College ERP rollout.
Checkout live at- https://clg-erp-sdsf.pages.dev/
free credentials to use->
admin@clg.edu password:Admin@12345
neha.gupta@clg.edu password:Faculty@12345
#Student rohan.verma@clg.edu password:Student@12345
apps/server - Express APIapps/client - React frontenddocs/phases.md - phased delivery planhelmet, CORS, rate-limits, structured logs)/api/auth/register, /api/auth/login, /api/auth/me)/dashboard)/api/health)apps/server/.env from apps/server/.env.exampleapps/client/.env from apps/client/.env.examplenpm install (root)npm --prefix apps/server installnpm --prefix apps/client installnpm run devdocker compose up --buildServices:
http://localhost:5173http://localhost:5000/apimongodb://localhost:27017copy .env.example .envcopy apps\server\.env.example apps\server\.envapps/server/.env and set:
NODE_ENV=productionPORT=5000MONGO_URI to your production MongoDB connection stringJWT_ACCESS_SECRET to a long random secretJWT_ACCESS_EXPIRES_IN if you want a different token lifetimeCORS_ORIGIN to your frontend origin.env and set compose deployment values:
SERVER_PORT (public backend port)CLIENT_PORT (public frontend port)MONGO_URI (container override, optional if defined in apps/server/.env)CORS_ORIGIN (frontend origin)VITE_API_URL (public backend API URL, e.g. https://api.yourdomain.com/api)docker compose up --build -ddocker compose psInvoke-WebRequest -Uri 'http://localhost:5000/api/health/live' -UseBasicParsing | Select-Object -ExpandProperty ContentInvoke-WebRequest -Uri 'http://localhost:5000/api/health/ready' -UseBasicParsing | Select-Object -ExpandProperty Contenthttp://localhost:5173docker compose logs -f serverdocker compose logs -f clientdocker compose downProduction note:
MONGO_URI override in docker-compose.yml before deploying.CORS_ORIGIN plus VITE_API_URL to that domain.This repository includes a Render blueprint at render.yaml for the backend only.
apps/server if you are creating the service manually.npm cinpm startMONGO_URI pointing to MongoDB Atlas or another external MongoDB instanceJWT_ACCESS_SECRET with at least 32 random charactersCORS_ORIGIN with your frontend origin, or a comma-separated list of allowed originsJWT_ACCESS_EXPIRES_IN if you want a token lifetime other than 1dPORT unset in Render. Render injects it automatically./api/health/ready as the health check path.If you deploy the frontend somewhere else later, update CORS_ORIGIN to that deployed frontend URL before testing login or authenticated requests.
apps/server/.env and root .env as shown above.npm run phase5:quickdocker compose up --build -dSERVER_PORT and CLIENT_PORT (or expose only reverse proxy ports 80/443).GET /api/healthGET /api/health/liveGET /api/health/readyPOST /api/auth/registerPOST /api/auth/loginPOST /api/auth/logoutGET /api/auth/mePhase 2 endpoints:
GET|POST /api/departmentsGET|PATCH|DELETE /api/departments/:idGET|POST /api/coursesGET|PATCH|DELETE /api/courses/:idGET|POST /api/studentsGET|PATCH|DELETE /api/students/:idPhase 3 endpoints:
GET|POST /api/attendanceGET|PATCH|DELETE /api/attendance/:idGET|POST /api/timetablesGET|PATCH|DELETE /api/timetables/:idGET|POST /api/examsGET|PATCH|DELETE /api/exams/:idGET|POST /api/invoicesGET|PATCH|DELETE /api/invoices/:idPhase 4 endpoints:
GET /api/reports/dashboardGET /api/reports/at-riskGET /api/reports/searchGET /api/reports/exportRefer to docs/phases.md for the full implementation roadmap.
Quick hardening path (build + smoke checks):
npm run phase5:quickOr run individually:
npm run buildnpm run smokeChecklist details: docs/phase5-quick.md