# sandun963/cms architecture

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

- Interactive diagram: https://gitdiagram.com/sandun963/cms
- Repository: https://github.com/sandun963/cms

## Overview

This Laravel application manages IT breakdown requests through submission, administrative assignment, technical resolution, and ministry-user verification. It also provides role-specific dashboards, user and department administration, location management, reports, escalation handling, and due-date alerts. The graph follows documented workflow ownership and source-index references; several controllers and models were not excerpted, so their internal calls are not inferred. Email notifications and PDF/Excel export are documented as future work, not implemented capabilities.

Main entry points: [`routes/web.php`](https://github.com/sandun963/cms/blob/main/routes/web.php) (Web routes), [`app/Models/BreakdownRequest.php`](https://github.com/sandun963/cms/blob/main/app/Models/BreakdownRequest.php) (Breakdown requests), [`app/Http/Controllers/WorkReportController.php`](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/WorkReportController.php) (Work reports), [`app/Http/Controllers/DashboardController.php`](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/DashboardController.php) (Role dashboards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Request workflow"]
  node_requestctl["Request handling"]
  node_requests["Breakdown requests"]
  node_assignctl["IT assignment"]
  node_assignments["Assignments<br/>[Assignment.php]"]
  node_officerctl["Officer assignment"]
  node_officerassignments["Technician assignments"]
  node_workctl["Work reports"]
  node_workreports["Work report records<br/>[WorkReport.php]"]
  node_confirmctl["Department verification"]
  node_confirmations["Confirmations"]
  node_activity["Activity timeline<br/>[ActivityLog.php]"]
  node_attachments["File attachments<br/>[Attachment.php]"]
end

subgraph group_operations["Operations and alerts"]
  node_dashboard["Role dashboards"]
  node_escalations["Escalation handling"]
  node_escalationrecords["Escalation records<br/>[Escalation.php]"]
  node_notify["Due-date alerts"]
end

subgraph group_admin["Administration"]
  node_login["Authentication"]
  node_users["User records<br/>[User.php]"]
  node_userctl["User administration<br/>[UserController.php]"]
  node_departments["Department records<br/>[Department.php]"]
  node_categories["Category management"]
end

subgraph group_insight["Reporting and locations"]
  node_locations["Location management"]
  node_floors["Floor records<br/>[Floor.php]"]
  node_divisions["Division records<br/>[Division.php]"]
  node_areas["Area records<br/>[Area.php]"]
  node_reports["Reports and filters"]
end

node_ministry(("Ministry user"))
node_ithead(("IT Head"))
node_assigner(("Assign Officer"))
node_technician(("Technical Officer"))
node_routes["Web routes<br/>[web.php]"]

node_ministry -->|"submits request"| node_requestctl
node_requestctl -->|"creates request"| node_requests
node_ithead -->|"reviews and assigns"| node_assignctl
node_assignctl -->|"creates assignment"| node_assignments
node_assignctl -->|"updates status"| node_requests
node_assigner -->|"selects technician"| node_officerctl
node_officerctl -->|"creates assignment"| node_officerassignments
node_officerctl -->|"updates assignee"| node_requests
node_technician -->|"files work report"| node_workctl
node_workctl -->|"stores report"| node_workreports
node_workctl -->|"updates status"| node_requests
node_ministry -->|"verifies resolution"| node_confirmctl
node_confirmctl -->|"records decision"| node_confirmations
node_confirmctl -->|"closes or reopens"| node_requests
node_login -->|"authenticates"| node_users
node_login -->|"logs login"| node_activity
node_requestctl -.->|"logs activity"| node_activity
node_workctl -->|"logs activity"| node_activity
node_workctl -->|"stores files"| node_attachments
node_dashboard -->|"summarizes requests"| node_requests
node_dashboard -->|"summarizes assignments"| node_assignments
node_dashboard -->|"summarizes technician work"| node_officerassignments
node_escalations -->|"reads request"| node_requests
node_escalations -->|"manages escalation"| node_escalationrecords
node_notify -->|"checks due dates"| node_officerassignments
node_notify -->|"reads escalations"| node_escalationrecords
node_userctl -->|"manages users"| node_users
node_categories -->|"uses request category"| node_requests
node_locations -->|"manages locations"| node_floors
node_locations -->|"manages locations"| node_divisions
node_locations -->|"manages locations"| node_areas
node_reports -->|"aggregates and filters"| node_requests
node_routes -->|"routes requests"| node_requestctl
node_routes -->|"routes dashboards"| node_dashboard
node_routes -->|"routes assignments"| node_assignctl
node_routes -->|"routes assignments"| node_officerctl
node_routes -->|"routes reports"| node_workctl
node_routes -->|"routes verification"| node_confirmctl
node_routes -->|"routes escalation"| node_escalations
node_routes -->|"routes reporting"| node_reports
node_routes -->|"routes locations"| node_locations

click node_requestctl "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/BreakdownRequestController.php"
click node_requests "https://github.com/sandun963/cms/blob/main/app/Models/BreakdownRequest.php"
click node_assignctl "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/AssignmentController.php"
click node_assignments "https://github.com/sandun963/cms/blob/main/app/Models/Assignment.php"
click node_officerctl "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/OfficerAssignmentController.php"
click node_officerassignments "https://github.com/sandun963/cms/blob/main/app/Models/OfficerAssignment.php"
click node_workctl "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/WorkReportController.php"
click node_workreports "https://github.com/sandun963/cms/blob/main/app/Models/WorkReport.php"
click node_confirmctl "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/DepartmentConfirmationController.php"
click node_confirmations "https://github.com/sandun963/cms/blob/main/app/Models/DepartmentConfirmation.php"
click node_activity "https://github.com/sandun963/cms/blob/main/app/Models/ActivityLog.php"
click node_attachments "https://github.com/sandun963/cms/blob/main/app/Models/Attachment.php"
click node_dashboard "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/DashboardController.php"
click node_escalations "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/EscalationController.php"
click node_escalationrecords "https://github.com/sandun963/cms/blob/main/app/Models/Escalation.php"
click node_notify "https://github.com/sandun963/cms/blob/main/app/Services/NotificationService.php"
click node_login "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/Auth/LoginController.php"
click node_users "https://github.com/sandun963/cms/blob/main/app/Models/User.php"
click node_userctl "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/UserController.php"
click node_departments "https://github.com/sandun963/cms/blob/main/app/Models/Department.php"
click node_categories "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/CategoryController.php"
click node_locations "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/LocationController.php"
click node_floors "https://github.com/sandun963/cms/blob/main/app/Models/Floor.php"
click node_divisions "https://github.com/sandun963/cms/blob/main/app/Models/Division.php"
click node_areas "https://github.com/sandun963/cms/blob/main/app/Models/Area.php"
click node_reports "https://github.com/sandun963/cms/blob/main/app/Http/Controllers/ReportController.php"
click node_routes "https://github.com/sandun963/cms/blob/main/routes/web.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_requestctl,node_requests,node_assignctl,node_assignments,node_officerctl,node_officerassignments,node_workctl,node_workreports,node_confirmctl,node_confirmations,node_activity,node_attachments,node_ministry toneBlue
class node_dashboard,node_escalations,node_escalationrecords,node_notify toneAmber
class node_login,node_users,node_userctl,node_departments,node_categories,node_routes toneMint
class node_locations,node_floors,node_divisions,node_areas,node_reports toneRose
class node_ithead,node_assigner,node_technician toneIndigo
```

## Components

### Request workflow

- [Request handling](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/BreakdownRequestController.php): `app/Http/Controllers/BreakdownRequestController.php`
- [Breakdown requests](https://github.com/sandun963/cms/blob/main/app/Models/BreakdownRequest.php): `app/Models/BreakdownRequest.php`
- [IT assignment](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/AssignmentController.php): `app/Http/Controllers/AssignmentController.php`
- [Assignments](https://github.com/sandun963/cms/blob/main/app/Models/Assignment.php): `app/Models/Assignment.php`
- [Officer assignment](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/OfficerAssignmentController.php): `app/Http/Controllers/OfficerAssignmentController.php`
- [Technician assignments](https://github.com/sandun963/cms/blob/main/app/Models/OfficerAssignment.php): `app/Models/OfficerAssignment.php`
- [Work reports](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/WorkReportController.php): `app/Http/Controllers/WorkReportController.php`
- [Work report records](https://github.com/sandun963/cms/blob/main/app/Models/WorkReport.php): `app/Models/WorkReport.php`
- [Department verification](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/DepartmentConfirmationController.php): `app/Http/Controllers/DepartmentConfirmationController.php`
- [Confirmations](https://github.com/sandun963/cms/blob/main/app/Models/DepartmentConfirmation.php): `app/Models/DepartmentConfirmation.php`
- [Activity timeline](https://github.com/sandun963/cms/blob/main/app/Models/ActivityLog.php): `app/Models/ActivityLog.php`
- [File attachments](https://github.com/sandun963/cms/blob/main/app/Models/Attachment.php): `app/Models/Attachment.php`

### Operations and alerts

- [Role dashboards](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Escalation handling](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/EscalationController.php): `app/Http/Controllers/EscalationController.php`
- [Escalation records](https://github.com/sandun963/cms/blob/main/app/Models/Escalation.php): `app/Models/Escalation.php`
- [Due-date alerts](https://github.com/sandun963/cms/blob/main/app/Services/NotificationService.php): `app/Services/NotificationService.php`

### Administration

- [Authentication](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`
- [User records](https://github.com/sandun963/cms/blob/main/app/Models/User.php): `app/Models/User.php`
- [User administration](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`
- [Department records](https://github.com/sandun963/cms/blob/main/app/Models/Department.php): `app/Models/Department.php`
- [Category management](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/CategoryController.php): `app/Http/Controllers/CategoryController.php`

### Reporting and locations

- [Location management](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/LocationController.php): `app/Http/Controllers/LocationController.php`
- [Floor records](https://github.com/sandun963/cms/blob/main/app/Models/Floor.php): `app/Models/Floor.php`
- [Division records](https://github.com/sandun963/cms/blob/main/app/Models/Division.php): `app/Models/Division.php`
- [Area records](https://github.com/sandun963/cms/blob/main/app/Models/Area.php): `app/Models/Area.php`
- [Reports and filters](https://github.com/sandun963/cms/blob/main/app/Http/Controllers/ReportController.php): `app/Http/Controllers/ReportController.php`

### Other components

- **Ministry user**
- **IT Head**
- **Assign Officer**
- **Technical Officer**
- [Web routes](https://github.com/sandun963/cms/blob/main/routes/web.php): `routes/web.php`

## Connections

- Ministry user → Request handling: submits request
- Request handling → Breakdown requests: creates request (evidence: `app/Http/Controllers/BreakdownRequestController.php`)
- IT Head → IT assignment: reviews and assigns
- IT assignment → Assignments: creates assignment
- IT assignment → Breakdown requests: updates status
- Assign Officer → Officer assignment: selects technician
- Officer assignment → Technician assignments: creates assignment
- Officer assignment → Breakdown requests: updates assignee
- Technical Officer → Work reports: files work report
- Work reports → Work report records: stores report (evidence: `app/Http/Controllers/WorkReportController.php`)
- Work reports → Breakdown requests: updates status
- Ministry user → Department verification: verifies resolution
- Department verification → Confirmations: records decision (evidence: `app/Http/Controllers/DepartmentConfirmationController.php`)
- Department verification → Breakdown requests: closes or reopens
- Authentication → User records: authenticates (evidence: `app/Http/Controllers/Auth/LoginController.php`)
- Authentication → Activity timeline: logs login (evidence: `app/Http/Controllers/Auth/LoginController.php`)
- Request handling → Activity timeline: logs activity (evidence: `app/Http/Controllers/BreakdownRequestController.php`)
- Work reports → Activity timeline: logs activity (evidence: `app/Http/Controllers/WorkReportController.php`)
- Work reports → File attachments: stores files (evidence: `app/Http/Controllers/WorkReportController.php`)
- Role dashboards → Breakdown requests: summarizes requests (evidence: `app/Http/Controllers/DashboardController.php`)
- Role dashboards → Assignments: summarizes assignments (evidence: `app/Http/Controllers/DashboardController.php`)
- Role dashboards → Technician assignments: summarizes technician work (evidence: `app/Http/Controllers/DashboardController.php`)
- Escalation handling → Breakdown requests: reads request (evidence: `app/Http/Controllers/EscalationController.php`)
- Escalation handling → Escalation records: manages escalation (evidence: `app/Http/Controllers/EscalationController.php`)
- Due-date alerts → Technician assignments: checks due dates (evidence: `app/Services/NotificationService.php`)
- Due-date alerts → Escalation records: reads escalations (evidence: `app/Services/NotificationService.php`)
- User administration → User records: manages users (evidence: `app/Http/Controllers/UserController.php`)
- Category management → Breakdown requests: uses request category
- Location management → Floor records: manages locations (evidence: `app/Http/Controllers/LocationController.php`)
- Location management → Division records: manages locations (evidence: `app/Http/Controllers/LocationController.php`)
- Location management → Area records: manages locations (evidence: `app/Http/Controllers/LocationController.php`)
- Reports and filters → Breakdown requests: aggregates and filters (evidence: `app/Http/Controllers/ReportController.php`)
- Web routes → Request handling: routes requests (evidence: `routes/web.php`)
- Web routes → Role dashboards: routes dashboards (evidence: `routes/web.php`)
- Web routes → IT assignment: routes assignments (evidence: `routes/web.php`)
- Web routes → Officer assignment: routes assignments (evidence: `routes/web.php`)
- Web routes → Work reports: routes reports (evidence: `routes/web.php`)
- Web routes → Department verification: routes verification (evidence: `routes/web.php`)
- Web routes → Escalation handling: routes escalation (evidence: `routes/web.php`)
- Web routes → Reports and filters: routes reporting (evidence: `routes/web.php`)
- Web routes → Location management: routes locations (evidence: `routes/web.php`)
