How jayfarkade/cheating-resistant-attendance works
This is a web-based attendance system for professors and students. Professors create courses, manage enrollment, start timed attendance sessions, advance a three-stage QR challenge, and review results; students enroll, scan each stage, and view attendance history. The server validates attempts and tokens against SQLite, records attendance, and broadcasts successful check-ins to the professor dashboard. Frontend and several controller details are represented from the README and repository structure; their internal wiring is not fully shown in the sampled source.
Main entry points: app.js Web app shell · attendanceController.js Attendance engine · server.js HTTP server · database.js SQLite data
Components 17
Web application
- Web app shell
public/js/app.js - Professor dashboard
public/js/professor.js - Student dashboard
public/js/student.js
API and domain
- HTTP server
server.js - Auth routes
src/routes/authRoutes.js - Course routes
src/routes/courseRoutes.js - Attendance routes
src/routes/attendanceRoutes.js - Authentication
src/controllers/authController.js - Course and enrollment
src/controllers/courseController.js - Attendance engine
src/controllers/attendanceController.js - JWT and roles
src/middleware/auth.js
Persistence and services
- SQLite data
src/db/database.js - QR token service
src/services/qrService.js - Audit logging
src/services/auditService.js
Live updates
- Socket.IO events
server.js
Other components
- Professor
- Student
Connections 26
- Professor → Professor dashboard: uses
- Student → Student dashboard: uses
- Web app shell → Professor dashboard: initializes
- Web app shell → Student dashboard: initializes
- Web app shell → HTTP server: HTTP requests
- Professor dashboard → Web app shell: API helper
- Student dashboard → Web app shell: API helper
- HTTP server → Auth routes: mounts
- HTTP server → Course routes: mounts
- HTTP server → Attendance routes: mounts
- Auth routes → JWT and roles: protects profile
- Auth routes → Authentication: dispatches
- Course routes → JWT and roles: protects routes
- Course routes → Course and enrollment: dispatches
- Attendance routes → JWT and roles: protects routes
- Attendance routes → Attendance engine: dispatches
- Authentication → SQLite data: reads and writes
- Authentication → Audit logging: logs events
- Course and enrollment → SQLite data: reads and writes
- Course and enrollment → Audit logging: logs events
- Attendance engine → SQLite data: reads and writes
- Attendance engine → QR token service: generates and parses
- Attendance engine → Audit logging: logs events
- QR token service → SQLite data: stores tokens
- Attendance engine → Socket.IO events: emits updates
- Socket.IO events → Web app shell: delivers events