Full-stack platform for campus micro-jobs where students can post tasks, submit proposals, collaborate in real-time workspaces, and complete deliveries with review flow.
- Frontend: React, Vite, TypeScript, Tailwind, React Query, Socket.IO client
- Backend: Node.js, Express, MongoDB (Mongoose), Redis, Socket.IO
- Auth: JWT + OTP email verification (Resend)
CFMS/
├── backend/ # Express API + Socket server
├── frontend/ # React web app
└── README.md # Main project guide
- OTP-based registration with college email validation
- JWT authentication and role switching (
poster/freelancer) - Jobs, proposals, acceptance/rejection workflow
- Real-time workspace chat and status events via Socket.IO
- Submission + approval lifecycle and ratings
- Notifications and dashboard analytics
- Frontend backend-health monitoring with reconnect-aware UI status
- Node.js 18+
- npm 9+
- MongoDB running locally or remotely
- Redis (recommended; app falls back to in-memory OTP store if Redis is unavailable)
- Clone and open the repository
git clone <your-repo-url>
cd CFMS- Configure backend environment
cp backend/.env.example backend/.envUpdate backend/.env at minimum:
MONGODB_URIJWT_SECRETRESEND_API_KEYEMAIL_FROM
- Configure frontend environment
cp frontend/.env.example frontend/.envDefault values usually work locally:
VITE_API_URL=http://localhost:5000/api
VITE_SOCKET_URL=http://localhost:5000- Install dependencies
cd backend && npm install
cd ../frontend && npm install- Run both services (two terminals)
Terminal 1 (backend):
cd backend
npm run devTerminal 2 (frontend):
cd frontend
npm run dev- Open app
- Frontend:
http://localhost:8080 - Backend health:
http://localhost:5000/api/health
npm run dev- start with nodemonnpm start- start production server
npm run dev- start Vite dev servernpm run build- production buildnpm run preview- preview production buildnpm run lint- run ESLintnpm run test- run Vitest
- Backend API base path:
/api - Socket server runs on backend host/port
ALLOWED_ORIGINsupports comma-separated origins- In development, private-network origins are accepted automatically for LAN testing
- If backend is unreachable, frontend shows connection status and retries GET requests for transient failures
- Backend details:
backend/README.md - Frontend details:
frontend/README.md
Unable to reach backend: verify backend is running andVITE_API_URLis correct.- OTP email not sending: ensure
RESEND_API_KEYandEMAIL_FROMare valid inbackend/.env. - CORS errors: update
ALLOWED_ORIGINin backend.envto include your frontend origin. - Mongo/Redis connection issues: confirm services are running and URLs in
.envare reachable.