# yongmingja/school2 architecture

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

- Interactive diagram: https://gitdiagram.com/yongmingja/school2
- Repository: https://github.com/yongmingja/school2

## Overview

Harmony is a music-school management application for administrators, teachers, students, and parents. Its main workflow is managing students and lessons, recording attendance and progress reports, and handling invoices and payments; role-specific dashboards and calendar/scheduling support that work. Laravel controllers route requests and render Inertia pages, with Eloquent models representing the domain. The source index and excerpts support several controller-to-page and model relationships, but many listed capabilities were not sampled, so their internal links are omitted rather than inferred.

Main entry points: [`routes/web.php`](https://github.com/yongmingja/school2/blob/main/routes/web.php) (Web routes), [`app/Models/Student.php`](https://github.com/yongmingja/school2/blob/main/app/Models/Student.php) (People records), [`app/Models/Lesson.php`](https://github.com/yongmingja/school2/blob/main/app/Models/Lesson.php) (Lesson records), [`app/Http/Controllers/Teacher/LessonReportController.php`](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Teacher/LessonReportController.php) (Teacher reporting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and dashboards"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication"]
  node_admin_dashboard["Admin dashboard"]
  node_role_dashboards["Role dashboards"]
end

subgraph group_academics["School operations"]
  node_student_admin["Student management"]
  node_student_pages["Student pages<br/>[Index.tsx]"]
  node_staff_admin["Staff and guardians"]
  node_calendar_admin["Calendar management"]
end

subgraph group_teaching["Lessons and reports"]
  node_lesson_admin["Lesson management"]
  node_teacher_schedule["Teacher schedule"]
  node_report_workflow["Teacher reporting"]
  node_report_page["Report form"]
  node_reminders["Lesson reminders"]
end

subgraph group_finance["Billing"]
  node_payment_admin["Payment management"]
  node_invoice_flags["Overdue invoices"]
end

subgraph group_domain["Domain records"]
  node_school_records[("School records<br/>[AcademicYear.php]")]
  node_people_records[("People records<br/>[Student.php]")]
  node_lesson_records[("Lesson records<br/>[Lesson.php]")]
  node_billing_records[("Invoice and payment records<br/>[Invoice.php]")]
end

node_admin(("Administrator"))
node_teacher(("Teacher"))
node_student(("Student"))
node_parent(("Parent / guardian"))

node_admin -->|"uses"| node_web_routes
node_teacher -->|"uses"| node_web_routes
node_student -->|"uses"| node_web_routes
node_parent -->|"uses"| node_web_routes
node_web_routes -->|"routes to"| node_auth
node_web_routes -->|"routes to"| node_student_admin
node_web_routes -->|"routes to"| node_staff_admin
node_web_routes -->|"routes to"| node_lesson_admin
node_web_routes -->|"routes to"| node_payment_admin
node_web_routes -->|"routes to"| node_calendar_admin
node_web_routes -->|"routes to"| node_teacher_schedule
node_student_admin -->|"renders"| node_student_pages
node_student_admin -->|"reads and writes"| node_people_records
node_student_admin -->|"reads"| node_school_records
node_lesson_admin -->|"reads"| node_lesson_records
node_report_workflow -->|"renders"| node_report_page
node_report_workflow -->|"loads lesson"| node_lesson_records
node_report_workflow -->|"loads students"| node_people_records
node_report_workflow -->|"updates status"| node_lesson_records
node_payment_admin -->|"reads and writes"| node_billing_records
node_people_records -->|"relates lessons"| node_lesson_records
node_people_records -->|"relates invoices"| node_billing_records
node_lesson_records -->|"belongs to semester"| node_school_records
node_billing_records -->|"belongs to student"| node_people_records
node_billing_records -->|"belongs to semester"| node_school_records

click node_web_routes "https://github.com/yongmingja/school2/blob/main/routes/web.php"
click node_auth "https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_admin_dashboard "https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/DashboardController.php"
click node_role_dashboards "https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Parent/DashboardController.php"
click node_student_admin "https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/StudentController.php"
click node_student_pages "https://github.com/yongmingja/school2/blob/main/resources/js/pages/Admin/Students/Index.tsx"
click node_staff_admin "https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/TeacherController.php"
click node_calendar_admin "https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/CalendarEventController.php"
click node_lesson_admin "https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/LessonController.php"
click node_teacher_schedule "https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Teacher/ScheduleController.php"
click node_report_workflow "https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Teacher/LessonReportController.php"
click node_report_page "https://github.com/yongmingja/school2/blob/main/resources/js/pages/Teacher/LessonReportForm.tsx"
click node_reminders "https://github.com/yongmingja/school2/blob/main/app/Console/Commands/SendLessonReminders.php"
click node_payment_admin "https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/PaymentController.php"
click node_invoice_flags "https://github.com/yongmingja/school2/blob/main/app/Console/Commands/FlagOverdueInvoices.php"
click node_school_records "https://github.com/yongmingja/school2/blob/main/app/Models/AcademicYear.php"
click node_people_records "https://github.com/yongmingja/school2/blob/main/app/Models/Student.php"
click node_lesson_records "https://github.com/yongmingja/school2/blob/main/app/Models/Lesson.php"
click node_billing_records "https://github.com/yongmingja/school2/blob/main/app/Models/Invoice.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_web_routes,node_auth,node_admin_dashboard,node_role_dashboards toneBlue
class node_student_admin,node_student_pages,node_staff_admin,node_calendar_admin toneAmber
class node_lesson_admin,node_teacher_schedule,node_report_workflow,node_report_page,node_reminders toneMint
class node_payment_admin,node_invoice_flags toneRose
class node_school_records,node_people_records,node_lesson_records,node_billing_records,node_admin,node_teacher,node_student,node_parent toneIndigo
```

## Components

### Access and dashboards

- [Web routes](https://github.com/yongmingja/school2/blob/main/routes/web.php): `routes/web.php`
- [Authentication](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Admin dashboard](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/DashboardController.php): `app/Http/Controllers/Admin/DashboardController.php`
- [Role dashboards](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Parent/DashboardController.php): `app/Http/Controllers/Parent/DashboardController.php`

### School operations

- [Student management](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/StudentController.php): `app/Http/Controllers/Admin/StudentController.php`
- [Student pages](https://github.com/yongmingja/school2/blob/main/resources/js/pages/Admin/Students/Index.tsx): `resources/js/pages/Admin/Students/Index.tsx`
- [Staff and guardians](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/TeacherController.php): `app/Http/Controllers/Admin/TeacherController.php`
- [Calendar management](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/CalendarEventController.php): `app/Http/Controllers/Admin/CalendarEventController.php`

### Lessons and reports

- [Lesson management](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/LessonController.php): `app/Http/Controllers/Admin/LessonController.php`
- [Teacher schedule](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Teacher/ScheduleController.php): `app/Http/Controllers/Teacher/ScheduleController.php`
- [Teacher reporting](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Teacher/LessonReportController.php): `app/Http/Controllers/Teacher/LessonReportController.php`
- [Report form](https://github.com/yongmingja/school2/blob/main/resources/js/pages/Teacher/LessonReportForm.tsx): `resources/js/pages/Teacher/LessonReportForm.tsx`
- [Lesson reminders](https://github.com/yongmingja/school2/blob/main/app/Console/Commands/SendLessonReminders.php): `app/Console/Commands/SendLessonReminders.php`

### Billing

- [Payment management](https://github.com/yongmingja/school2/blob/main/app/Http/Controllers/Admin/PaymentController.php): `app/Http/Controllers/Admin/PaymentController.php`
- [Overdue invoices](https://github.com/yongmingja/school2/blob/main/app/Console/Commands/FlagOverdueInvoices.php): `app/Console/Commands/FlagOverdueInvoices.php`

### Domain records

- [School records](https://github.com/yongmingja/school2/blob/main/app/Models/AcademicYear.php): `app/Models/AcademicYear.php`
- [People records](https://github.com/yongmingja/school2/blob/main/app/Models/Student.php): `app/Models/Student.php`
- [Lesson records](https://github.com/yongmingja/school2/blob/main/app/Models/Lesson.php): `app/Models/Lesson.php`
- [Invoice and payment records](https://github.com/yongmingja/school2/blob/main/app/Models/Invoice.php): `app/Models/Invoice.php`

### Other components

- **Administrator**
- **Teacher**
- **Student**
- **Parent / guardian**

## Connections

- Administrator → Web routes: uses (evidence: `routes/web.php`)
- Teacher → Web routes: uses (evidence: `routes/web.php`)
- Student → Web routes: uses (evidence: `routes/web.php`)
- Parent / guardian → Web routes: uses (evidence: `routes/web.php`)
- Web routes → Authentication: routes to (evidence: `routes/web.php`)
- Web routes → Student management: routes to (evidence: `routes/web.php`)
- Web routes → Staff and guardians: routes to (evidence: `routes/web.php`)
- Web routes → Lesson management: routes to (evidence: `routes/web.php`)
- Web routes → Payment management: routes to (evidence: `routes/web.php`)
- Web routes → Calendar management: routes to (evidence: `routes/web.php`)
- Web routes → Teacher schedule: routes to (evidence: `routes/web.php`)
- Student management → Student pages: renders (evidence: `app/Http/Controllers/Admin/StudentController.php`)
- Student management → People records: reads and writes (evidence: `app/Http/Controllers/Admin/StudentController.php`)
- Student management → School records: reads (evidence: `app/Http/Controllers/Admin/StudentController.php`)
- Lesson management → Lesson records: reads (evidence: `app/Http/Controllers/Admin/LessonController.php`)
- Teacher reporting → Report form: renders (evidence: `app/Http/Controllers/Teacher/LessonReportController.php`)
- Teacher reporting → Lesson records: loads lesson (evidence: `app/Http/Controllers/Teacher/LessonReportController.php`)
- Teacher reporting → People records: loads students (evidence: `app/Http/Controllers/Teacher/LessonReportController.php`)
- Teacher reporting → Lesson records: updates status (evidence: `app/Http/Controllers/Teacher/LessonReportController.php`)
- Payment management → Invoice and payment records: reads and writes (evidence: `app/Http/Controllers/Admin/PaymentController.php`)
- People records → Lesson records: relates lessons (evidence: `app/Models/Student.php`)
- People records → Invoice and payment records: relates invoices (evidence: `app/Models/Student.php`)
- Lesson records → School records: belongs to semester (evidence: `app/Models/Lesson.php`)
- Invoice and payment records → People records: belongs to student (evidence: `app/Models/Invoice.php`)
- Invoice and payment records → School records: belongs to semester (evidence: `app/Models/Invoice.php`)
