# arnaut560000/shared-ppmp architecture

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

- Interactive diagram: https://gitdiagram.com/arnaut560000/shared-ppmp
- Repository: https://github.com/arnaut560000/shared-ppmp

## Overview

This is an authenticated municipal planning and procurement application. Department users create annual AIP program headings and PPAs, then prepare monthly PPMPs whose saved costs reserve office budget; plans proceed through review and approval, with reporting, purchase requests, and inventory as downstream capabilities. The graph preserves those documented product branches. Some controller and service internals were not sampled, so relationships for those branches rely on the README rather than inferred call chains.

Main entry points: [`app/Services/PlanningService.php`](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/PlanningService.php) (Planning and approvals), [`app/Http/Controllers/PpmpController.php`](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PpmpController.php) (Monthly PPMPs), [`app/Http/Controllers/PurchaseRequestController.php`](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PurchaseRequestController.php) (Purchase requests), [`app/Http/Controllers/PpmpReceivingController.php`](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PpmpReceivingController.php) (PPMP receiving)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and shell"]
  node_app_shell["Application shell<br/>[app.tsx]"]
  node_auth_routes["Authentication flows<br/>[auth.php]"]
  node_registration["Registration"]
  node_user_model["User accounts<br/>[User.php]"]
end

subgraph group_planning["Annual planning"]
  node_aip_documents["Annual AIP documents"]
  node_ppa_workspace["PPA workspace<br/>[AipController.php]"]
  node_planning_rules["Planning and approvals"]
  node_planning_access["Role and plan access<br/>[PlanningAccess.php]"]
  node_annual_review["Annual review"]
  node_plans[("Plans and hierarchy<br/>[Plan.php]")]
end

subgraph group_procurement["Procurement workflow"]
  node_ppmp_workspace["Monthly PPMPs<br/>[PpmpController.php]"]
  node_catalogue[("Procurement catalogue")]
  node_ppmp_approval["PPMP approval"]
  node_app_consolidation["APP consolidation"]
  node_consolidated_report["Consolidated PPMP report"]
  node_workbook["PPMP workbook export<br/>[PpmpWorkbook.php]"]
  node_purchase_requests["Purchase requests"]
  node_numbered_orders["Numbered PR orders"]
end

subgraph group_operations["Budget and operations"]
  node_budget_allocations["Office budget allocation"]
  node_budget_service["Budget ceilings and totals"]
  node_receiving["PPMP receiving"]
  node_receiving_service["Receiving service<br/>[PpmpReceiving.php]"]
  node_inventory_registration["Asset registration"]
  node_inventory["Equipment inventory"]
  node_database[("SQLite database")]
end

node_department_user(("Department user"))
node_admin_budget(("Admin / Budget Office"))

node_department_user -->|"registers or signs in"| node_auth_routes
node_auth_routes -->|"routes registration"| node_registration
node_registration -->|"creates account"| node_user_model
node_department_user -->|"opens annual AIP"| node_aip_documents
node_aip_documents -->|"opens PPA workspace"| node_ppa_workspace
node_ppa_workspace -->|"saves plan data"| node_planning_rules
node_planning_rules -->|"checks permissions"| node_planning_access
node_planning_rules -->|"creates and updates"| node_plans
node_admin_budget -->|"assigns ceilings"| node_budget_allocations
node_budget_allocations -->|"manages available funds"| node_budget_service
node_budget_service -->|"aggregates plan costs"| node_plans
node_department_user -->|"prepares monthly lists"| node_ppmp_workspace
node_ppmp_workspace -->|"selects catalogue items"| node_catalogue
node_ppmp_workspace -->|"saves PPMP draft"| node_planning_rules
node_department_user -->|"submits annual AIP"| node_annual_review
node_annual_review -->|"reviews and records decisions"| node_planning_rules
node_ppmp_approval -->|"records approval status"| node_planning_rules
node_app_consolidation -->|"aggregates approved PPMPs"| node_consolidated_report
node_ppmp_workspace -->|"exports workbook"| node_workbook
node_department_user -->|"starts purchase request"| node_purchase_requests
node_purchase_requests -->|"numbers PR orders"| node_numbered_orders
node_purchase_requests -.->|"continues to receiving"| node_receiving
node_receiving -->|"processes receipts"| node_receiving_service
node_receiving -->|"registers received assets"| node_inventory_registration
node_inventory -.->|"reads and updates assets"| node_database
node_app_shell -.->|"serves application UI"| node_department_user

click node_app_shell "https://github.com/arnaut560000/shared-ppmp/blob/main/resources/js/app.tsx"
click node_auth_routes "https://github.com/arnaut560000/shared-ppmp/blob/main/routes/auth.php"
click node_registration "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_user_model "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Models/User.php"
click node_aip_documents "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/AipDocumentController.php"
click node_ppa_workspace "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/AipController.php"
click node_planning_rules "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/PlanningService.php"
click node_planning_access "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/PlanningAccess.php"
click node_annual_review "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/AipSummaryController.php"
click node_plans "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Models/Plan.php"
click node_budget_allocations "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/OfficeBudgetController.php"
click node_budget_service "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/OfficeBudgetService.php"
click node_ppmp_workspace "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PpmpController.php"
click node_catalogue "https://github.com/arnaut560000/shared-ppmp/blob/main/database/seeders/PpmpCatalogueSeeder.php"
click node_ppmp_approval "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PpmpApprovalController.php"
click node_app_consolidation "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/AnnualProcurementController.php"
click node_consolidated_report "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/ConsolidatedPpmpReport.php"
click node_workbook "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/PpmpWorkbook.php"
click node_purchase_requests "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PurchaseRequestController.php"
click node_numbered_orders "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/NumberedPrOrders.php"
click node_receiving "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PpmpReceivingController.php"
click node_receiving_service "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/PpmpReceiving.php"
click node_inventory_registration "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/InventoryRegistration.php"
click node_inventory "https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/InventoryController.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_app_shell,node_auth_routes,node_registration,node_user_model,node_department_user toneBlue
class node_aip_documents,node_ppa_workspace,node_planning_rules,node_planning_access,node_annual_review,node_plans toneAmber
class node_ppmp_workspace,node_catalogue,node_ppmp_approval,node_app_consolidation,node_consolidated_report,node_workbook,node_purchase_requests,node_numbered_orders toneMint
class node_budget_allocations,node_budget_service,node_receiving,node_receiving_service,node_inventory_registration,node_inventory,node_database toneRose
class node_admin_budget toneIndigo
```

## Components

### Access and shell

- [Application shell](https://github.com/arnaut560000/shared-ppmp/blob/main/resources/js/app.tsx): `resources/js/app.tsx`
- [Authentication flows](https://github.com/arnaut560000/shared-ppmp/blob/main/routes/auth.php): `routes/auth.php`
- [Registration](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [User accounts](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Models/User.php): `app/Models/User.php`

### Annual planning

- [Annual AIP documents](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/AipDocumentController.php): `app/Http/Controllers/AipDocumentController.php`
- [PPA workspace](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/AipController.php): `app/Http/Controllers/AipController.php`
- [Planning and approvals](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/PlanningService.php): `app/Services/PlanningService.php`
- [Role and plan access](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/PlanningAccess.php): `app/Services/PlanningAccess.php`
- [Annual review](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/AipSummaryController.php): `app/Http/Controllers/AipSummaryController.php`
- [Plans and hierarchy](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Models/Plan.php): `app/Models/Plan.php`

### Procurement workflow

- [Monthly PPMPs](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PpmpController.php): `app/Http/Controllers/PpmpController.php`
- [Procurement catalogue](https://github.com/arnaut560000/shared-ppmp/blob/main/database/seeders/PpmpCatalogueSeeder.php): `database/seeders/PpmpCatalogueSeeder.php`
- [PPMP approval](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PpmpApprovalController.php): `app/Http/Controllers/PpmpApprovalController.php`
- [APP consolidation](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/AnnualProcurementController.php): `app/Http/Controllers/AnnualProcurementController.php`
- [Consolidated PPMP report](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/ConsolidatedPpmpReport.php): `app/Services/ConsolidatedPpmpReport.php`
- [PPMP workbook export](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/PpmpWorkbook.php): `app/Services/PpmpWorkbook.php`
- [Purchase requests](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PurchaseRequestController.php): `app/Http/Controllers/PurchaseRequestController.php`
- [Numbered PR orders](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/NumberedPrOrders.php): `app/Services/NumberedPrOrders.php`

### Budget and operations

- [Office budget allocation](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/OfficeBudgetController.php): `app/Http/Controllers/OfficeBudgetController.php`
- [Budget ceilings and totals](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/OfficeBudgetService.php): `app/Services/OfficeBudgetService.php`
- [PPMP receiving](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/PpmpReceivingController.php): `app/Http/Controllers/PpmpReceivingController.php`
- [Receiving service](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/PpmpReceiving.php): `app/Services/PpmpReceiving.php`
- [Asset registration](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Services/InventoryRegistration.php): `app/Services/InventoryRegistration.php`
- [Equipment inventory](https://github.com/arnaut560000/shared-ppmp/blob/main/app/Http/Controllers/InventoryController.php): `app/Http/Controllers/InventoryController.php`
- **SQLite database**

### Other components

- **Department user**
- **Admin / Budget Office**

## Connections

- Department user → Authentication flows: registers or signs in (evidence: `routes/auth.php`)
- Authentication flows → Registration: routes registration (evidence: `routes/auth.php`)
- Registration → User accounts: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Department user → Annual AIP documents: opens annual AIP (evidence: `README.md`)
- Annual AIP documents → PPA workspace: opens PPA workspace (evidence: `README.md`)
- PPA workspace → Planning and approvals: saves plan data (evidence: `app/Http/Controllers/AipController.php`)
- Planning and approvals → Role and plan access: checks permissions (evidence: `app/Services/PlanningService.php`)
- Planning and approvals → Plans and hierarchy: creates and updates (evidence: `app/Services/PlanningService.php`)
- Admin / Budget Office → Office budget allocation: assigns ceilings (evidence: `README.md`)
- Office budget allocation → Budget ceilings and totals: manages available funds (evidence: `README.md`)
- Budget ceilings and totals → Plans and hierarchy: aggregates plan costs (evidence: `app/Services/OfficeBudgetService.php`)
- Department user → Monthly PPMPs: prepares monthly lists (evidence: `README.md`)
- Monthly PPMPs → Procurement catalogue: selects catalogue items (evidence: `README.md`)
- Monthly PPMPs → Planning and approvals: saves PPMP draft (evidence: `app/Services/PlanningService.php`)
- Department user → Annual review: submits annual AIP (evidence: `README.md`)
- Annual review → Planning and approvals: reviews and records decisions (evidence: `README.md`)
- PPMP approval → Planning and approvals: records approval status (evidence: `app/Services/PlanningService.php`)
- APP consolidation → Consolidated PPMP report: aggregates approved PPMPs (evidence: `README.md`)
- Monthly PPMPs → PPMP workbook export: exports workbook (evidence: `README.md`)
- Department user → Purchase requests: starts purchase request (evidence: `README.md`)
- Purchase requests → Numbered PR orders: numbers PR orders (evidence: `app/Http/Controllers/PurchaseRequestController.php`)
- Purchase requests → PPMP receiving: continues to receiving (evidence: `README.md`)
- PPMP receiving → Receiving service: processes receipts (evidence: `app/Http/Controllers/PpmpReceivingController.php`)
- PPMP receiving → Asset registration: registers received assets (evidence: `app/Http/Controllers/PpmpReceivingController.php`)
- Equipment inventory → SQLite database: reads and updates assets
- Application shell → Department user: serves application UI
