# kongnhel/class_management_system_3 architecture

> Architecture diagram of the GitHub repository kongnhel/class_management_system_3, 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/kongnhel/class_management_system_3
- Repository: https://github.com/kongnhel/class_management_system_3

## Overview

NMU Class Management System is a bilingual university portal for administrators, professors, and students. The main workflow is administrators configuring academic offerings and enrollment, professors recording attendance and assessment results, and students viewing courses, schedules, attendance, and grades. QR attendance has two documented paths: live-session scans and professor scans of student attendance cards. The graph also preserves announcements, progression, quizzes/submissions, AI assistance, and Telegram integrations. Sampled controllers and services support some links; other capability links reflect README documentation rather than inspected implementation.

Main entry points: [`app/Http/Controllers/Professor`](https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Professor) (Professor operations), [`app/Http/Controllers/Student`](https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Student) (Student services), [`app/Http/Controllers/Admin`](https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Admin) (Academic administration), [`app/Http/Controllers/SmartAssistantController.php`](https://github.com/kongnhel/class_management_system_3/blob/main/app/Http/Controllers/SmartAssistantController.php) (AI study assistant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_academic["Academic setup"]
  node_admin_routes["Admin routes<br/>[admin.php]"]
  node_admin_ops["Academic administration"]
  node_academic_records[("Academic records")]
  node_progression["Student progression"]
end

subgraph group_teaching["Teaching operations"]
  node_prof_routes["Professor routes<br/>[professor.php]"]
  node_prof_ops["Professor operations"]
  node_attendance["QR attendance"]
  node_grading["Grading<br/>[GradingService.php]"]
  node_assessments[("Assessments and submissions")]
end

subgraph group_student["Student portal"]
  node_student_routes["Student routes<br/>[student.php]"]
  node_student_ops["Student services"]
  node_student_records[("Student records")]
end

subgraph group_platform["Shared platform"]
  node_auth_routes["Authentication routes<br/>[auth.php]"]
  node_auth_ops["Authentication"]
  node_assistant["AI study assistant"]
  node_ai_context["Academic context"]
  node_telegram["Telegram services"]
  node_database[("MySQL database<br/>[database.php]")]
end

node_admin(("Administrator"))
node_professor(("Professor"))
node_student_actor(("Student"))
node_dify{{"Dify AI"}}
node_telegram_api{{"Telegram Bot API"}}

node_admin -->|"manages academics"| node_admin_routes
node_admin_routes -->|"routes admin work"| node_admin_ops
node_admin_ops -.->|"manages records"| node_academic_records
node_admin_ops -.->|"advances students"| node_progression
node_professor -->|"teaches classes"| node_prof_routes
node_prof_routes -->|"routes professor work"| node_prof_ops
node_prof_ops -.->|"manages sessions"| node_attendance
node_prof_ops -->|"records grades"| node_grading
node_prof_ops -->|"reviews submissions"| node_assessments
node_student_actor -->|"uses portal"| node_student_routes
node_student_routes -->|"routes student work"| node_student_ops
node_student_ops -->|"retrieves results"| node_grading
node_student_ops -.->|"reads attendance"| node_student_records
node_student_ops -.->|"checks in"| node_attendance
node_professor -->|"delivers grades"| node_telegram
node_telegram -->|"sends messages"| node_telegram_api
node_student_actor -->|"asks study questions"| node_assistant
node_assistant -->|"builds context"| node_ai_context
node_assistant -->|"requests AI answers"| node_dify
node_auth_routes -->|"routes sign-in"| node_auth_ops
node_academic_records -->|"persists data"| node_database
node_assessments -->|"persists results"| node_database
node_student_records -->|"persists records"| node_database

click node_admin_routes "https://github.com/kongnhel/class_management_system_3/blob/main/routes/admin.php"
click node_admin_ops "https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Admin"
click node_academic_records "https://github.com/kongnhel/class_management_system_3/tree/main/app/Models"
click node_progression "https://github.com/kongnhel/class_management_system_3/blob/main/app/Services/StudentProgressionService.php"
click node_prof_routes "https://github.com/kongnhel/class_management_system_3/blob/main/routes/professor.php"
click node_prof_ops "https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Professor"
click node_attendance "https://github.com/kongnhel/class_management_system_3/blob/main/app/Services/AttendanceSessionService.php"
click node_grading "https://github.com/kongnhel/class_management_system_3/blob/main/app/Services/GradingService.php"
click node_assessments "https://github.com/kongnhel/class_management_system_3/tree/main/app/Models"
click node_student_routes "https://github.com/kongnhel/class_management_system_3/blob/main/routes/student.php"
click node_student_ops "https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Student"
click node_student_records "https://github.com/kongnhel/class_management_system_3/tree/main/app/Models"
click node_auth_routes "https://github.com/kongnhel/class_management_system_3/blob/main/routes/auth.php"
click node_auth_ops "https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Auth"
click node_assistant "https://github.com/kongnhel/class_management_system_3/blob/main/app/Http/Controllers/SmartAssistantController.php"
click node_ai_context "https://github.com/kongnhel/class_management_system_3/blob/main/app/Services/AIContextService.php"
click node_telegram "https://github.com/kongnhel/class_management_system_3/blob/main/app/Services/TelegramBotService.php"
click node_database "https://github.com/kongnhel/class_management_system_3/blob/main/config/database.php"

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_admin_routes,node_admin_ops,node_academic_records,node_progression toneBlue
class node_prof_routes,node_prof_ops,node_attendance,node_grading,node_assessments toneAmber
class node_student_routes,node_student_ops,node_student_records,node_telegram_api toneMint
class node_auth_routes,node_auth_ops,node_assistant,node_ai_context,node_telegram,node_database toneRose
class node_admin,node_professor,node_student_actor,node_dify toneIndigo
```

## Components

### Academic setup

- [Admin routes](https://github.com/kongnhel/class_management_system_3/blob/main/routes/admin.php): `routes/admin.php`
- [Academic administration](https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Admin): `app/Http/Controllers/Admin`
- [Academic records](https://github.com/kongnhel/class_management_system_3/tree/main/app/Models): `app/Models`
- [Student progression](https://github.com/kongnhel/class_management_system_3/blob/main/app/Services/StudentProgressionService.php): `app/Services/StudentProgressionService.php`

### Teaching operations

- [Professor routes](https://github.com/kongnhel/class_management_system_3/blob/main/routes/professor.php): `routes/professor.php`
- [Professor operations](https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Professor): `app/Http/Controllers/Professor`
- [QR attendance](https://github.com/kongnhel/class_management_system_3/blob/main/app/Services/AttendanceSessionService.php): `app/Services/AttendanceSessionService.php`
- [Grading](https://github.com/kongnhel/class_management_system_3/blob/main/app/Services/GradingService.php): `app/Services/GradingService.php`
- [Assessments and submissions](https://github.com/kongnhel/class_management_system_3/tree/main/app/Models): `app/Models`

### Student portal

- [Student routes](https://github.com/kongnhel/class_management_system_3/blob/main/routes/student.php): `routes/student.php`
- [Student services](https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Student): `app/Http/Controllers/Student`
- [Student records](https://github.com/kongnhel/class_management_system_3/tree/main/app/Models): `app/Models`

### Shared platform

- [Authentication routes](https://github.com/kongnhel/class_management_system_3/blob/main/routes/auth.php): `routes/auth.php`
- [Authentication](https://github.com/kongnhel/class_management_system_3/tree/main/app/Http/Controllers/Auth): `app/Http/Controllers/Auth`
- [AI study assistant](https://github.com/kongnhel/class_management_system_3/blob/main/app/Http/Controllers/SmartAssistantController.php): `app/Http/Controllers/SmartAssistantController.php`
- [Academic context](https://github.com/kongnhel/class_management_system_3/blob/main/app/Services/AIContextService.php): `app/Services/AIContextService.php`
- [Telegram services](https://github.com/kongnhel/class_management_system_3/blob/main/app/Services/TelegramBotService.php): `app/Services/TelegramBotService.php`
- [MySQL database](https://github.com/kongnhel/class_management_system_3/blob/main/config/database.php): `config/database.php`

### Other components

- **Administrator**
- **Professor**
- **Student**
- **Dify AI**
- **Telegram Bot API**

## Connections

- Administrator → Admin routes: manages academics (evidence: `README.md`)
- Admin routes → Academic administration: routes admin work (evidence: `README.md`)
- Academic administration → Academic records: manages records (evidence: `app/Http/Controllers/Admin/CourseOfferingController.php`)
- Academic administration → Student progression: advances students (evidence: `app/Http/Controllers/Admin/UserController.php`)
- Professor → Professor routes: teaches classes (evidence: `README.md`)
- Professor routes → Professor operations: routes professor work (evidence: `README.md`)
- Professor operations → QR attendance: manages sessions
- Professor operations → Grading: records grades (evidence: `app/Http/Controllers/Professor/ProfessorGradeController.php`)
- Professor operations → Assessments and submissions: reviews submissions (evidence: `app/Http/Controllers/Professor/ProfessorController.php`)
- Student → Student routes: uses portal (evidence: `README.md`)
- Student routes → Student services: routes student work (evidence: `README.md`)
- Student services → Grading: retrieves results (evidence: `app/Http/Controllers/Student/StudentGradeController.php`)
- Student services → Student records: reads attendance (evidence: `app/Http/Controllers/Student/StudentGradeController.php`)
- Student services → QR attendance: checks in
- Professor → Telegram services: delivers grades
- Telegram services → Telegram Bot API: sends messages (evidence: `README.md`)
- Student → AI study assistant: asks study questions (evidence: `README.md`)
- AI study assistant → Academic context: builds context (evidence: `app/Http/Controllers/SmartAssistantController.php`)
- AI study assistant → Dify AI: requests AI answers (evidence: `README.md`)
- Authentication routes → Authentication: routes sign-in (evidence: `routes/auth.php`)
- Academic records → MySQL database: persists data (evidence: `README.md`)
- Assessments and submissions → MySQL database: persists results (evidence: `README.md`)
- Student records → MySQL database: persists records (evidence: `README.md`)
