# reee00/learning-report-system architecture

> Architecture diagram of the GitHub repository reee00/learning-report-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/reee00/learning-report-system
- Repository: https://github.com/reee00/learning-report-system

## Overview

LRS is a role-based learning-reporting web application. The main workflow is coach-authored reports with lesson details, attendance and media, followed by operational approval or rejection and school PIC monitoring of approved reports. Separate branches cover master-data administration, student import, attendance export and access control. The README documents these capabilities; sampled code confirms key report, authorization, student and PIC behavior, but unsampled controller and route wiring is not assumed.

Main entry points: [`app/Http/Controllers/Coach/ReportController.php`](https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/Coach/ReportController.php) (Coach report entry), [`app/Http/Controllers/Admin/SchoolController.php`](https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/Admin/SchoolController.php) (Master data admin), [`app/Services/AuthorizationService.php`](https://github.com/reee00/learning-report-system/blob/main/app/Services/AuthorizationService.php) (Authorization), [`app/Services/MediaStorageService.php`](https://github.com/reee00/learning-report-system/blob/main/app/Services/MediaStorageService.php) (Media storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access &amp; Roles"]
  node_users["Users<br/>[User.php]"]
  node_login["Login"]
  node_authorization["Authorization"]
  node_roles["Role middleware<br/>[RoleMiddleware.php]"]
end

subgraph group_operations["Operations &amp; Master Data"]
  node_admin_master["Master data admin"]
  node_school["Schools<br/>[School.php]"]
  node_classes["Classes &amp; programs<br/>[SchoolClass.php]"]
  node_program["Programs<br/>[Program.php]"]
  node_students["Student management"]
  node_student_import["Student import<br/>[StudentsImport.php]"]
  node_student_model["Students<br/>[Student.php]"]
end

subgraph group_reporting["Learning Reports"]
  node_coach_reports["Coach report entry"]
  node_report["Learning reports<br/>[Report.php]"]
  node_attendance_records["Report attendance"]
  node_media_records["Report media<br/>[ReportMedia.php]"]
end

subgraph group_monitoring["Attendance &amp; Review"]
  node_review["Report review"]
  node_pic["School PIC monitoring"]
  node_attendance["Attendance records"]
end

subgraph group_media["Media &amp; Export"]
  node_attendance_export["Attendance export"]
  node_media_storage["Media storage"]
  node_cloudinary["Cloudinary"]
end

node_database[("Application database")]
node_coach_actor(("Coach"))
node_admin_actor(("Operations staff"))
node_pic_actor(("School PIC"))
node_excel["Excel file"]

node_coach_actor -->|"signs in"| node_login
node_login -->|"authenticates"| node_users
node_login -->|"routes by role"| node_coach_reports
node_admin_actor -->|"manages records"| node_admin_master
node_admin_master -->|"checks access"| node_authorization
node_admin_master -->|"manages schools"| node_school
node_admin_master -->|"manages classes"| node_classes
node_admin_master -->|"manages programs"| node_program
node_students -->|"checks access"| node_authorization
node_students -->|"creates or deletes"| node_student_model
node_excel -->|"uploads roster"| node_students
node_students -->|"imports roster"| node_student_import
node_student_import -->|"creates students"| node_student_model
node_coach_actor -->|"submits report"| node_coach_reports
node_coach_reports -->|"checks permissions"| node_authorization
node_coach_reports -->|"creates or updates"| node_report
node_coach_reports -->|"syncs attendance"| node_attendance_records
node_coach_reports -->|"stores uploads"| node_media_storage
node_media_storage -->|"creates records"| node_media_records
node_media_storage -->|"persists metadata"| node_database
node_admin_actor -->|"reviews submission"| node_review
node_review -->|"checks access"| node_authorization
node_review -->|"approves or rejects"| node_report
node_pic_actor -->|"monitors reports"| node_pic
node_pic -->|"reads approved reports"| node_report
node_attendance -->|"checks permissions"| node_authorization
node_attendance -->|"requests export"| node_attendance_export
node_attendance_export -->|"reads attendance"| node_database
node_media_storage -.->|"uses legacy media"| node_cloudinary

click node_users "https://github.com/reee00/learning-report-system/blob/main/app/Models/User.php"
click node_login "https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/Auth/LoginController.php"
click node_authorization "https://github.com/reee00/learning-report-system/blob/main/app/Services/AuthorizationService.php"
click node_roles "https://github.com/reee00/learning-report-system/blob/main/app/Http/Middleware/RoleMiddleware.php"
click node_admin_master "https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/Admin/SchoolController.php"
click node_school "https://github.com/reee00/learning-report-system/blob/main/app/Models/School.php"
click node_classes "https://github.com/reee00/learning-report-system/blob/main/app/Models/SchoolClass.php"
click node_program "https://github.com/reee00/learning-report-system/blob/main/app/Models/Program.php"
click node_students "https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/StudentController.php"
click node_student_import "https://github.com/reee00/learning-report-system/blob/main/app/Imports/StudentsImport.php"
click node_student_model "https://github.com/reee00/learning-report-system/blob/main/app/Models/Student.php"
click node_coach_reports "https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/Coach/ReportController.php"
click node_report "https://github.com/reee00/learning-report-system/blob/main/app/Models/Report.php"
click node_attendance_records "https://github.com/reee00/learning-report-system/blob/main/app/Models/ReportAttendance.php"
click node_media_records "https://github.com/reee00/learning-report-system/blob/main/app/Models/ReportMedia.php"
click node_review "https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/Admin/ReportController.php"
click node_pic "https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/SchoolPic/DashboardController.php"
click node_attendance "https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/AttendanceController.php"
click node_attendance_export "https://github.com/reee00/learning-report-system/blob/main/app/Services/AttendanceExportService.php"
click node_media_storage "https://github.com/reee00/learning-report-system/blob/main/app/Services/MediaStorageService.php"
click node_cloudinary "https://github.com/reee00/learning-report-system/blob/main/app/Helpers/CloudinaryHelper.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_users,node_login,node_authorization,node_roles toneBlue
class node_admin_master,node_school,node_classes,node_program,node_students,node_student_import,node_student_model,node_database toneAmber
class node_coach_reports,node_report,node_attendance_records,node_media_records toneMint
class node_review,node_pic,node_attendance toneRose
class node_attendance_export,node_media_storage,node_cloudinary,node_coach_actor,node_admin_actor,node_pic_actor,node_excel toneIndigo
```

## Components

### Access & Roles

- [Users](https://github.com/reee00/learning-report-system/blob/main/app/Models/User.php): `app/Models/User.php`
- [Login](https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`
- [Authorization](https://github.com/reee00/learning-report-system/blob/main/app/Services/AuthorizationService.php): `app/Services/AuthorizationService.php`
- [Role middleware](https://github.com/reee00/learning-report-system/blob/main/app/Http/Middleware/RoleMiddleware.php): `app/Http/Middleware/RoleMiddleware.php`

### Operations & Master Data

- [Master data admin](https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/Admin/SchoolController.php): `app/Http/Controllers/Admin/SchoolController.php`
- [Schools](https://github.com/reee00/learning-report-system/blob/main/app/Models/School.php): `app/Models/School.php`
- [Classes & programs](https://github.com/reee00/learning-report-system/blob/main/app/Models/SchoolClass.php): `app/Models/SchoolClass.php`
- [Programs](https://github.com/reee00/learning-report-system/blob/main/app/Models/Program.php): `app/Models/Program.php`
- [Student management](https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/StudentController.php): `app/Http/Controllers/StudentController.php`
- [Student import](https://github.com/reee00/learning-report-system/blob/main/app/Imports/StudentsImport.php): `app/Imports/StudentsImport.php`
- [Students](https://github.com/reee00/learning-report-system/blob/main/app/Models/Student.php): `app/Models/Student.php`

### Learning Reports

- [Coach report entry](https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/Coach/ReportController.php): `app/Http/Controllers/Coach/ReportController.php`
- [Learning reports](https://github.com/reee00/learning-report-system/blob/main/app/Models/Report.php): `app/Models/Report.php`
- [Report attendance](https://github.com/reee00/learning-report-system/blob/main/app/Models/ReportAttendance.php): `app/Models/ReportAttendance.php`
- [Report media](https://github.com/reee00/learning-report-system/blob/main/app/Models/ReportMedia.php): `app/Models/ReportMedia.php`

### Attendance & Review

- [Report review](https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/Admin/ReportController.php): `app/Http/Controllers/Admin/ReportController.php`
- [School PIC monitoring](https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/SchoolPic/DashboardController.php): `app/Http/Controllers/SchoolPic/DashboardController.php`
- [Attendance records](https://github.com/reee00/learning-report-system/blob/main/app/Http/Controllers/AttendanceController.php): `app/Http/Controllers/AttendanceController.php`

### Media & Export

- [Attendance export](https://github.com/reee00/learning-report-system/blob/main/app/Services/AttendanceExportService.php): `app/Services/AttendanceExportService.php`
- [Media storage](https://github.com/reee00/learning-report-system/blob/main/app/Services/MediaStorageService.php): `app/Services/MediaStorageService.php`
- [Cloudinary](https://github.com/reee00/learning-report-system/blob/main/app/Helpers/CloudinaryHelper.php): `app/Helpers/CloudinaryHelper.php`

### Other components

- **Application database**
- **Coach**
- **Operations staff**
- **School PIC**
- **Excel file**

## Connections

- Coach → Login: signs in
- Login → Users: authenticates
- Login → Coach report entry: routes by role
- Operations staff → Master data admin: manages records
- Master data admin → Authorization: checks access
- Master data admin → Schools: manages schools
- Master data admin → Classes & programs: manages classes
- Master data admin → Programs: manages programs
- Student management → Authorization: checks access
- Student management → Students: creates or deletes
- Excel file → Student management: uploads roster
- Student management → Student import: imports roster
- Student import → Students: creates students
- Coach → Coach report entry: submits report
- Coach report entry → Authorization: checks permissions
- Coach report entry → Learning reports: creates or updates
- Coach report entry → Report attendance: syncs attendance
- Coach report entry → Media storage: stores uploads
- Media storage → Report media: creates records
- Media storage → Application database: persists metadata
- Operations staff → Report review: reviews submission
- Report review → Authorization: checks access
- Report review → Learning reports: approves or rejects
- School PIC → School PIC monitoring: monitors reports
- School PIC monitoring → Learning reports: reads approved reports
- Attendance records → Authorization: checks permissions
- Attendance records → Attendance export: requests export
- Attendance export → Application database: reads attendance
- Media storage → Cloudinary: uses legacy media
