Full-stack attendance tracker built with Node.js, Express, MongoDB, and a lightweight MVC layout. Anyone can create session reports from the public form, while admins (with credentials) manage the student roster.
- Public session form: capture metadata (title, date, time, overview) and toggle attendance from the managed student list.
- Session reports: saved to MongoDB and available via shareable
/sessions/:idURLs with print-friendly styling. - Admin portal: login-protected student directory for adding and editing students.
- REST API:
/api/studentsfor active roster,/api/sessionsfor new session submissions.
- Node.js 18+
- MongoDB instance (local or hosted)
npm install
cp env.sample .envFill .env with your Mongo URI, session secret, and desired admin credentials.
npm run devVisit:
http://localhost:4000– public session formhttp://localhost:4000/batch-manager.html– admin portal
npm start| Variable | Description |
|---|---|
MONGODB_URI |
Connection string for MongoDB |
SESSION_SECRET |
Secret used to sign Express sessions |
ADMIN_USERNAME |
Username for admin login |
ADMIN_PASSWORD |
Password for admin login |
PORT |
Optional; defaults to 4000 |
src/
config/db.js # Database connection
controllers/ # Auth, student, session controllers
middlewares/ # Admin guard
models/ # Student & Session schemas
routes/ # Admin/API/session routes
server.js # Express bootstrap
public/ # Static assets (HTML, CSS, JS)
env.sample # Environment template
npm run dev– Run server with Nodemonnpm start– Run server in production mode
- CSV export of session reports
- Bulk student import
- Attendance analytics dashboards