# abhinavkajeev/automatic-attendence architecture

> Architecture diagram of the GitHub repository abhinavkajeev/automatic-attendence, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhinavkajeev/automatic-attendence
- Repository: https://github.com/abhinavkajeev/automatic-attendence

## Overview

Automated Student Attendance System: staff manage students and courses, enroll faces, run live recognition for a course, and review attendance and analytics. The React client calls an Express/MongoDB backend; student enrollment and verification are delegated through a service to the Python CV engine. The map also includes the documented dashboard, reporting, and live-monitoring capabilities. Some UI and runtime wiring is based on README or SOURCE INDEX references; unsampled behavior and uncertain links are omitted.

Main entry points: [`client/src/routes/AppRoutes.jsx`](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/routes/AppRoutes.jsx) (Application routes), [`server/controllers/attendanceController.js`](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/attendanceController.js) (Attendance operations), [`client/src/services/api.js`](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/services/api.js) (Client API service), [`client/src/pages/CoursesPage.jsx`](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/CoursesPage.jsx) (Course management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Staff application"]
  node_routes["Application routes<br/>[AppRoutes.jsx]"]
  node_layout["Application layout<br/>[MainLayout.jsx]"]
  node_dashboard["Dashboard and analytics<br/>[DashboardPage.jsx]"]
  node_students_ui["Student management<br/>[StudentsPage.jsx]"]
  node_courses_ui["Course management<br/>[CoursesPage.jsx]"]
  node_reports_ui["Attendance reports<br/>[ReportsPage.jsx]"]
  node_live_ui["Live attendance<br/>[LiveAttendance.jsx]"]
  node_api["Client API service<br/>[api.js]"]
  node_camera["Camera cleanup<br/>[cameraCleanup.js]"]
  node_ui_common["Common UI components"]
  node_student_table["Student table<br/>[StudentTable.jsx]"]
  node_course_details["Course details"]
  node_attendance_pages["Attendance page views"]
end

subgraph group_backend["API and records"]
  node_server["Express API server<br/>[server.js]"]
  node_student_routes["Student routes<br/>[studentRoutes.js]"]
  node_attendance_routes["Attendance routes"]
  node_student_controller["Student operations"]
  node_attendance_controller["Attendance operations"]
  node_course_controller["Course operations"]
  node_students[("Student records<br/>[Student.js]")]
  node_courses[("Course records<br/>[Course.js]")]
  node_attendance[("Attendance records<br/>[Attendance.js]")]
end

subgraph group_vision["Face recognition"]
  node_cv_service["CV engine client<br/>[cvEngineService.js]"]
  node_cv_engine["Face enrollment and recognition<br/>[server.py]"]
end

subgraph group_domain["Attendance workflows"]
  node_attendance_workflow["Face-based marking"]
  node_reporting["Attendance statistics and feed"]
end

node_staff(("Staff"))

node_staff -->|"opens"| node_routes
node_routes -->|"renders"| node_layout
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_students_ui
node_routes -->|"routes to"| node_courses_ui
node_routes -->|"routes to"| node_reports_ui
node_routes -->|"routes to"| node_attendance_pages
node_attendance_pages -->|"renders"| node_live_ui
node_students_ui -->|"renders"| node_student_table
node_courses_ui -->|"renders"| node_course_details
node_live_ui -->|"uses"| node_camera
node_dashboard -->|"requests data"| node_api
node_students_ui -->|"requests data"| node_api
node_courses_ui -->|"requests data"| node_api
node_live_ui -->|"requests data"| node_api
node_reports_ui -.->|"requests data"| node_api
node_staff -.->|"uses"| node_ui_common
node_api -.->|"sends HTTP requests"| node_server
node_server -->|"mounts"| node_student_routes
node_server -->|"mounts"| node_attendance_routes
node_student_routes -->|"dispatches"| node_student_controller
node_attendance_routes -->|"dispatches"| node_attendance_controller
node_student_controller -->|"reads and writes"| node_students
node_student_controller -->|"enrolls and verifies"| node_cv_service
node_cv_service -->|"sends CV requests"| node_cv_engine
node_attendance_controller -->|"reads"| node_students
node_attendance_controller -->|"reads"| node_courses
node_attendance_controller -->|"reads and writes"| node_attendance
node_attendance_controller -->|"handles"| node_attendance_workflow
node_attendance_controller -->|"provides"| node_reporting
node_courses_ui -.->|"manages courses"| node_course_controller

click node_routes "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/routes/AppRoutes.jsx"
click node_layout "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/components/layout/MainLayout.jsx"
click node_dashboard "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/DashboardPage.jsx"
click node_students_ui "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/StudentsPage.jsx"
click node_courses_ui "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/CoursesPage.jsx"
click node_reports_ui "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/ReportsPage.jsx"
click node_live_ui "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/components/LiveAttendance.jsx"
click node_api "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/services/api.js"
click node_camera "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/utils/cameraCleanup.js"
click node_ui_common "https://github.com/abhinavkajeev/automatic-attendence/tree/main/client/src/components/common"
click node_student_table "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/components/students/StudentTable.jsx"
click node_course_details "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/components/CourseDetailsModal.jsx"
click node_attendance_pages "https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/LiveAttendancePage.jsx"
click node_server "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/server.js"
click node_student_routes "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/routes/studentRoutes.js"
click node_attendance_routes "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/routes/attendanceRoutes.js"
click node_student_controller "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/studentController.js"
click node_attendance_controller "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/attendanceController.js"
click node_course_controller "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/courseController.js"
click node_students "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/models/Student.js"
click node_courses "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/models/Course.js"
click node_attendance "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/models/Attendance.js"
click node_cv_service "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/services/cvEngineService.js"
click node_cv_engine "https://github.com/abhinavkajeev/automatic-attendence/blob/main/cv-engine/server.py"
click node_attendance_workflow "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/attendanceController.js"
click node_reporting "https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/attendanceController.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_routes,node_layout,node_dashboard,node_students_ui,node_courses_ui,node_reports_ui,node_live_ui,node_api,node_camera,node_ui_common,node_student_table,node_course_details,node_attendance_pages toneBlue
class node_server,node_student_routes,node_attendance_routes,node_student_controller,node_attendance_controller,node_course_controller,node_students,node_courses,node_attendance toneAmber
class node_cv_service,node_cv_engine toneMint
class node_attendance_workflow,node_reporting toneRose
class node_staff toneIndigo
```

## Components

### Staff application

- [Application routes](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/routes/AppRoutes.jsx): `client/src/routes/AppRoutes.jsx`
- [Application layout](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/components/layout/MainLayout.jsx): `client/src/components/layout/MainLayout.jsx`
- [Dashboard and analytics](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/DashboardPage.jsx): `client/src/pages/DashboardPage.jsx`
- [Student management](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/StudentsPage.jsx): `client/src/pages/StudentsPage.jsx`
- [Course management](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/CoursesPage.jsx): `client/src/pages/CoursesPage.jsx`
- [Attendance reports](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/ReportsPage.jsx): `client/src/pages/ReportsPage.jsx`
- [Live attendance](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/components/LiveAttendance.jsx): `client/src/components/LiveAttendance.jsx`
- [Client API service](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/services/api.js): `client/src/services/api.js`
- [Camera cleanup](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/utils/cameraCleanup.js): `client/src/utils/cameraCleanup.js`
- [Common UI components](https://github.com/abhinavkajeev/automatic-attendence/tree/main/client/src/components/common): `client/src/components/common`
- [Student table](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/components/students/StudentTable.jsx): `client/src/components/students/StudentTable.jsx`
- [Course details](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/components/CourseDetailsModal.jsx): `client/src/components/CourseDetailsModal.jsx`
- [Attendance page views](https://github.com/abhinavkajeev/automatic-attendence/blob/main/client/src/pages/LiveAttendancePage.jsx): `client/src/pages/LiveAttendancePage.jsx`

### API and records

- [Express API server](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/server.js): `server/server.js`
- [Student routes](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/routes/studentRoutes.js): `server/routes/studentRoutes.js`
- [Attendance routes](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/routes/attendanceRoutes.js): `server/routes/attendanceRoutes.js`
- [Student operations](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/studentController.js): `server/controllers/studentController.js`
- [Attendance operations](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/attendanceController.js): `server/controllers/attendanceController.js`
- [Course operations](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/courseController.js): `server/controllers/courseController.js`
- [Student records](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/models/Student.js): `server/models/Student.js`
- [Course records](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/models/Course.js): `server/models/Course.js`
- [Attendance records](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/models/Attendance.js): `server/models/Attendance.js`

### Face recognition

- [CV engine client](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/services/cvEngineService.js): `server/services/cvEngineService.js`
- [Face enrollment and recognition](https://github.com/abhinavkajeev/automatic-attendence/blob/main/cv-engine/server.py): `cv-engine/server.py`

### Attendance workflows

- [Face-based marking](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/attendanceController.js): `server/controllers/attendanceController.js`
- [Attendance statistics and feed](https://github.com/abhinavkajeev/automatic-attendence/blob/main/server/controllers/attendanceController.js): `server/controllers/attendanceController.js`

### Other components

- **Staff**

## Connections

- Staff → Application routes: opens
- Application routes → Application layout: renders (evidence: `client/src/routes/AppRoutes.jsx`)
- Application routes → Dashboard and analytics: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Application routes → Student management: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Application routes → Course management: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Application routes → Attendance reports: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Application routes → Attendance page views: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Attendance page views → Live attendance: renders (evidence: `client/src/pages/LiveAttendancePage.jsx`)
- Student management → Student table: renders (evidence: `client/src/pages/StudentsPage.jsx`)
- Course management → Course details: renders (evidence: `client/src/pages/CoursesPage.jsx`)
- Live attendance → Camera cleanup: uses (evidence: `client/src/components/LiveAttendance.jsx`)
- Dashboard and analytics → Client API service: requests data (evidence: `client/src/pages/DashboardPage.jsx`)
- Student management → Client API service: requests data (evidence: `client/src/pages/StudentsPage.jsx`)
- Course management → Client API service: requests data (evidence: `client/src/pages/CoursesPage.jsx`)
- Live attendance → Client API service: requests data (evidence: `client/src/components/LiveAttendance.jsx`)
- Attendance reports → Client API service: requests data
- Staff → Common UI components: uses
- Client API service → Express API server: sends HTTP requests
- Express API server → Student routes: mounts
- Express API server → Attendance routes: mounts
- Student routes → Student operations: dispatches (evidence: `server/routes/studentRoutes.js`)
- Attendance routes → Attendance operations: dispatches (evidence: `server/routes/attendanceRoutes.js`)
- Student operations → Student records: reads and writes (evidence: `server/controllers/studentController.js`)
- Student operations → CV engine client: enrolls and verifies (evidence: `server/controllers/studentController.js`)
- CV engine client → Face enrollment and recognition: sends CV requests (evidence: `server/services/cvEngineService.js`)
- Attendance operations → Student records: reads (evidence: `server/controllers/attendanceController.js`)
- Attendance operations → Course records: reads (evidence: `server/controllers/attendanceController.js`)
- Attendance operations → Attendance records: reads and writes (evidence: `server/controllers/attendanceController.js`)
- Attendance operations → Face-based marking: handles (evidence: `server/controllers/attendanceController.js`)
- Attendance operations → Attendance statistics and feed: provides (evidence: `server/controllers/attendanceController.js`)
- Course management → Course operations: manages courses
