# kentoy27/smartapp architecture

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

- Interactive diagram: https://gitdiagram.com/kentoy27/smartapp
- Repository: https://github.com/kentoy27/smartapp

## Overview

This Laravel application supports school planning, budget monitoring and performance-review workflows: users manage AIP plans, school allotments and expenditure matrices, WFP plans and approvals, and OPCRF submissions, schedules and reviews. The graph highlights these product areas and shared school/identity context. The README is empty, and several components are represented by SOURCE INDEX references rather than inspected implementations; edges are limited to relationships shown by excerpts or that index.

Main entry points: [`app/Models/School.php`](https://github.com/kentoy27/smartapp/blob/main/app/Models/School.php) (Schools and districts), [`app/Livewire/SchoolAllotmentManager.php`](https://github.com/kentoy27/smartapp/blob/main/app/Livewire/SchoolAllotmentManager.php) (Allotment management), [`app/Models/OpcrfSubmission.php`](https://github.com/kentoy27/smartapp/blob/main/app/Models/OpcrfSubmission.php) (OPCRF submissions), [`app/Models/AipPlan.php`](https://github.com/kentoy27/smartapp/blob/main/app/Models/AipPlan.php) (AIP plans)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_school_context["School and access"]
  node_school_records[("Schools and districts<br/>[School.php]")]
  node_user_access[("Users and roles<br/>[User.php]")]
  node_division_rules["Division rules<br/>[SchoolDivision.php]"]
  node_district_admin["District administration"]
end

subgraph group_planning["Plans and submissions"]
  node_aip_plans[("AIP plans<br/>[AipPlan.php]")]
  node_aip_reviews[("AIP review<br/>[AipReview.php]")]
  node_aip_uploads["AIP submission and export"]
  node_sip_submissions[("SIP submissions<br/>[SipSubmission.php]")]
end

subgraph group_budget["Budget management"]
  node_mem_matrices[("Monthly expenditure matrices")]
  node_school_allotments[("School allotments")]
  node_allotment_manager["Allotment management"]
  node_wfp_plans[("WFP plans<br/>[WfpPlan.php]")]
  node_wfp_allotment["WFP allotment rules<br/>[WfpAllotment.php]"]
  node_wfp_manager["WFP management<br/>[WfpManager.php]"]
end

subgraph group_opcrf["OPCRF workflow"]
  node_opcrf_submissions[("OPCRF submissions")]
  node_opcrf_reviews[("OPCRF reviews<br/>[OpcrfReview.php]")]
  node_opcrf_schedules[("OPCRF schedules<br/>[OpcrfSchedule.php]")]
  node_opcrf_schedule_admin["Schedule management"]
  node_opcrf_access["OPCRF access rules<br/>[OpcrfAccess.php]"]
end

subgraph group_shared_tools["Shared domain services"]
  node_signature_stamper["Signature stamping"]
  node_template_personalizer["Template personalization"]
  node_zip_reader["ZIP reader"]
  node_account_classifications[("Account classifications")]
  node_classification_api["Classification API"]
  node_allotment_importer["Allotment importer"]
end

node_staff(("School staff"))

node_staff -.->|"manages budgets"| node_allotment_manager
node_allotment_manager -->|"loads schools"| node_school_records
node_allotment_manager -->|"reads and saves"| node_school_allotments
node_allotment_manager -->|"imports allotments"| node_allotment_importer
node_allotment_manager -->|"uses rules"| node_wfp_allotment
node_school_allotments -->|"uses rules"| node_wfp_allotment
node_school_records -->|"resolves divisions"| node_division_rules
node_user_access -->|"resolves access"| node_division_rules
node_district_admin -->|"manages schools"| node_school_records
node_district_admin -->|"uses rules"| node_division_rules
node_aip_uploads -->|"submits plans"| node_aip_plans
node_aip_uploads -->|"checks ownership"| node_user_access
node_aip_uploads -->|"exports plans"| node_aip_plans
node_aip_reviews -->|"reviews plan"| node_aip_plans
node_aip_plans -->|"belongs to school"| node_school_records
node_aip_plans -->|"references plans"| node_wfp_plans
node_sip_submissions -->|"belongs to school"| node_school_records
node_mem_matrices -->|"belongs to school"| node_school_records
node_mem_matrices -->|"uses rules"| node_division_rules
node_wfp_manager -->|"loads schools"| node_school_records
node_opcrf_schedule_admin -->|"manages schedules"| node_opcrf_schedules
node_opcrf_schedule_admin -->|"checks access"| node_opcrf_access
node_opcrf_schedule_admin -->|"records author"| node_user_access
node_opcrf_access -->|"checks windows"| node_opcrf_schedules
node_opcrf_access -->|"checks submissions"| node_opcrf_submissions
node_opcrf_access -->|"checks roles"| node_user_access
node_opcrf_reviews -->|"reviews submission"| node_opcrf_submissions
node_opcrf_submissions -->|"stamps signatures"| node_signature_stamper
node_opcrf_submissions -->|"personalizes template"| node_template_personalizer
node_opcrf_submissions -->|"reads workbook"| node_zip_reader
node_classification_api -->|"manages classifications"| node_account_classifications
node_classification_api -->|"authorizes admin"| node_user_access

click node_school_records "https://github.com/kentoy27/smartapp/blob/main/app/Models/School.php"
click node_user_access "https://github.com/kentoy27/smartapp/blob/main/app/Models/User.php"
click node_division_rules "https://github.com/kentoy27/smartapp/blob/main/app/support/SchoolDivision.php"
click node_district_admin "https://github.com/kentoy27/smartapp/blob/main/app/Livewire/DistrictManager.php"
click node_aip_plans "https://github.com/kentoy27/smartapp/blob/main/app/Models/AipPlan.php"
click node_aip_reviews "https://github.com/kentoy27/smartapp/blob/main/app/Models/AipReview.php"
click node_aip_uploads "https://github.com/kentoy27/smartapp/blob/main/app/Http/Controllers/AipUploadController.php"
click node_sip_submissions "https://github.com/kentoy27/smartapp/blob/main/app/Models/SipSubmission.php"
click node_mem_matrices "https://github.com/kentoy27/smartapp/blob/main/app/Models/MonthlyExpenditureMatrix.php"
click node_school_allotments "https://github.com/kentoy27/smartapp/blob/main/app/Models/SchoolAllotment.php"
click node_allotment_manager "https://github.com/kentoy27/smartapp/blob/main/app/Livewire/SchoolAllotmentManager.php"
click node_wfp_plans "https://github.com/kentoy27/smartapp/blob/main/app/Models/WfpPlan.php"
click node_wfp_allotment "https://github.com/kentoy27/smartapp/blob/main/app/support/WfpAllotment.php"
click node_wfp_manager "https://github.com/kentoy27/smartapp/blob/main/app/Livewire/WfpManager.php"
click node_opcrf_submissions "https://github.com/kentoy27/smartapp/blob/main/app/Models/OpcrfSubmission.php"
click node_opcrf_reviews "https://github.com/kentoy27/smartapp/blob/main/app/Models/OpcrfReview.php"
click node_opcrf_schedules "https://github.com/kentoy27/smartapp/blob/main/app/Models/OpcrfSchedule.php"
click node_opcrf_schedule_admin "https://github.com/kentoy27/smartapp/blob/main/app/Livewire/OpcrfScheduleManager.php"
click node_opcrf_access "https://github.com/kentoy27/smartapp/blob/main/app/support/OpcrfAccess.php"
click node_signature_stamper "https://github.com/kentoy27/smartapp/blob/main/app/support/OpcrfSignatureStamper.php"
click node_template_personalizer "https://github.com/kentoy27/smartapp/blob/main/app/support/OpcrfTemplatePersonalizer.php"
click node_zip_reader "https://github.com/kentoy27/smartapp/blob/main/app/support/PurePhpZipReader.php"
click node_account_classifications "https://github.com/kentoy27/smartapp/blob/main/app/Models/AccountClassification.php"
click node_classification_api "https://github.com/kentoy27/smartapp/blob/main/app/Http/Controllers/Api/AccountClassificationController.php"
click node_allotment_importer "https://github.com/kentoy27/smartapp/blob/main/app/support/SchoolAllotmentImporter.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_records,node_user_access,node_division_rules,node_district_admin toneBlue
class node_aip_plans,node_aip_reviews,node_aip_uploads,node_sip_submissions toneAmber
class node_mem_matrices,node_school_allotments,node_allotment_manager,node_wfp_plans,node_wfp_allotment,node_wfp_manager toneMint
class node_opcrf_submissions,node_opcrf_reviews,node_opcrf_schedules,node_opcrf_schedule_admin,node_opcrf_access toneRose
class node_signature_stamper,node_template_personalizer,node_zip_reader,node_account_classifications,node_classification_api,node_allotment_importer,node_staff toneIndigo
```

## Components

### School and access

- [Schools and districts](https://github.com/kentoy27/smartapp/blob/main/app/Models/School.php): `app/Models/School.php`
- [Users and roles](https://github.com/kentoy27/smartapp/blob/main/app/Models/User.php): `app/Models/User.php`
- [Division rules](https://github.com/kentoy27/smartapp/blob/main/app/support/SchoolDivision.php): `app/support/SchoolDivision.php`
- [District administration](https://github.com/kentoy27/smartapp/blob/main/app/Livewire/DistrictManager.php): `app/Livewire/DistrictManager.php`

### Plans and submissions

- [AIP plans](https://github.com/kentoy27/smartapp/blob/main/app/Models/AipPlan.php): `app/Models/AipPlan.php`
- [AIP review](https://github.com/kentoy27/smartapp/blob/main/app/Models/AipReview.php): `app/Models/AipReview.php`
- [AIP submission and export](https://github.com/kentoy27/smartapp/blob/main/app/Http/Controllers/AipUploadController.php): `app/Http/Controllers/AipUploadController.php`
- [SIP submissions](https://github.com/kentoy27/smartapp/blob/main/app/Models/SipSubmission.php): `app/Models/SipSubmission.php`

### Budget management

- [Monthly expenditure matrices](https://github.com/kentoy27/smartapp/blob/main/app/Models/MonthlyExpenditureMatrix.php): `app/Models/MonthlyExpenditureMatrix.php`
- [School allotments](https://github.com/kentoy27/smartapp/blob/main/app/Models/SchoolAllotment.php): `app/Models/SchoolAllotment.php`
- [Allotment management](https://github.com/kentoy27/smartapp/blob/main/app/Livewire/SchoolAllotmentManager.php): `app/Livewire/SchoolAllotmentManager.php`
- [WFP plans](https://github.com/kentoy27/smartapp/blob/main/app/Models/WfpPlan.php): `app/Models/WfpPlan.php`
- [WFP allotment rules](https://github.com/kentoy27/smartapp/blob/main/app/support/WfpAllotment.php): `app/support/WfpAllotment.php`
- [WFP management](https://github.com/kentoy27/smartapp/blob/main/app/Livewire/WfpManager.php): `app/Livewire/WfpManager.php`

### OPCRF workflow

- [OPCRF submissions](https://github.com/kentoy27/smartapp/blob/main/app/Models/OpcrfSubmission.php): `app/Models/OpcrfSubmission.php`
- [OPCRF reviews](https://github.com/kentoy27/smartapp/blob/main/app/Models/OpcrfReview.php): `app/Models/OpcrfReview.php`
- [OPCRF schedules](https://github.com/kentoy27/smartapp/blob/main/app/Models/OpcrfSchedule.php): `app/Models/OpcrfSchedule.php`
- [Schedule management](https://github.com/kentoy27/smartapp/blob/main/app/Livewire/OpcrfScheduleManager.php): `app/Livewire/OpcrfScheduleManager.php`
- [OPCRF access rules](https://github.com/kentoy27/smartapp/blob/main/app/support/OpcrfAccess.php): `app/support/OpcrfAccess.php`

### Shared domain services

- [Signature stamping](https://github.com/kentoy27/smartapp/blob/main/app/support/OpcrfSignatureStamper.php): `app/support/OpcrfSignatureStamper.php`
- [Template personalization](https://github.com/kentoy27/smartapp/blob/main/app/support/OpcrfTemplatePersonalizer.php): `app/support/OpcrfTemplatePersonalizer.php`
- [ZIP reader](https://github.com/kentoy27/smartapp/blob/main/app/support/PurePhpZipReader.php): `app/support/PurePhpZipReader.php`
- [Account classifications](https://github.com/kentoy27/smartapp/blob/main/app/Models/AccountClassification.php): `app/Models/AccountClassification.php`
- [Classification API](https://github.com/kentoy27/smartapp/blob/main/app/Http/Controllers/Api/AccountClassificationController.php): `app/Http/Controllers/Api/AccountClassificationController.php`
- [Allotment importer](https://github.com/kentoy27/smartapp/blob/main/app/support/SchoolAllotmentImporter.php): `app/support/SchoolAllotmentImporter.php`

### Other components

- **School staff**

## Connections

- School staff → Allotment management: manages budgets
- Allotment management → Schools and districts: loads schools (evidence: `app/Livewire/SchoolAllotmentManager.php`)
- Allotment management → School allotments: reads and saves (evidence: `app/Livewire/SchoolAllotmentManager.php`)
- Allotment management → Allotment importer: imports allotments (evidence: `app/Livewire/SchoolAllotmentManager.php`)
- Allotment management → WFP allotment rules: uses rules (evidence: `app/Livewire/SchoolAllotmentManager.php`)
- School allotments → WFP allotment rules: uses rules (evidence: `app/Models/SchoolAllotment.php`)
- Schools and districts → Division rules: resolves divisions (evidence: `app/Models/School.php`)
- Users and roles → Division rules: resolves access (evidence: `app/Models/User.php`)
- District administration → Schools and districts: manages schools (evidence: `app/Livewire/DistrictManager.php`)
- District administration → Division rules: uses rules (evidence: `app/Livewire/DistrictManager.php`)
- AIP submission and export → AIP plans: submits plans (evidence: `app/Http/Controllers/AipUploadController.php`)
- AIP submission and export → Users and roles: checks ownership (evidence: `app/Http/Controllers/AipUploadController.php`)
- AIP submission and export → AIP plans: exports plans (evidence: `app/Http/Controllers/AipUploadController.php`)
- AIP review → AIP plans: reviews plan (evidence: `app/Models/AipReview.php`)
- AIP plans → Schools and districts: belongs to school (evidence: `app/Models/AipPlan.php`)
- AIP plans → WFP plans: references plans (evidence: `app/Models/AipPlan.php`)
- SIP submissions → Schools and districts: belongs to school (evidence: `app/Models/SipSubmission.php`)
- Monthly expenditure matrices → Schools and districts: belongs to school (evidence: `app/Models/MonthlyExpenditureMatrix.php`)
- Monthly expenditure matrices → Division rules: uses rules (evidence: `app/Models/MonthlyExpenditureMatrix.php`)
- WFP management → Schools and districts: loads schools
- Schedule management → OPCRF schedules: manages schedules (evidence: `app/Livewire/OpcrfScheduleManager.php`)
- Schedule management → OPCRF access rules: checks access (evidence: `app/Livewire/OpcrfScheduleManager.php`)
- Schedule management → Users and roles: records author
- OPCRF access rules → OPCRF schedules: checks windows (evidence: `app/support/OpcrfAccess.php`)
- OPCRF access rules → OPCRF submissions: checks submissions (evidence: `app/support/OpcrfAccess.php`)
- OPCRF access rules → Users and roles: checks roles (evidence: `app/support/OpcrfAccess.php`)
- OPCRF reviews → OPCRF submissions: reviews submission (evidence: `app/Models/OpcrfReview.php`)
- OPCRF submissions → Signature stamping: stamps signatures (evidence: `app/Models/OpcrfSubmission.php`)
- OPCRF submissions → Template personalization: personalizes template (evidence: `app/Models/OpcrfSubmission.php`)
- OPCRF submissions → ZIP reader: reads workbook (evidence: `app/Models/OpcrfSubmission.php`)
- Classification API → Account classifications: manages classifications (evidence: `app/Http/Controllers/Api/AccountClassificationController.php`)
- Classification API → Users and roles: authorizes admin (evidence: `app/Http/Controllers/Api/AccountClassificationController.php`)
