# minet2943-byte/system_attendance architecture

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

- Interactive diagram: https://gitdiagram.com/minet2943-byte/system_attendance
- Repository: https://github.com/minet2943-byte/system_attendance

## Overview

System Attendance is a React frontend for teacher and student attendance workflows, backed by an external HTTP API. Users enter through login or registration; role-protected routes lead teachers to class, roster, enrollment, attendance, and history functions, and students to dashboard and profile views. Domain pages call service modules, which use a shared Axios client for API requests. The graph reflects routes and calls supported by excerpts or the SOURCE INDEX; backend internals are not present in the repository evidence.

Main entry points: [`src/layouts/TeacherLayout.jsx`](https://github.com/minet2943-byte/system_attendance/blob/main/src/layouts/TeacherLayout.jsx) (Teacher Layout), [`src/services/api.js`](https://github.com/minet2943-byte/system_attendance/blob/main/src/services/api.js) (HTTP Client), [`src/routes/AppRoutes.jsx`](https://github.com/minet2943-byte/system_attendance/blob/main/src/routes/AppRoutes.jsx) (Role Routes), [`src/services/studentService.js`](https://github.com/minet2943-byte/system_attendance/blob/main/src/services/studentService.js) (Student Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App and Routing"]
  node_app["App Shell<br/>[App.jsx]"]
  node_routes["Role Routes<br/>[AppRoutes.jsx]"]
  node_teacherlayout["Teacher Layout<br/>[TeacherLayout.jsx]"]
  node_studentlayout["Student Layout<br/>[StudentLayout.jsx]"]
end

subgraph group_identity["Identity and Access"]
  node_authforms["Login and Register<br/>[LoginForm.jsx]"]
  node_authcontext["Auth State<br/>[AuthContext.jsx]"]
  node_authservice["Auth Service<br/>[authService.js]"]
end

subgraph group_teaching["Teacher Workflows"]
  node_classes["Class Management"]
  node_enrollment["Enrollment Management"]
  node_roster["Student Roster<br/>[StudentRoster.jsx]"]
  node_marking["Mark Attendance<br/>[MarkAttendance.jsx]"]
  node_history["Attendance History<br/>[History.jsx]"]
  node_teacherdash["Teacher Dashboard"]
end

subgraph group_learning["Student Workflows"]
  node_studentdash["Student Dashboard"]
  node_studentprofile["Student Profile<br/>[Profile.jsx]"]
  node_studentattendance["My Attendance<br/>[MyAttendance.jsx]"]
  node_studentreports["Student Reports<br/>[StudentReports.jsx]"]
end

subgraph group_services["API Services"]
  node_classservice["Class Service<br/>[classService.js]"]
  node_enrollservice["Enrollment Service<br/>[enrollService.js]"]
  node_studentservice["Student Service<br/>[studentService.js]"]
  node_attservice["Attendance Service"]
  node_sessionservice["Session Service"]
  node_historyservice["History Service<br/>[historyService.js]"]
  node_apiclient["HTTP Client<br/>[api.js]"]
end

node_teacher(("Teacher"))
node_student(("Student"))
node_backend{{"Attendance API"}}

node_app -->|"renders"| node_routes
node_app -->|"provides auth"| node_authcontext
node_routes -->|"checks roles"| node_authcontext
node_routes -->|"routes to"| node_authforms
node_routes -->|"routes to"| node_teacherlayout
node_routes -->|"routes to"| node_studentlayout
node_teacher -.->|"uses"| node_routes
node_student -.->|"uses"| node_routes
node_authforms -->|"authenticates"| node_authcontext
node_authcontext -->|"delegates auth"| node_authservice
node_authservice -->|"requests"| node_apiclient
node_teacherlayout -->|"hosts routes"| node_teacherdash
node_teacherlayout -->|"hosts routes"| node_classes
node_teacherlayout -->|"hosts routes"| node_enrollment
node_teacherlayout -->|"hosts routes"| node_roster
node_teacherlayout -->|"hosts routes"| node_marking
node_teacherlayout -->|"hosts routes"| node_history
node_classes -->|"manages classes"| node_classservice
node_classes -->|"manages students"| node_studentservice
node_classes -->|"enrolls students"| node_enrollservice
node_enrollment -->|"manages enrollment"| node_enrollservice
node_roster -->|"loads roster"| node_studentservice
node_marking -->|"creates sessions"| node_sessionservice
node_marking -->|"loads students"| node_studentservice
node_marking -->|"records attendance"| node_attservice
node_marking -->|"loads classes"| node_classservice
node_history -->|"loads history"| node_historyservice
node_history -->|"loads classes"| node_classservice
node_teacherdash -->|"loads classes"| node_classservice
node_teacherdash -->|"loads attendance"| node_attservice
node_studentlayout -->|"hosts routes"| node_studentdash
node_studentlayout -->|"hosts routes"| node_studentprofile
node_studentdash -->|"loads attendance"| node_attservice
node_studentdash -->|"loads profile"| node_studentservice
node_studentprofile -->|"loads profile"| node_studentservice
node_studentattendance -->|"loads attendance"| node_attservice
node_studentreports -.->|"uses attendance"| node_attservice
node_classservice -->|"requests"| node_apiclient
node_enrollservice -->|"requests"| node_apiclient
node_studentservice -->|"requests"| node_apiclient
node_attservice -->|"requests"| node_apiclient
node_sessionservice -->|"requests"| node_apiclient
node_historyservice -->|"requests"| node_apiclient
node_apiclient -->|"HTTP requests"| node_backend

click node_app "https://github.com/minet2943-byte/system_attendance/blob/main/src/App.jsx"
click node_routes "https://github.com/minet2943-byte/system_attendance/blob/main/src/routes/AppRoutes.jsx"
click node_teacherlayout "https://github.com/minet2943-byte/system_attendance/blob/main/src/layouts/TeacherLayout.jsx"
click node_studentlayout "https://github.com/minet2943-byte/system_attendance/blob/main/src/layouts/StudentLayout.jsx"
click node_authforms "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/auth/LoginForm.jsx"
click node_authcontext "https://github.com/minet2943-byte/system_attendance/blob/main/src/context/AuthContext.jsx"
click node_authservice "https://github.com/minet2943-byte/system_attendance/blob/main/src/services/authService.js"
click node_classes "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/ClassManagement.jsx"
click node_enrollment "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/EnrollmentManagement.jsx"
click node_roster "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/StudentRoster.jsx"
click node_marking "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/MarkAttendance.jsx"
click node_history "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/History.jsx"
click node_teacherdash "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/TeacherDashboard.jsx"
click node_studentdash "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/student/StudentDashboard.jsx"
click node_studentprofile "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/student/Profile.jsx"
click node_studentattendance "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/student/MyAttendance.jsx"
click node_studentreports "https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/student/StudentReports.jsx"
click node_classservice "https://github.com/minet2943-byte/system_attendance/blob/main/src/services/classService.js"
click node_enrollservice "https://github.com/minet2943-byte/system_attendance/blob/main/src/services/enrollService.js"
click node_studentservice "https://github.com/minet2943-byte/system_attendance/blob/main/src/services/studentService.js"
click node_attservice "https://github.com/minet2943-byte/system_attendance/blob/main/src/services/attendanceService.js"
click node_sessionservice "https://github.com/minet2943-byte/system_attendance/blob/main/src/services/attendanceSessionService.js"
click node_historyservice "https://github.com/minet2943-byte/system_attendance/blob/main/src/services/historyService.js"
click node_apiclient "https://github.com/minet2943-byte/system_attendance/blob/main/src/services/api.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_app,node_routes,node_teacherlayout,node_studentlayout toneBlue
class node_authforms,node_authcontext,node_authservice toneAmber
class node_classes,node_enrollment,node_roster,node_marking,node_history,node_teacherdash,node_backend toneMint
class node_studentdash,node_studentprofile,node_studentattendance,node_studentreports toneRose
class node_classservice,node_enrollservice,node_studentservice,node_attservice,node_sessionservice,node_historyservice,node_apiclient,node_teacher,node_student toneIndigo
```

## Components

### App and Routing

- [App Shell](https://github.com/minet2943-byte/system_attendance/blob/main/src/App.jsx): `src/App.jsx`
- [Role Routes](https://github.com/minet2943-byte/system_attendance/blob/main/src/routes/AppRoutes.jsx): `src/routes/AppRoutes.jsx`
- [Teacher Layout](https://github.com/minet2943-byte/system_attendance/blob/main/src/layouts/TeacherLayout.jsx): `src/layouts/TeacherLayout.jsx`
- [Student Layout](https://github.com/minet2943-byte/system_attendance/blob/main/src/layouts/StudentLayout.jsx): `src/layouts/StudentLayout.jsx`

### Identity and Access

- [Login and Register](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/auth/LoginForm.jsx): `src/pages/auth/LoginForm.jsx`
- [Auth State](https://github.com/minet2943-byte/system_attendance/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Auth Service](https://github.com/minet2943-byte/system_attendance/blob/main/src/services/authService.js): `src/services/authService.js`

### Teacher Workflows

- [Class Management](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/ClassManagement.jsx): `src/pages/teacher/ClassManagement.jsx`
- [Enrollment Management](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/EnrollmentManagement.jsx): `src/pages/teacher/EnrollmentManagement.jsx`
- [Student Roster](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/StudentRoster.jsx): `src/pages/teacher/StudentRoster.jsx`
- [Mark Attendance](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/MarkAttendance.jsx): `src/pages/teacher/MarkAttendance.jsx`
- [Attendance History](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/History.jsx): `src/pages/teacher/History.jsx`
- [Teacher Dashboard](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/teacher/TeacherDashboard.jsx): `src/pages/teacher/TeacherDashboard.jsx`

### Student Workflows

- [Student Dashboard](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/student/StudentDashboard.jsx): `src/pages/student/StudentDashboard.jsx`
- [Student Profile](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/student/Profile.jsx): `src/pages/student/Profile.jsx`
- [My Attendance](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/student/MyAttendance.jsx): `src/pages/student/MyAttendance.jsx`
- [Student Reports](https://github.com/minet2943-byte/system_attendance/blob/main/src/pages/student/StudentReports.jsx): `src/pages/student/StudentReports.jsx`

### API Services

- [Class Service](https://github.com/minet2943-byte/system_attendance/blob/main/src/services/classService.js): `src/services/classService.js`
- [Enrollment Service](https://github.com/minet2943-byte/system_attendance/blob/main/src/services/enrollService.js): `src/services/enrollService.js`
- [Student Service](https://github.com/minet2943-byte/system_attendance/blob/main/src/services/studentService.js): `src/services/studentService.js`
- [Attendance Service](https://github.com/minet2943-byte/system_attendance/blob/main/src/services/attendanceService.js): `src/services/attendanceService.js`
- [Session Service](https://github.com/minet2943-byte/system_attendance/blob/main/src/services/attendanceSessionService.js): `src/services/attendanceSessionService.js`
- [History Service](https://github.com/minet2943-byte/system_attendance/blob/main/src/services/historyService.js): `src/services/historyService.js`
- [HTTP Client](https://github.com/minet2943-byte/system_attendance/blob/main/src/services/api.js): `src/services/api.js`

### Other components

- **Teacher**
- **Student**
- **Attendance API**

## Connections

- App Shell → Role Routes: renders (evidence: `src/App.jsx`)
- App Shell → Auth State: provides auth (evidence: `src/App.jsx`)
- Role Routes → Auth State: checks roles (evidence: `src/routes/AppRoutes.jsx`)
- Role Routes → Login and Register: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Role Routes → Teacher Layout: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Role Routes → Student Layout: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Teacher → Role Routes: uses
- Student → Role Routes: uses
- Login and Register → Auth State: authenticates (evidence: `src/pages/auth/LoginForm.jsx`)
- Auth State → Auth Service: delegates auth (evidence: `src/context/AuthContext.jsx`)
- Auth Service → HTTP Client: requests (evidence: `src/services/authService.js`)
- Teacher Layout → Teacher Dashboard: hosts routes (evidence: `src/routes/AppRoutes.jsx`)
- Teacher Layout → Class Management: hosts routes (evidence: `src/routes/AppRoutes.jsx`)
- Teacher Layout → Enrollment Management: hosts routes
- Teacher Layout → Student Roster: hosts routes (evidence: `src/routes/AppRoutes.jsx`)
- Teacher Layout → Mark Attendance: hosts routes (evidence: `src/routes/AppRoutes.jsx`)
- Teacher Layout → Attendance History: hosts routes (evidence: `src/routes/AppRoutes.jsx`)
- Class Management → Class Service: manages classes (evidence: `src/pages/teacher/ClassManagement.jsx`)
- Class Management → Student Service: manages students (evidence: `src/pages/teacher/ClassManagement.jsx`)
- Class Management → Enrollment Service: enrolls students (evidence: `src/pages/teacher/ClassManagement.jsx`)
- Enrollment Management → Enrollment Service: manages enrollment (evidence: `src/pages/teacher/EnrollmentManagement.jsx`)
- Student Roster → Student Service: loads roster (evidence: `src/pages/teacher/StudentRoster.jsx`)
- Mark Attendance → Session Service: creates sessions (evidence: `src/pages/teacher/MarkAttendance.jsx`)
- Mark Attendance → Student Service: loads students (evidence: `src/pages/teacher/MarkAttendance.jsx`)
- Mark Attendance → Attendance Service: records attendance (evidence: `src/pages/teacher/MarkAttendance.jsx`)
- Mark Attendance → Class Service: loads classes (evidence: `src/pages/teacher/MarkAttendance.jsx`)
- Attendance History → History Service: loads history (evidence: `src/pages/teacher/History.jsx`)
- Attendance History → Class Service: loads classes (evidence: `src/pages/teacher/History.jsx`)
- Teacher Dashboard → Class Service: loads classes (evidence: `src/pages/teacher/TeacherDashboard.jsx`)
- Teacher Dashboard → Attendance Service: loads attendance (evidence: `src/pages/teacher/TeacherDashboard.jsx`)
- Student Layout → Student Dashboard: hosts routes (evidence: `src/routes/AppRoutes.jsx`)
- Student Layout → Student Profile: hosts routes (evidence: `src/routes/AppRoutes.jsx`)
- Student Dashboard → Attendance Service: loads attendance (evidence: `src/pages/student/StudentDashboard.jsx`)
- Student Dashboard → Student Service: loads profile (evidence: `src/pages/student/StudentDashboard.jsx`)
- Student Profile → Student Service: loads profile (evidence: `src/pages/student/Profile.jsx`)
- My Attendance → Attendance Service: loads attendance (evidence: `src/pages/student/MyAttendance.jsx`)
- Student Reports → Attendance Service: uses attendance
- Class Service → HTTP Client: requests (evidence: `src/services/classService.js`)
- Enrollment Service → HTTP Client: requests (evidence: `src/services/enrollService.js`)
- Student Service → HTTP Client: requests (evidence: `src/services/studentService.js`)
- Attendance Service → HTTP Client: requests (evidence: `src/services/attendanceService.js`)
- Session Service → HTTP Client: requests (evidence: `src/services/attendanceSessionService.js`)
- History Service → HTTP Client: requests (evidence: `src/services/historyService.js`)
- HTTP Client → Attendance API: HTTP requests (evidence: `src/services/api.js`)
