Back to catalogue
Project

Attendance System
Authenticated lecture, student, and attendance workflows built with React and an Express API.
How it’s builtHow it’s built
Attendance System · Lecture attendance system with React client and Express/MongoDB API
I built a lecture attendance system: an Express 5 and MongoDB API with JWT authentication, 4 Mongoose models and 15 endpoints for lecturers, students, lectures, attendance marking and per-student reports, and a React 19 and TypeScript client with 11 pages behind protected routes. A compound unique index prevents duplicate attendance records per lecture.
- API endpoints
- 15
- Mongoose models
- 4
- client pages
- 11
Technology and what it does here
- Express 5
- REST API under /api/auth, /api/students, /api/lectures, /api/attendance
- MongoDB / Mongoose 8
- Models with role enum, unique studentId and attendance status enum
- JWT + bcryptjs
- Protect middleware on all non-auth routes; hashed lecturer passwords
- React 19 + TypeScript + Vite
- Dashboard, lectures, students, attendance and report pages
- React Router 7
- ProtectedRoute wrapper with AuthContext
- Axios
- Shared API client in src/api/axios.ts
- Tailwind + Radix (shadcn/ui)
- Button, card, select, input and badge components
Implementation details
- attendanceSchema.index({ lecture: 1, student: 1 }, { unique: true }) enforces one record per student per lecture.
- Attendance status is constrained to present, absent or late, and users to admin or lecturer roles.
Technologies
- React
- Express
- MongoDB
