How mahaanandareddy200611-droid/attendance-system works
Attendance-System has lecturer web and student mobile clients backed by an Express API. Its core workflow is lecturer session creation and QR retrieval, followed by student token verification and attendance recording. Authentication supports signup, login, and OTP password reset. The README also advertises device, biometric, GPS, and anti-cheating checks, but the sampled implementation does not establish their wiring; the student app tree appears to be a scaffold. The tree and MongoDB configuration indicate MongoDB despite the README’s PostgreSQL reference.
Main entry points: AttendanceService.js Attendance Service · AttendanceRouter.js Attendance Routes · server.js Express Server · AuthRouter.js Auth Routes
Components 23
Client Apps
- Lecturer Web UI
lecturer-web/src/App.jsx - Student App
student-app/app/(tabs)/index.tsx
API and Security
- Express Server
backend/server.js - JWT Authentication
backend/src/middlewares/Auth.js - Role Authorization
backend/src/middlewares/authorize.js - Database Connection
backend/src/config/mongoDb.js
Attendance
- Attendance Routes
backend/src/modules/Attendance/AttendanceRouter.js - Attendance Controller
backend/src/modules/Attendance/AttendanceController.js - Attendance Service
backend/src/modules/Attendance/AttendanceService.js - Session Store
backend/src/models/AttendanceSession.model.js - Attendance Records
backend/src/models/AttendanceRecord.model.js - Attempt Log
backend/src/models/AttendanceAttempt.model.js - Audit Events
backend/src/models/AuditEvent.model.js - Idempotency Store
backend/src/models/Idempotency.model.js
Identity
- Auth Routes
backend/src/modules/Auth/AuthRouter.js - Auth Controller
backend/src/modules/Auth/AuthController.js - Auth Service
backend/src/modules/Auth/AuthService.js - Auth Validation
backend/src/modules/Auth/AuthValidator.js - User Model
backend/src/models/Auth.model.js
Other components
- Lecturer
- Student
- Email Service
- MongoDB
Connections 26
- Lecturer → Lecturer Web UI: uses
- Student → Student App: uses
- Express Server → Auth Routes: mounts
- Express Server → Attendance Routes: mounts
- Express Server → Database Connection: connects via
- Database Connection → MongoDB: connects
- Auth Routes → Auth Validation: validates
- Auth Routes → Auth Controller: dispatches
- Auth Controller → Auth Service: calls
- Auth Service → User Model: reads/writes
- Auth Service → Email Service: sends reset OTP
- Attendance Routes → JWT Authentication: authenticates
- Attendance Routes → Role Authorization: authorizes
- Attendance Routes → Attendance Controller: dispatches
- Attendance Controller → Attendance Service: calls
- Attendance Service → Session Store: reads/writes
- Attendance Service → Attendance Records: reads/writes
- Attendance Service → Attempt Log: logs attempts
- Attendance Service → Audit Events: logs events
- Attendance Service → Idempotency Store: tracks requests
- User Model → MongoDB: persists in
- Session Store → MongoDB: persists in
- Attendance Records → MongoDB: persists in
- Attempt Log → MongoDB: persists in
- Audit Events → MongoDB: persists in
- Idempotency Store → MongoDB: persists in