# 4jean/lav_sms architecture

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

- Interactive diagram: https://gitdiagram.com/4jean/lav_sms
- Repository: https://github.com/4jean/lav_sms

## Overview

LAVSMS is a Laravel school-management application for seven account types. Its documented work spans identity and profiles, academic setup, marks and timetables, fees, and library resources; the primary learner-facing outcome is viewing marks and timetables, while staff maintain the underlying records. The graph combines documented capabilities with sampled controller, repository, helper, and model relationships. Several feature controllers and routes were not sampled, so those links are marked unverified rather than presented as observed calls.

Main entry points: [`app/Http/Controllers/SupportTeam/MarkController.php`](https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/MarkController.php) (Marks and reports), [`config/database.php`](https://github.com/4jean/lav_sms/blob/master/config/database.php) (Application database), [`app/Repositories/MyClassRepo.php`](https://github.com/4jean/lav_sms/blob/master/app/Repositories/MyClassRepo.php) (Class repository), [`app/Repositories/StudentRepo.php`](https://github.com/4jean/lav_sms/blob/master/app/Repositories/StudentRepo.php) (Student repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_web_entry["Web entry point<br/>[index.php]"]
  node_route_setup["Route setup"]
  node_web_routes["Web routes<br/>[web.php]"]
end

subgraph group_identity["Accounts and access"]
  node_account_controller["Profile management"]
  node_user_repo["User repository<br/>[UserRepo.php]"]
  node_role_access["Role access<br/>[Qs.php]"]
end

subgraph group_academics["Academic records"]
  node_class_controller["Class and subject management"]
  node_class_repo["Class repository<br/>[MyClassRepo.php]"]
  node_student_controller["Student records"]
  node_student_repo["Student repository<br/>[StudentRepo.php]"]
  node_exam_controller["Exam management<br/>[ExamController.php]"]
  node_exam_repo["Exam repository<br/>[ExamRepo.php]"]
  node_mark_controller["Marks and reports<br/>[MarkController.php]"]
  node_mark_helper["Mark calculations<br/>[Mk.php]"]
  node_timetable_controller["Timetable management"]
  node_timetable_repo["Timetable repository<br/>[TimeTableRepo.php]"]
end

subgraph group_operations["School operations"]
  node_payments["Fees and receipts"]
  node_library["Library books<br/>[BookController.php]"]
  node_settings["System settings"]
  node_setting_repo["Settings repository<br/>[SettingRepo.php]"]
end

subgraph group_data["Persistence"]
  node_user_model["User accounts<br/>[User.php]"]
  node_school_db[("Application database<br/>[database.php]")]
  node_mark_model["Mark records<br/>[Mark.php]"]
  node_student_model["Student records<br/>[StudentRecord.php]"]
  node_class_model["Classes and subjects<br/>[MyClass.php]"]
  node_exam_model["Exams and grades<br/>[Exam.php]"]
  node_setting_model["Setting records<br/>[Setting.php]"]
end

node_school_users(("School users"))

node_web_entry -->|"boots app"| node_route_setup
node_route_setup -->|"loads routes"| node_web_routes
node_school_users -.->|"manages profile"| node_account_controller
node_account_controller -->|"updates account"| node_user_repo
node_user_repo -->|"updates user"| node_user_model
node_school_users -.->|"gets role access"| node_role_access
node_school_users -.->|"manages classes"| node_class_controller
node_class_controller -.->|"uses class data"| node_class_repo
node_school_users -.->|"manages students"| node_student_controller
node_student_controller -.->|"uses student data"| node_student_repo
node_school_users -.->|"manages exams"| node_exam_controller
node_exam_controller -.->|"uses exam data"| node_exam_repo
node_school_users -.->|"views marks"| node_mark_controller
node_mark_controller -->|"reads marks"| node_exam_repo
node_mark_controller -->|"reads students"| node_student_repo
node_mark_controller -->|"reads class data"| node_class_repo
node_mark_controller -->|"checks exam lock"| node_mark_helper
node_mark_controller -->|"calculates results"| node_mark_model
node_school_users -.->|"views timetable"| node_timetable_controller
node_timetable_controller -->|"uses timetable data"| node_timetable_repo
node_school_users -.->|"manages fees"| node_payments
node_school_users -.->|"manages books"| node_library
node_school_users -.->|"edits settings"| node_settings
node_settings -->|"uses settings"| node_setting_repo
node_class_repo -->|"queries classes"| node_class_model
node_exam_repo -->|"queries exams"| node_exam_model
node_student_repo -->|"queries students"| node_student_model
node_setting_repo -.->|"uses settings"| node_setting_model
node_mark_model -.->|"persists marks"| node_school_db
node_student_model -.->|"persists students"| node_school_db
node_class_model -.->|"persists classes"| node_school_db
node_exam_model -.->|"persists exams"| node_school_db

click node_web_entry "https://github.com/4jean/lav_sms/blob/master/public/index.php"
click node_route_setup "https://github.com/4jean/lav_sms/blob/master/app/Providers/RouteServiceProvider.php"
click node_web_routes "https://github.com/4jean/lav_sms/blob/master/routes/web.php"
click node_account_controller "https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/MyAccountController.php"
click node_user_repo "https://github.com/4jean/lav_sms/blob/master/app/Repositories/UserRepo.php"
click node_user_model "https://github.com/4jean/lav_sms/blob/master/app/User.php"
click node_role_access "https://github.com/4jean/lav_sms/blob/master/app/Helpers/Qs.php"
click node_class_controller "https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/MyClassController.php"
click node_class_repo "https://github.com/4jean/lav_sms/blob/master/app/Repositories/MyClassRepo.php"
click node_student_controller "https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/StudentRecordController.php"
click node_student_repo "https://github.com/4jean/lav_sms/blob/master/app/Repositories/StudentRepo.php"
click node_exam_controller "https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/ExamController.php"
click node_exam_repo "https://github.com/4jean/lav_sms/blob/master/app/Repositories/ExamRepo.php"
click node_mark_controller "https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/MarkController.php"
click node_mark_helper "https://github.com/4jean/lav_sms/blob/master/app/Helpers/Mk.php"
click node_timetable_controller "https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/TimeTableController.php"
click node_timetable_repo "https://github.com/4jean/lav_sms/blob/master/app/Repositories/TimeTableRepo.php"
click node_payments "https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/PaymentController.php"
click node_library "https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/BookController.php"
click node_settings "https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SuperAdmin/SettingController.php"
click node_setting_repo "https://github.com/4jean/lav_sms/blob/master/app/Repositories/SettingRepo.php"
click node_school_db "https://github.com/4jean/lav_sms/blob/master/config/database.php"
click node_mark_model "https://github.com/4jean/lav_sms/blob/master/app/Models/Mark.php"
click node_student_model "https://github.com/4jean/lav_sms/blob/master/app/Models/StudentRecord.php"
click node_class_model "https://github.com/4jean/lav_sms/blob/master/app/Models/MyClass.php"
click node_exam_model "https://github.com/4jean/lav_sms/blob/master/app/Models/Exam.php"
click node_setting_model "https://github.com/4jean/lav_sms/blob/master/app/Models/Setting.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_entry,node_route_setup,node_web_routes,node_school_users toneBlue
class node_account_controller,node_user_repo,node_role_access toneAmber
class node_class_controller,node_class_repo,node_student_controller,node_student_repo,node_exam_controller,node_exam_repo,node_mark_controller,node_mark_helper,node_timetable_controller,node_timetable_repo toneMint
class node_payments,node_library,node_settings,node_setting_repo toneRose
class node_user_model,node_school_db,node_mark_model,node_student_model,node_class_model,node_exam_model,node_setting_model toneIndigo
```

## Components

### Web entry

- [Web entry point](https://github.com/4jean/lav_sms/blob/master/public/index.php): `public/index.php`
- [Route setup](https://github.com/4jean/lav_sms/blob/master/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [Web routes](https://github.com/4jean/lav_sms/blob/master/routes/web.php): `routes/web.php`

### Accounts and access

- [Profile management](https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/MyAccountController.php): `app/Http/Controllers/MyAccountController.php`
- [User repository](https://github.com/4jean/lav_sms/blob/master/app/Repositories/UserRepo.php): `app/Repositories/UserRepo.php`
- [Role access](https://github.com/4jean/lav_sms/blob/master/app/Helpers/Qs.php): `app/Helpers/Qs.php`

### Academic records

- [Class and subject management](https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/MyClassController.php): `app/Http/Controllers/SupportTeam/MyClassController.php`
- [Class repository](https://github.com/4jean/lav_sms/blob/master/app/Repositories/MyClassRepo.php): `app/Repositories/MyClassRepo.php`
- [Student records](https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/StudentRecordController.php): `app/Http/Controllers/SupportTeam/StudentRecordController.php`
- [Student repository](https://github.com/4jean/lav_sms/blob/master/app/Repositories/StudentRepo.php): `app/Repositories/StudentRepo.php`
- [Exam management](https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/ExamController.php): `app/Http/Controllers/SupportTeam/ExamController.php`
- [Exam repository](https://github.com/4jean/lav_sms/blob/master/app/Repositories/ExamRepo.php): `app/Repositories/ExamRepo.php`
- [Marks and reports](https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/MarkController.php): `app/Http/Controllers/SupportTeam/MarkController.php`
- [Mark calculations](https://github.com/4jean/lav_sms/blob/master/app/Helpers/Mk.php): `app/Helpers/Mk.php`
- [Timetable management](https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/TimeTableController.php): `app/Http/Controllers/SupportTeam/TimeTableController.php`
- [Timetable repository](https://github.com/4jean/lav_sms/blob/master/app/Repositories/TimeTableRepo.php): `app/Repositories/TimeTableRepo.php`

### School operations

- [Fees and receipts](https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/PaymentController.php): `app/Http/Controllers/SupportTeam/PaymentController.php`
- [Library books](https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SupportTeam/BookController.php): `app/Http/Controllers/SupportTeam/BookController.php`
- [System settings](https://github.com/4jean/lav_sms/blob/master/app/Http/Controllers/SuperAdmin/SettingController.php): `app/Http/Controllers/SuperAdmin/SettingController.php`
- [Settings repository](https://github.com/4jean/lav_sms/blob/master/app/Repositories/SettingRepo.php): `app/Repositories/SettingRepo.php`

### Persistence

- [User accounts](https://github.com/4jean/lav_sms/blob/master/app/User.php): `app/User.php`
- [Application database](https://github.com/4jean/lav_sms/blob/master/config/database.php): `config/database.php`
- [Mark records](https://github.com/4jean/lav_sms/blob/master/app/Models/Mark.php): `app/Models/Mark.php`
- [Student records](https://github.com/4jean/lav_sms/blob/master/app/Models/StudentRecord.php): `app/Models/StudentRecord.php`
- [Classes and subjects](https://github.com/4jean/lav_sms/blob/master/app/Models/MyClass.php): `app/Models/MyClass.php`
- [Exams and grades](https://github.com/4jean/lav_sms/blob/master/app/Models/Exam.php): `app/Models/Exam.php`
- [Setting records](https://github.com/4jean/lav_sms/blob/master/app/Models/Setting.php): `app/Models/Setting.php`

### Other components

- **School users**

## Connections

- Web entry point → Route setup: boots app (evidence: `public/index.php`)
- Route setup → Web routes: loads routes (evidence: `app/Providers/RouteServiceProvider.php`)
- School users → Profile management: manages profile
- Profile management → User repository: updates account (evidence: `app/Http/Controllers/MyAccountController.php`)
- User repository → User accounts: updates user
- School users → Role access: gets role access
- School users → Class and subject management: manages classes
- Class and subject management → Class repository: uses class data
- School users → Student records: manages students
- Student records → Student repository: uses student data
- School users → Exam management: manages exams
- Exam management → Exam repository: uses exam data
- School users → Marks and reports: views marks
- Marks and reports → Exam repository: reads marks (evidence: `app/Http/Controllers/SupportTeam/MarkController.php`)
- Marks and reports → Student repository: reads students (evidence: `app/Http/Controllers/SupportTeam/MarkController.php`)
- Marks and reports → Class repository: reads class data (evidence: `app/Http/Controllers/SupportTeam/MarkController.php`)
- Marks and reports → Mark calculations: checks exam lock (evidence: `app/Http/Controllers/SupportTeam/MarkController.php`)
- Marks and reports → Mark records: calculates results (evidence: `app/Http/Controllers/SupportTeam/MarkController.php`)
- School users → Timetable management: views timetable
- Timetable management → Timetable repository: uses timetable data (evidence: `app/Http/Controllers/SupportTeam/TimeTableController.php`)
- School users → Fees and receipts: manages fees
- School users → Library books: manages books
- School users → System settings: edits settings
- System settings → Settings repository: uses settings (evidence: `app/Http/Controllers/SuperAdmin/SettingController.php`)
- Class repository → Classes and subjects: queries classes (evidence: `app/Repositories/MyClassRepo.php`)
- Exam repository → Exams and grades: queries exams (evidence: `app/Repositories/ExamRepo.php`)
- Student repository → Student records: queries students (evidence: `app/Repositories/StudentRepo.php`)
- Settings repository → Setting records: uses settings
- Mark records → Application database: persists marks
- Student records → Application database: persists students
- Classes and subjects → Application database: persists classes
- Exams and grades → Application database: persists exams
