Full-stack attendance management platform with worker, admin, and supervisor roles.
- Worker registration with auto-generated username (first name) and default password (
123456). - JWT auth with role-based access (
worker,admin,supervisor). - Worker attendance dashboard with responsive calendar (day/week/month views).
- Custom admin panel:
- Manage workers
- Mark slot-wise attendance
- View/filter records
- Download attendance PDF
- Manage slots and groups
- Supervisor panel with restricted worker scope by assigned group.
- MongoDB Atlas integration with Mongoose models.
- Automatic attendance cleanup after 10 days (cron), with PDF export before deletion.
backend/Express + MongoDB APIfrontend/React + Vite UI
Copy from backend/.env.example and fill:
PORT=5000
MONGO_URI=mongodb+srv://<user>:<pass>@cluster.mongodb.net/wms
JWT_SECRET=change_this_secretCopy from frontend/.env.example:
VITE_API_URL=http://localhost:5000/apinpm install
npm run install:all
npm run dev- Frontend:
http://localhost:5173 - Backend:
http://localhost:5000
POST /api/auth/registerPOST /api/auth/loginGET/POST/DELETE /api/admin/workersPOST /api/admin/attendanceGET /api/admin/recordsGET /api/admin/records/pdfPOST/GET /api/admin/slotsPOST/GET /api/admin/groupsGET /api/worker/attendanceGET /api/supervisor/workersPOST /api/supervisor/attendance
- Set secure environment variables in your cloud host.
- Serve frontend build via static hosting (Vercel/Netlify) and backend via Node host (Render/Railway/etc).
- Ensure MongoDB Atlas IP allowlist and credentials are configured.