# neethuharii/arbormis_clone architecture

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

- Interactive diagram: https://gitdiagram.com/neethuharii/arbormis_clone
- Repository: https://github.com/neethuharii/arbormis_clone

## Overview

#### Purpose and runtime
Arbor MIS is a Symfony/PHP management-information system centered on students, staff, attendance, behaviour, points, and suspensions. HTTP enters through `public/index.php`, boots `src/Kernel.php`, and is dispatched via Symfony routing/configuration in `config/routes.yaml` and `config/packages/framework.yaml`.

#### Application boundary and presentation
Server-rendered Twig pages are the primary UI boundary. Controllers handle feature routes and render templates, with static JavaScript/CSS supporting interactive page behaviors:
- `src/Controller/StudentController.php`, `templates/student/StudentProfile.html.twig`
- `src/Controller/AttendanceController.php`, `templates/Attendances/AttendanceRegisters.html.twig`
- `public/js/AttendanceRegisters.js`, `public/css/Attendance/AttendanceRegisters.css`

Assets also use Symfony Asset Mapper/import maps and Stimulus/Turbo integration: `assets/app.js`, `assets/stimulus_bootstrap.js`, `config/packages/ux_turbo.yaml`.

#### Student and enrollment domain
Student records are a central aggregate, with related enrollment, guardians, addresses, funding, documents, and cards. The student controller/service layer mediates UI workflows and persistence access:
- `src/Controller/StudentController.php`, `src/Service/StudentService.php`
- `src/Entity/Students.php`, `src/Entity/StudentEnrollments.php`, `src/Entity/Guardian.php`
- `src/Entity/StudentGuardianRelation.php`, `src/Entity/Fundings.php`, `src/Entity/Documents.php`

Slideover templates represent modular editing flows for related student information, including UPN assignment, guardians, funding, identity documents, and addresses: `templates/Slideover/assign-upn.html.twig`, `templates/Slideover/student-guardian.html.twig`, `templates/Slideover/EditFunding.html.twig`.

#### Attendance workflow
Attendance management is modeled as registers, attendance records, and attendance codes. Request flow is controller → attendance service → Doctrine repositories/entities → rendered register or daily-attendance view:
- `src/Controller/AttendanceController.php`, `src/Service/AttendanceService.php`
- `src/Entity/AttendanceRegisters.php`, `src/Entity/Attendances.php`, `src/Entity/AttendanceCodes.php`
- `templates/Attendances/DailyAttendances.html.twig`, `templates/Attendances/base_attendance.html.twig`

#### Behaviour, points, and suspension workflow
Student conduct is split into incidents/behaviours, point awards, and suspension reporting/statistics. Feature-specific controllers/services separate these processes while sharing student-centered persistence:
- `src/Controller/IncidentController.php`, `src/Service/IncidentService.php`, `src/Entity/BehaviourIncidents.php`
- `src/Controller/PointsController.php`, `src/Entity/StudentPoints.php`, `templates/Point-awards/total-points.html.twig`
- `src/Controller/SuspensionController.php`, `src/Service/SuspensionService.php`, `src/Entity/SuspensionDetails.php`

#### Staff, identity, and authorization
Staff profiles, business roles, and user credentials form the operational identity boundary. Login is handled separately from domain controllers; Symfony Security supplies the authentication/authorization framework:
- `src/Controller/LoginController.php`, `src/Service/LoginService.php`, `config/packages/security.yaml`
- `src/Controller/StaffController.php`, `src/Service/StaffService.php`, `src/Entity/Staffs.php`
- `src/Entity/Users.php`, `src/Entity/BusinessRoles.php`, `src/Entity/CurrentRoles.php`

#### Persistence and infrastructure
Doctrine ORM maps entities to the relational database, repositories provide access boundaries, and the migration history is the schema evolution source of truth:
- `config/packages/doctrine.yaml`, `config/packages/doctrine_migrations.yaml`
- `src/Repository/StudentsRepository.php`, `src/Repository/AttendancesRepository.php`
- `migrations/Version20260610062002.php`, `migrations/Version20260709053746.php`

The repository includes Docker Compose deployment definitions (`compose.yaml`, `compose.override.yaml`), environment-specific configuration (`.env`, `.env.dev`, `.env.test`), fixture-based reference/seed data (`src/DataFixtures/UserFixtures.php`, `src/DataFixtures/RoleFixture.php`), and configured cache, mailer, messenger, notifier, logging, and translation integrations under `config/packages/`.

Main entry points: [`config/routes.yaml`](https://github.com/neethuharii/arbormis_clone/blob/main/config/routes.yaml) (Routes & Framework), [`src/Repository/StudentsRepository.php`](https://github.com/neethuharii/arbormis_clone/blob/main/src/Repository/StudentsRepository.php) (Repositories), [`src/Controller/StudentController.php`](https://github.com/neethuharii/arbormis_clone/blob/main/src/Controller/StudentController.php) (Student UI), [`src/Controller/AttendanceController.php`](https://github.com/neethuharii/arbormis_clone/blob/main/src/Controller/AttendanceController.php) (Attendance UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Symfony Runtime"]
  node_entry(("HTTP Entry<br/>PHP front controller<br/>[index.php]"))
  node_kernel["Application Kernel<br/>Symfony kernel<br/>[Kernel.php]"]
  node_routing["Routes &amp; Framework<br/>Symfony configuration<br/>[routes.yaml]"]
end

subgraph group_presentation["Presentation"]
  node_student_ui["Student UI<br/>controller and Twig"]
  node_attendance_ui["Attendance UI<br/>controller and Twig"]
  node_interactive_assets["Interactive Assets<br/>JavaScript, CSS, Turbo<br/>[app.js]"]
end

subgraph group_domains["Student Domains"]
  node_student_service["Student Service<br/>domain service<br/>[StudentService.php]"]
  node_student_aggregate["Student Aggregate<br/>Doctrine entities<br/>[Students.php]"]
  node_attendance_service["Attendance Service<br/>domain service"]
  node_attendance_model["Attendance Model<br/>Doctrine entities"]
  node_conduct_workflows["Conduct Workflows<br/>feature services"]
  node_conduct_model["Conduct Records<br/>Doctrine entities"]
end

subgraph group_identity["Identity &amp; Access"]
  node_login["Login Flow<br/>controller and service"]
  node_security["Security Framework<br/>Symfony Security<br/>[security.yaml]"]
  node_staff_service["Staff Service<br/>domain service<br/>[StaffService.php]"]
  node_identity_model["Staff &amp; User Identity<br/>Doctrine entities<br/>[Staffs.php]"]
end

subgraph group_data["Persistence"]
  node_repositories["Repositories<br/>Doctrine access boundary"]
  node_doctrine{{"Doctrine ORM<br/>persistence mapping<br/>[doctrine.yaml]"}}
  node_database[("Relational Database")]
  node_migrations["Schema Migrations<br/>Doctrine migrations"]
  node_fixtures["Reference Fixtures<br/>seed data<br/>[UserFixtures.php]"]
end

node_entry -->|"boots"| node_kernel
node_kernel -->|"loads"| node_routing
node_routing -->|"dispatches"| node_student_ui
node_routing -->|"dispatches"| node_attendance_ui
node_routing -->|"dispatches"| node_login
node_routing -.->|"feature routes"| node_conduct_workflows
node_student_ui -->|"student workflows"| node_student_service
node_student_ui -.->|"enhanced by"| node_interactive_assets
node_attendance_ui -->|"register workflow"| node_attendance_service
node_attendance_ui -->|"register behavior"| node_interactive_assets
node_student_service -->|"manages"| node_student_aggregate
node_attendance_service -->|"manages"| node_attendance_model
node_conduct_workflows -->|"records"| node_conduct_model
node_conduct_model -.->|"belongs to students"| node_student_aggregate
node_login -->|"authenticates through"| node_security
node_staff_service -->|"manages"| node_identity_model
node_security -->|"authorizes users and roles"| node_identity_model
node_student_aggregate -->|"accessed via"| node_repositories
node_attendance_model -->|"accessed via"| node_repositories
node_conduct_model -->|"accessed via"| node_repositories
node_identity_model -->|"accessed via"| node_repositories
node_repositories -->|"uses"| node_doctrine
node_doctrine -->|"maps to"| node_database
node_migrations -->|"evolves schema"| node_database
node_fixtures -.->|"seeds"| node_database

click node_entry "https://github.com/neethuharii/arbormis_clone/blob/main/public/index.php"
click node_kernel "https://github.com/neethuharii/arbormis_clone/blob/main/src/Kernel.php"
click node_routing "https://github.com/neethuharii/arbormis_clone/blob/main/config/routes.yaml"
click node_student_ui "https://github.com/neethuharii/arbormis_clone/blob/main/src/Controller/StudentController.php"
click node_attendance_ui "https://github.com/neethuharii/arbormis_clone/blob/main/src/Controller/AttendanceController.php"
click node_interactive_assets "https://github.com/neethuharii/arbormis_clone/blob/main/assets/app.js"
click node_student_service "https://github.com/neethuharii/arbormis_clone/blob/main/src/Service/StudentService.php"
click node_student_aggregate "https://github.com/neethuharii/arbormis_clone/blob/main/src/Entity/Students.php"
click node_attendance_service "https://github.com/neethuharii/arbormis_clone/blob/main/src/Service/AttendanceService.php"
click node_attendance_model "https://github.com/neethuharii/arbormis_clone/blob/main/src/Entity/AttendanceRegisters.php"
click node_conduct_workflows "https://github.com/neethuharii/arbormis_clone/blob/main/src/Service/IncidentService.php"
click node_conduct_model "https://github.com/neethuharii/arbormis_clone/blob/main/src/Entity/BehaviourIncidents.php"
click node_login "https://github.com/neethuharii/arbormis_clone/blob/main/src/Controller/LoginController.php"
click node_security "https://github.com/neethuharii/arbormis_clone/blob/main/config/packages/security.yaml"
click node_staff_service "https://github.com/neethuharii/arbormis_clone/blob/main/src/Service/StaffService.php"
click node_identity_model "https://github.com/neethuharii/arbormis_clone/blob/main/src/Entity/Staffs.php"
click node_repositories "https://github.com/neethuharii/arbormis_clone/blob/main/src/Repository/StudentsRepository.php"
click node_doctrine "https://github.com/neethuharii/arbormis_clone/blob/main/config/packages/doctrine.yaml"
click node_migrations "https://github.com/neethuharii/arbormis_clone/blob/main/migrations/Version20260610062002.php"
click node_fixtures "https://github.com/neethuharii/arbormis_clone/blob/main/src/DataFixtures/UserFixtures.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_entry,node_kernel,node_routing toneBlue
class node_student_ui,node_attendance_ui,node_interactive_assets toneAmber
class node_student_service,node_student_aggregate,node_attendance_service,node_attendance_model,node_conduct_workflows,node_conduct_model toneMint
class node_login,node_security,node_staff_service,node_identity_model toneRose
class node_repositories,node_doctrine,node_database,node_migrations,node_fixtures toneIndigo
```

## Components

### Symfony Runtime

- [HTTP Entry](https://github.com/neethuharii/arbormis_clone/blob/main/public/index.php): PHP front controller · `public/index.php`
- [Application Kernel](https://github.com/neethuharii/arbormis_clone/blob/main/src/Kernel.php): Symfony kernel · `src/Kernel.php`
- [Routes & Framework](https://github.com/neethuharii/arbormis_clone/blob/main/config/routes.yaml): Symfony configuration · `config/routes.yaml`

### Presentation

- [Student UI](https://github.com/neethuharii/arbormis_clone/blob/main/src/Controller/StudentController.php): controller and Twig · Student profiles and related editing workflows. · `src/Controller/StudentController.php`
- [Attendance UI](https://github.com/neethuharii/arbormis_clone/blob/main/src/Controller/AttendanceController.php): controller and Twig · Register and daily-attendance views. · `src/Controller/AttendanceController.php`
- [Interactive Assets](https://github.com/neethuharii/arbormis_clone/blob/main/assets/app.js): JavaScript, CSS, Turbo · `assets/app.js`

### Student Domains

- [Student Service](https://github.com/neethuharii/arbormis_clone/blob/main/src/Service/StudentService.php): domain service · `src/Service/StudentService.php`
- [Student Aggregate](https://github.com/neethuharii/arbormis_clone/blob/main/src/Entity/Students.php): Doctrine entities · Students, enrollments, guardians, funding, and documents. · `src/Entity/Students.php`
- [Attendance Service](https://github.com/neethuharii/arbormis_clone/blob/main/src/Service/AttendanceService.php): domain service · `src/Service/AttendanceService.php`
- [Attendance Model](https://github.com/neethuharii/arbormis_clone/blob/main/src/Entity/AttendanceRegisters.php): Doctrine entities · Registers, records, and codes. · `src/Entity/AttendanceRegisters.php`
- [Conduct Workflows](https://github.com/neethuharii/arbormis_clone/blob/main/src/Service/IncidentService.php): feature services · Incidents, point awards, and suspensions. · `src/Service/IncidentService.php`
- [Conduct Records](https://github.com/neethuharii/arbormis_clone/blob/main/src/Entity/BehaviourIncidents.php): Doctrine entities · Behaviour incidents, student points, and suspension details. · `src/Entity/BehaviourIncidents.php`

### Identity & Access

- [Login Flow](https://github.com/neethuharii/arbormis_clone/blob/main/src/Controller/LoginController.php): controller and service · `src/Controller/LoginController.php`
- [Security Framework](https://github.com/neethuharii/arbormis_clone/blob/main/config/packages/security.yaml): Symfony Security · Authentication and authorization policy. · `config/packages/security.yaml`
- [Staff Service](https://github.com/neethuharii/arbormis_clone/blob/main/src/Service/StaffService.php): domain service · `src/Service/StaffService.php`
- [Staff & User Identity](https://github.com/neethuharii/arbormis_clone/blob/main/src/Entity/Staffs.php): Doctrine entities · Staff profiles, users, business roles, and current roles. · `src/Entity/Staffs.php`

### Persistence

- [Repositories](https://github.com/neethuharii/arbormis_clone/blob/main/src/Repository/StudentsRepository.php): Doctrine access boundary · `src/Repository/StudentsRepository.php`
- [Doctrine ORM](https://github.com/neethuharii/arbormis_clone/blob/main/config/packages/doctrine.yaml): persistence mapping · `config/packages/doctrine.yaml`
- **Relational Database**: database
- [Schema Migrations](https://github.com/neethuharii/arbormis_clone/blob/main/migrations/Version20260610062002.php): Doctrine migrations · Schema evolution source of truth. · `migrations/Version20260610062002.php`
- [Reference Fixtures](https://github.com/neethuharii/arbormis_clone/blob/main/src/DataFixtures/UserFixtures.php): seed data · Seeds users and roles. · `src/DataFixtures/UserFixtures.php`

## Connections

- HTTP Entry → Application Kernel: boots
- Application Kernel → Routes & Framework: loads
- Routes & Framework → Student UI: dispatches
- Routes & Framework → Attendance UI: dispatches
- Routes & Framework → Login Flow: dispatches
- Routes & Framework → Conduct Workflows: feature routes
- Student UI → Student Service: student workflows
- Student UI → Interactive Assets: enhanced by
- Attendance UI → Attendance Service: register workflow
- Attendance UI → Interactive Assets: register behavior
- Student Service → Student Aggregate: manages
- Attendance Service → Attendance Model: manages
- Conduct Workflows → Conduct Records: records
- Conduct Records → Student Aggregate: belongs to students
- Login Flow → Security Framework: authenticates through
- Staff Service → Staff & User Identity: manages
- Security Framework → Staff & User Identity: authorizes users and roles
- Student Aggregate → Repositories: accessed via
- Attendance Model → Repositories: accessed via
- Conduct Records → Repositories: accessed via
- Staff & User Identity → Repositories: accessed via
- Repositories → Doctrine ORM: uses
- Doctrine ORM → Relational Database: maps to
- Schema Migrations → Relational Database: evolves schema
- Reference Fixtures → Relational Database: seeds
