# tlar2411/school_template_v1 architecture

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

- Interactive diagram: https://gitdiagram.com/tlar2411/school_template_v1
- Repository: https://github.com/tlar2411/school_template_v1

## Overview

This repository is a school-management application with a Vue web client and Laravel API, alongside reusable Admin, Loan, HR, and Accounting parts. A typical school workflow is staff using school pages to manage attendance, classes, and scores; the API exposes domain operations and models represent school records. The README also documents authentication, user/branch administration, and part switching. The source index supports several controller-to-model and service relationships; many frontend and route implementations were not sampled, so those links are omitted rather than inferred.

Main entry points: [`API/app/Models/User.php`](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Models/User.php) (User records), [`API/app/Models/Core/Branch.php`](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Models/Core/Branch.php) (Branch records), [`API/app/Http/Controllers/Api/Auth/AuthController.php`](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/Auth/AuthController.php) (Web authentication), [`API/app/Http/Controllers/Api/UserController.php`](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/UserController.php) (User administration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_school_ui["School pages"]
  node_other_parts["Other part pages"]
  node_web_api["API client<br/>[api.js]"]
end

subgraph group_school["School operations"]
  node_attendance["Attendance"]
  node_score_entry["Score entry"]
  node_attendance_reports["Attendance reports"]
  node_score_deadlines["Score deadlines"]
end

subgraph group_admin["Identity and administration"]
  node_auth_api["Web authentication<br/>[AuthController.php]"]
  node_user_admin["User administration<br/>[UserController.php]"]
  node_activity_log["Activity log"]
  node_address_admin["Address administration"]
end

subgraph group_app["Mobile and messaging"]
  node_app_routes["Mobile API routes<br/>[app.route.php]"]
  node_app_login["Mobile login"]
  node_telegram_link["Telegram connection"]
end

subgraph group_domain["Domain data"]
  node_controller_base["Controller utilities<br/>[Controller.php]"]
  node_user_model[("User records<br/>[User.php]")]
  node_branch_model[("Branch records<br/>[Branch.php]")]
  node_user_branch[("User branches<br/>[UserBranch.php]")]
  node_teacher_model[("Teacher records<br/>[Teacher.php]")]
  node_school_records[("School records")]
  node_datatable["Table response"]
end

node_staff(("Staff user"))
node_telegram_service["Telegram API"]

node_staff -->|"uses"| node_school_ui
node_staff -->|"switches parts"| node_other_parts
node_school_ui -.->|"requests data"| node_web_api
node_auth_api -->|"authenticates"| node_user_model
node_auth_api -->|"loads branches"| node_branch_model
node_auth_api -->|"loads assignments"| node_user_branch
node_user_admin -->|"manages users"| node_user_model
node_user_admin -->|"formats tables"| node_datatable
node_user_admin -->|"updates assignments"| node_user_branch
node_activity_log -->|"formats tables"| node_datatable
node_address_admin -->|"formats tables"| node_datatable
node_attendance -->|"builds reports"| node_attendance_reports
node_attendance -->|"reads and writes"| node_school_records
node_score_entry -->|"checks deadlines"| node_score_deadlines
node_score_entry -->|"reads and writes"| node_school_records
node_app_routes -->|"routes login"| node_app_login
node_app_routes -->|"routes messaging"| node_telegram_link
node_telegram_link -->|"calls Telegram"| node_telegram_service
node_telegram_link -->|"accesses teachers"| node_teacher_model
node_controller_base -->|"resolves branch"| node_branch_model
node_controller_base -->|"resolves school context"| node_school_records
node_user_model -->|"relates teacher"| node_teacher_model
node_user_model -->|"relates branch"| node_branch_model
node_branch_model -->|"scopes assignments"| node_user_branch

click node_school_ui "https://github.com/tlar2411/school_template_v1/tree/main/WEB/src/pages/school"
click node_other_parts "https://github.com/tlar2411/school_template_v1/tree/main/WEB/src/pages"
click node_web_api "https://github.com/tlar2411/school_template_v1/blob/main/WEB/src/utils/api.js"
click node_auth_api "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/Auth/AuthController.php"
click node_user_admin "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/UserController.php"
click node_activity_log "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/ActivityLogController.php"
click node_address_admin "https://github.com/tlar2411/school_template_v1/tree/main/API/app/Http/Controllers/Api/Address"
click node_attendance "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/School/AttendanceController.php"
click node_score_entry "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/School/ScoreEntryController.php"
click node_attendance_reports "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Services/School/AttendanceReportService.php"
click node_score_deadlines "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Services/School/ScoreEntryDeadlineService.php"
click node_app_routes "https://github.com/tlar2411/school_template_v1/blob/main/API/routes/modules/app.route.php"
click node_app_login "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/App/LoginAppController.php"
click node_telegram_link "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/App/TelegramConnectionController.php"
click node_controller_base "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Controller.php"
click node_user_model "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Models/User.php"
click node_branch_model "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Models/Core/Branch.php"
click node_user_branch "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Models/Auth/UserBranch.php"
click node_teacher_model "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Models/School/Teacher.php"
click node_school_records "https://github.com/tlar2411/school_template_v1/tree/main/API/app/Models/School"
click node_datatable "https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Resources/DataTableResource.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_school_ui,node_other_parts,node_web_api,node_staff toneBlue
class node_attendance,node_score_entry,node_attendance_reports,node_score_deadlines toneAmber
class node_auth_api,node_user_admin,node_activity_log,node_address_admin,node_telegram_service toneMint
class node_app_routes,node_app_login,node_telegram_link toneRose
class node_controller_base,node_user_model,node_branch_model,node_user_branch,node_teacher_model,node_school_records,node_datatable toneIndigo
```

## Components

### Web application

- [School pages](https://github.com/tlar2411/school_template_v1/tree/main/WEB/src/pages/school): `WEB/src/pages/school`
- [Other part pages](https://github.com/tlar2411/school_template_v1/tree/main/WEB/src/pages): `WEB/src/pages`
- [API client](https://github.com/tlar2411/school_template_v1/blob/main/WEB/src/utils/api.js): `WEB/src/utils/api.js`

### School operations

- [Attendance](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/School/AttendanceController.php): `API/app/Http/Controllers/Api/School/AttendanceController.php`
- [Score entry](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/School/ScoreEntryController.php): `API/app/Http/Controllers/Api/School/ScoreEntryController.php`
- [Attendance reports](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Services/School/AttendanceReportService.php): `API/app/Services/School/AttendanceReportService.php`
- [Score deadlines](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Services/School/ScoreEntryDeadlineService.php): `API/app/Services/School/ScoreEntryDeadlineService.php`

### Identity and administration

- [Web authentication](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/Auth/AuthController.php): `API/app/Http/Controllers/Api/Auth/AuthController.php`
- [User administration](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/UserController.php): `API/app/Http/Controllers/Api/UserController.php`
- [Activity log](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/ActivityLogController.php): `API/app/Http/Controllers/Api/ActivityLogController.php`
- [Address administration](https://github.com/tlar2411/school_template_v1/tree/main/API/app/Http/Controllers/Api/Address): `API/app/Http/Controllers/Api/Address`

### Mobile and messaging

- [Mobile API routes](https://github.com/tlar2411/school_template_v1/blob/main/API/routes/modules/app.route.php): `API/routes/modules/app.route.php`
- [Mobile login](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/App/LoginAppController.php): `API/app/Http/Controllers/Api/App/LoginAppController.php`
- [Telegram connection](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Api/App/TelegramConnectionController.php): `API/app/Http/Controllers/Api/App/TelegramConnectionController.php`

### Domain data

- [Controller utilities](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Controllers/Controller.php): `API/app/Http/Controllers/Controller.php`
- [User records](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Models/User.php): `API/app/Models/User.php`
- [Branch records](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Models/Core/Branch.php): `API/app/Models/Core/Branch.php`
- [User branches](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Models/Auth/UserBranch.php): `API/app/Models/Auth/UserBranch.php`
- [Teacher records](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Models/School/Teacher.php): `API/app/Models/School/Teacher.php`
- [School records](https://github.com/tlar2411/school_template_v1/tree/main/API/app/Models/School): `API/app/Models/School`
- [Table response](https://github.com/tlar2411/school_template_v1/blob/main/API/app/Http/Resources/DataTableResource.php): `API/app/Http/Resources/DataTableResource.php`

### Other components

- **Staff user**
- **Telegram API**

## Connections

- Staff user → School pages: uses (evidence: `README.md`)
- Staff user → Other part pages: switches parts (evidence: `README.md`)
- School pages → API client: requests data
- Web authentication → User records: authenticates (evidence: `API/app/Http/Controllers/Api/Auth/AuthController.php`)
- Web authentication → Branch records: loads branches (evidence: `API/app/Http/Controllers/Api/Auth/AuthController.php`)
- Web authentication → User branches: loads assignments (evidence: `API/app/Http/Controllers/Api/Auth/AuthController.php`)
- User administration → User records: manages users (evidence: `API/app/Http/Controllers/Api/UserController.php`)
- User administration → Table response: formats tables (evidence: `API/app/Http/Controllers/Api/UserController.php`)
- User administration → User branches: updates assignments (evidence: `API/app/Http/Controllers/Api/UserController.php`)
- Activity log → Table response: formats tables (evidence: `API/app/Http/Controllers/Api/ActivityLogController.php`)
- Address administration → Table response: formats tables (evidence: `API/app/Http/Controllers/Api/Address/CommuneController.php`)
- Attendance → Attendance reports: builds reports (evidence: `API/app/Http/Controllers/Api/School/AttendanceController.php`)
- Attendance → School records: reads and writes (evidence: `API/app/Http/Controllers/Api/School/AttendanceController.php`)
- Score entry → Score deadlines: checks deadlines (evidence: `API/app/Http/Controllers/Api/School/ScoreEntryController.php`)
- Score entry → School records: reads and writes (evidence: `API/app/Http/Controllers/Api/School/ScoreEntryController.php`)
- Mobile API routes → Mobile login: routes login (evidence: `API/routes/modules/app.route.php`)
- Mobile API routes → Telegram connection: routes messaging (evidence: `API/routes/modules/app.route.php`)
- Telegram connection → Telegram API: calls Telegram (evidence: `API/app/Http/Controllers/Api/App/TelegramConnectionController.php`)
- Telegram connection → Teacher records: accesses teachers (evidence: `API/app/Http/Controllers/Api/App/TelegramConnectionController.php`)
- Controller utilities → Branch records: resolves branch (evidence: `API/app/Http/Controllers/Controller.php`)
- Controller utilities → School records: resolves school context (evidence: `API/app/Http/Controllers/Controller.php`)
- User records → Teacher records: relates teacher (evidence: `API/app/Models/User.php`)
- User records → Branch records: relates branch (evidence: `API/app/Models/User.php`)
- Branch records → User branches: scopes assignments (evidence: `API/app/Models/Core/Branch.php`)
