How sakin08/smart-attendance-system works
Smart Attendance System supports university user registration and role-based access, teacher course/session management, QR-based student attendance, and attendance reporting/export. The principal flow runs from teacher-created, time-bounded sessions through student QR submission to recorded attendance and reports. The README describes GPS verification; the sampled student route says location is disabled, so the graph shows location capture/submission without asserting server-side GPS validation. Some frontend and route wiring is based on documented capabilities; unsampled implementation details are not inferred.
Main entry points: App.jsx App routes · StudentDashboard.jsx Student dashboard · index.js API server · adminRoutes.js Admin routes
Components 25
Web application
- App routes
client/src/App.jsx - Auth state
client/src/context/AuthContext.jsx - Login and registration
client/src/pages/Login.jsx - Student registration
client/src/pages/Register.jsx - Student dashboard
client/src/pages/StudentDashboard.jsx - Teacher dashboard
client/src/pages/TeacherDashboard.jsx - Admin dashboard
client/src/pages/AdminDashboard.jsx - QR scanner
client/src/components/QRScanner.jsx - Location capture
client/src/components/LocationCapture.jsx - Report export UI
client/src/components/ExportButton.jsx - API client
client/src/api.js
Identity and access
- API server
server/index.js - Authentication routes
server/routes/authRoutes.js - Registration parser
server/utils/registrationParser.js - JWT and role checks
server/middleware/auth.js
Courses and attendance
- Teacher routes
server/routes/teacherRoutes.js - Student routes
server/routes/studentRoutes.js - Course model
server/models/Course.js - Attendance session model
server/models/AttendanceSession.js
Administration and reports
- Admin routes
server/routes/adminRoutes.js - User model
server/models/User.js - MongoDB
Other components
- Teacher
- Student
- Administrator
Connections 41
- Teacher → App routes: uses
- Student → App routes: uses
- Administrator → App routes: uses
- App routes → Auth state: provides auth
- App routes → Login and registration: routes to
- App routes → Student registration: routes to
- App routes → Student dashboard: routes to
- App routes → Teacher dashboard: routes to
- App routes → Admin dashboard: routes to
- Login and registration → Auth state: signs in
- Student registration → Auth state: registers
- Student dashboard → QR scanner: scans QR
- Student dashboard → Location capture: captures location
- Teacher dashboard → Report export UI: exports reports
- Auth state → API client: sends requests
- Student dashboard → API client: sends requests
- Teacher dashboard → API client: sends requests
- Admin dashboard → API client: sends requests
- QR scanner → Student dashboard: provides QR token
- Location capture → Student dashboard: provides coordinates
- API client → API server: calls API
- API server → Authentication routes: mounts routes
- API server → Student routes: mounts routes
- API server → Teacher routes: mounts routes
- API server → Admin routes: mounts routes
- Authentication routes → JWT and role checks: checks identity
- Student routes → JWT and role checks: checks access
- Teacher routes → JWT and role checks: checks access
- Admin routes → JWT and role checks: checks access
- Authentication routes → Registration parser: parses student email
- Authentication routes → User model: reads and creates users
- Student routes → Course model: checks enrollment
- Student routes → Attendance session model: reads and records attendance
- Teacher routes → Course model: manages courses
- Teacher routes → Attendance session model: manages sessions
- Admin routes → User model: manages users
- Admin routes → Course model: reads and deletes courses
- Admin routes → Attendance session model: reads and deletes sessions
- User model → MongoDB: persists users
- Course model → MongoDB: persists courses
- Attendance session model → MongoDB: persists attendance