# antonious-sameh/mina-deab-front architecture

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

- Interactive diagram: https://gitdiagram.com/antonious-sameh/mina-deab-front
- Repository: https://github.com/antonious-sameh/mina-deab-front

## Overview

This is a role-based education management app for teachers and students. Users enter through the routed React app, authenticate, and reach role-specific pages; those pages use a shared API service layer to communicate with the backend. The tree also documents attendance, student and group management, exams, grades, online materials, and related learning features. Source excerpts confirm selected routing, authentication, attendance, PDF, and API relationships; other feature pages are represented without guessing their internal calls.

Main entry points: [`src/api/services.js`](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/api/services.js) (API Services), [`src/contexts/AuthContext.jsx`](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/contexts/AuthContext.jsx) (Authentication), [`src/App.jsx`](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/App.jsx) (Router & Layout), [`src/api/axios.js`](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/api/axios.js) (HTTP & Tokens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Shell"]
  node_app["Router &amp; Layout<br/>[App.jsx]"]
end

subgraph group_identity["Identity &amp; Session"]
  node_auth["Authentication<br/>[AuthContext.jsx]"]
  node_passkey["Passkey Login<br/>[passkey.js]"]
  node_session["HTTP &amp; Tokens<br/>[axios.js]"]
end

subgraph group_teaching["Teaching Operations"]
  node_attendance["Attendance<br/>[AttendancePage.jsx]"]
  node_groups["Groups<br/>[GroupsPage.jsx]"]
  node_students["Student Records<br/>[StudentsPage.jsx]"]
  node_payments["Payments<br/>[PaymentsPage.jsx]"]
  node_teacher_exams["Teacher Exams<br/>[ExamsPage.jsx]"]
  node_teacher_grades["Teacher Grades<br/>[GradesPage.jsx]"]
  node_teacher_online["Online Materials<br/>[OnlinePage.jsx]"]
  node_teacher_features["Teacher Tools"]
end

subgraph group_learning["Student Learning"]
  node_student_home["Student Home"]
  node_student_attendance["Student Attendance"]
  node_student_exams["Student Exams"]
  node_exam_interface["Exam Interface"]
  node_student_online["Student Online"]
  node_student_features["Student Tools"]
end

subgraph group_platform["Shared Platform"]
  node_api["API Services<br/>[services.js]"]
  node_notifications["Notifications"]
  node_pdf["PDF Viewer<br/>[PDFViewer.jsx]"]
  node_safe_storage["Safe Storage<br/>[safe-storage.js]"]
  node_ui_button["Button UI<br/>[button.jsx]"]
  node_ui_badge["Badge UI<br/>[badge.jsx]"]
  node_ui_card["Card UI<br/>[card.jsx]"]
  node_ui_input["Input UI<br/>[input.jsx]"]
end

node_teacher(("Teacher"))
node_student(("Student"))
node_backend["Application Backend"]

node_teacher -.->|"uses"| node_app
node_student -.->|"uses"| node_app
node_app -->|"provides session"| node_auth
node_auth -->|"auth requests"| node_api
node_auth -->|"delegates login"| node_passkey
node_auth -->|"refreshes tokens"| node_session
node_api -->|"sends requests"| node_session
node_session -->|"requests"| node_backend
node_attendance -->|"loads attendance"| node_api
node_groups -->|"loads groups"| node_api
node_students -->|"loads students"| node_api
node_teacher_exams -->|"uses services"| node_api
node_teacher_grades -->|"uses services"| node_api
node_teacher_online -->|"uses services"| node_api
node_student_exams -->|"uses services"| node_api
node_student_online -->|"uses services"| node_api
node_notifications -->|"fetches notes"| node_api
node_notifications -->|"reads user"| node_auth
node_student_exams -->|"renders documents"| node_pdf
node_student_online -->|"renders documents"| node_pdf
node_teacher_online -->|"renders documents"| node_pdf
node_auth -->|"persists session"| node_safe_storage

click node_app "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/App.jsx"
click node_auth "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/contexts/AuthContext.jsx"
click node_passkey "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/lib/passkey.js"
click node_session "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/api/axios.js"
click node_api "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/api/services.js"
click node_attendance "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/AttendancePage.jsx"
click node_groups "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/GroupsPage.jsx"
click node_students "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/StudentsPage.jsx"
click node_payments "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/PaymentsPage.jsx"
click node_teacher_exams "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/teacher/ExamsPage.jsx"
click node_teacher_grades "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/teacher/GradesPage.jsx"
click node_teacher_online "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/teacher/OnlinePage.jsx"
click node_teacher_features "https://github.com/antonious-sameh/mina-deab-front/tree/main/src/pages/teacher"
click node_student_home "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/student/StudentHomePage.jsx"
click node_student_attendance "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/student/StudentAttendancePage.jsx"
click node_student_exams "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/student/StudentExamsPage.jsx"
click node_exam_interface "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/student/ExamInterfacePage.jsx"
click node_student_online "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/student/StudentOnlinePage.jsx"
click node_student_features "https://github.com/antonious-sameh/mina-deab-front/tree/main/src/pages/student"
click node_notifications "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/contexts/NotificationContext.jsx"
click node_pdf "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/components/PDFViewer.jsx"
click node_safe_storage "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/lib/safe-storage.js"
click node_ui_button "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/components/ui/button.jsx"
click node_ui_badge "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/components/ui/badge.jsx"
click node_ui_card "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/components/ui/card.jsx"
click node_ui_input "https://github.com/antonious-sameh/mina-deab-front/blob/main/src/components/ui/input.jsx"

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 toneBlue
class node_auth,node_passkey,node_session toneAmber
class node_attendance,node_groups,node_students,node_payments,node_teacher_exams,node_teacher_grades,node_teacher_online,node_teacher_features toneMint
class node_student_home,node_student_attendance,node_student_exams,node_exam_interface,node_student_online,node_student_features toneRose
class node_api,node_notifications,node_pdf,node_safe_storage,node_ui_button,node_ui_badge,node_ui_card,node_ui_input,node_teacher,node_student,node_backend toneIndigo
```

## Components

### Application Shell

- [Router & Layout](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/App.jsx): `src/App.jsx`

### Identity & Session

- [Authentication](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/contexts/AuthContext.jsx): `src/contexts/AuthContext.jsx`
- [Passkey Login](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/lib/passkey.js): `src/lib/passkey.js`
- [HTTP & Tokens](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/api/axios.js): `src/api/axios.js`

### Teaching Operations

- [Attendance](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/AttendancePage.jsx): `src/pages/AttendancePage.jsx`
- [Groups](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/GroupsPage.jsx): `src/pages/GroupsPage.jsx`
- [Student Records](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/StudentsPage.jsx): `src/pages/StudentsPage.jsx`
- [Payments](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/PaymentsPage.jsx): `src/pages/PaymentsPage.jsx`
- [Teacher Exams](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/teacher/ExamsPage.jsx): `src/pages/teacher/ExamsPage.jsx`
- [Teacher Grades](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/teacher/GradesPage.jsx): `src/pages/teacher/GradesPage.jsx`
- [Online Materials](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/teacher/OnlinePage.jsx): `src/pages/teacher/OnlinePage.jsx`
- [Teacher Tools](https://github.com/antonious-sameh/mina-deab-front/tree/main/src/pages/teacher): `src/pages/teacher`

### Student Learning

- [Student Home](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/student/StudentHomePage.jsx): `src/pages/student/StudentHomePage.jsx`
- [Student Attendance](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/student/StudentAttendancePage.jsx): `src/pages/student/StudentAttendancePage.jsx`
- [Student Exams](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/student/StudentExamsPage.jsx): `src/pages/student/StudentExamsPage.jsx`
- [Exam Interface](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/student/ExamInterfacePage.jsx): `src/pages/student/ExamInterfacePage.jsx`
- [Student Online](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/pages/student/StudentOnlinePage.jsx): `src/pages/student/StudentOnlinePage.jsx`
- [Student Tools](https://github.com/antonious-sameh/mina-deab-front/tree/main/src/pages/student): `src/pages/student`

### Shared Platform

- [API Services](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/api/services.js): `src/api/services.js`
- [Notifications](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/contexts/NotificationContext.jsx): `src/contexts/NotificationContext.jsx`
- [PDF Viewer](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/components/PDFViewer.jsx): `src/components/PDFViewer.jsx`
- [Safe Storage](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/lib/safe-storage.js): `src/lib/safe-storage.js`
- [Button UI](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/components/ui/button.jsx): `src/components/ui/button.jsx`
- [Badge UI](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/components/ui/badge.jsx): `src/components/ui/badge.jsx`
- [Card UI](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/components/ui/card.jsx): `src/components/ui/card.jsx`
- [Input UI](https://github.com/antonious-sameh/mina-deab-front/blob/main/src/components/ui/input.jsx): `src/components/ui/input.jsx`

### Other components

- **Teacher**
- **Student**
- **Application Backend**

## Connections

- Teacher → Router & Layout: uses
- Student → Router & Layout: uses
- Router & Layout → Authentication: provides session (evidence: `src/App.jsx`)
- Authentication → API Services: auth requests (evidence: `src/contexts/AuthContext.jsx`)
- Authentication → Passkey Login: delegates login (evidence: `src/contexts/AuthContext.jsx`)
- Authentication → HTTP & Tokens: refreshes tokens (evidence: `src/contexts/AuthContext.jsx`)
- API Services → HTTP & Tokens: sends requests (evidence: `src/api/services.js`)
- HTTP & Tokens → Application Backend: requests (evidence: `src/api/axios.js`)
- Attendance → API Services: loads attendance (evidence: `src/pages/AttendancePage.jsx`)
- Groups → API Services: loads groups (evidence: `src/pages/GroupsPage.jsx`)
- Student Records → API Services: loads students (evidence: `src/pages/StudentsPage.jsx`)
- Teacher Exams → API Services: uses services (evidence: `src/pages/teacher/ExamsPage.jsx`)
- Teacher Grades → API Services: uses services (evidence: `src/pages/teacher/GradesPage.jsx`)
- Online Materials → API Services: uses services (evidence: `src/pages/teacher/OnlinePage.jsx`)
- Student Exams → API Services: uses services (evidence: `src/pages/student/StudentExamsPage.jsx`)
- Student Online → API Services: uses services (evidence: `src/pages/student/StudentOnlinePage.jsx`)
- Notifications → API Services: fetches notes (evidence: `src/contexts/NotificationContext.jsx`)
- Notifications → Authentication: reads user (evidence: `src/contexts/NotificationContext.jsx`)
- Student Exams → PDF Viewer: renders documents (evidence: `src/pages/student/StudentExamsPage.jsx`)
- Student Online → PDF Viewer: renders documents (evidence: `src/pages/student/StudentOnlinePage.jsx`)
- Online Materials → PDF Viewer: renders documents (evidence: `src/pages/teacher/OnlinePage.jsx`)
- Authentication → Safe Storage: persists session (evidence: `src/contexts/AuthContext.jsx`)
