How saivighnesh811/anti_cheating_system works
This is a role-based online exam and proctoring application. Users register or sign in, then follow student, administrator, or super-administrator workflows: students take and review exams; administrators create exams and monitor attempts and violations; super-administrators manage platform-level activity. The frontend routes these workflows to an Express API, whose route handlers use MongoDB models. Authentication, password recovery, and profile management form a separate account stage. Frontend-to-API edges reflect sampled imports; the HTTP connection to backend routes is strongly implied but not directly shown in a shared excerpt.
Main entry points: App.jsx Route application · index.js Express router · api.js HTTP client · exam.js Exam API
Components 31
Web application
- Route application
client/src/App.jsx - Toast notifications
client/src/context/ToastContext.jsx
Accounts and access
- Session context
client/src/context/AuthContext.jsx - Account pages
client/src/pages - Profile
client/src/pages/Profile.jsx - Authentication API
server/routes/auth.js - User API
server/routes/user.js
Exam workflows
- Student dashboard
client/src/pages/StudentDashboard.jsx - Take exam
client/src/pages/TakeExam.jsx - Exam safeguards
client/src/hooks/useAntiCheat.js - Browser lockdown
client/src/hooks/useLockdown.js - Exam review
client/src/pages/ReviewExam.jsx - Admin dashboard
client/src/pages/AdminDashboard.jsx - Exam authoring
client/src/pages/CreateExam.jsx - Super-admin dashboard
client/src/pages/SuperAdminDashboard.jsx - Exam API
server/routes/exam.js - Attempt and proctoring API
server/routes/attempt.js - Report API
server/routes/report.js - Student API
server/routes/student.js - Super-admin API
server/routes/superadmin.js
API and data
- HTTP client
client/src/services/api.js - Express router
server/index.js - Access middleware
server/middleware/auth.js - User records
server/models/User.js - Exam records
server/models/Exam.js - Attempt records
server/models/Attempt.js - Violation records
server/models/ViolationLog.js - Audit records
server/models/AuditLog.js - Login activity
server/models/LoginActivity.js - Upload middleware
server/middleware/upload.js
Other components
- User
Connections 48
- User → Route application: uses
client/src/App.jsx - Route application → Account pages: routes to
client/src/App.jsx - Route application → Profile: routes to
client/src/App.jsx - Route application → Student dashboard: routes to
client/src/App.jsx - Route application → Take exam: routes to
client/src/App.jsx - Route application → Exam review: routes to
client/src/App.jsx - Route application → Admin dashboard: routes to
client/src/App.jsx - Route application → Exam authoring: routes to
client/src/App.jsx - Route application → Super-admin dashboard: routes to
client/src/App.jsx - Route application → Session context: checks session
client/src/App.jsx - Route application → Toast notifications: provides
client/src/App.jsx - Session context → HTTP client: calls
client/src/context/AuthContext.jsx - Account pages → Session context: uses
client/src/pages/Login.jsx - Profile → HTTP client: calls
client/src/pages/Profile.jsx - Student dashboard → HTTP client: calls
client/src/pages/StudentDashboard.jsx - Take exam → HTTP client: calls
client/src/pages/TakeExam.jsx - Take exam → Exam safeguards: uses
client/src/pages/TakeExam.jsx - Take exam → Browser lockdown: uses
client/src/pages/TakeExam.jsx - Exam review → HTTP client: calls
client/src/pages/ReviewExam.jsx - Admin dashboard → HTTP client: calls
client/src/pages/AdminDashboard.jsx - Exam authoring → HTTP client: calls
client/src/pages/CreateExam.jsx - Super-admin dashboard → HTTP client: calls
client/src/pages/SuperAdminDashboard.jsx - HTTP client → Express router: sends HTTP requests
- Express router → Authentication API: mounts
server/index.js - Express router → Exam API: mounts
server/index.js - Express router → Attempt and proctoring API: mounts
server/index.js - Express router → Report API: mounts
server/index.js - Express router → Student API: mounts
server/index.js - Express router → Super-admin API: mounts
server/index.js - Express router → User API: mounts
server/index.js - Authentication API → User records: reads and writes
server/routes/auth.js - Authentication API → Login activity: records sign-ins
server/routes/auth.js - Authentication API → Access middleware: protects profile
server/routes/auth.js - Access middleware → User records: loads user
server/middleware/auth.js - Attempt and proctoring API → Access middleware: protects routes
server/routes/attempt.js - Attempt and proctoring API → Attempt records: reads and writes
server/routes/attempt.js - Attempt and proctoring API → Exam records: loads exam
server/routes/attempt.js - Attempt and proctoring API → Violation records: reads and writes
server/routes/attempt.js - Exam API → Exam records: uses
server/routes/exam.js - Exam API → Attempt records: uses
server/routes/exam.js - Exam API → Violation records: uses
server/routes/exam.js - Exam API → Audit records: uses
server/routes/exam.js - Report API → Attempt records: reads
server/routes/report.js - Report API → Violation records: reads
server/routes/report.js - Student API → User records: uses
server/routes/student.js - Super-admin API → User records: uses
server/routes/superadmin.js - Super-admin API → Exam records: uses
server/routes/superadmin.js - Super-admin API → Attempt records: uses
server/routes/superadmin.js