# hicool-ml/workorder-system-public architecture

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

- Interactive diagram: https://gitdiagram.com/hicool-ml/workorder-system-public
- Repository: https://github.com/hicool-ml/workorder-system-public

## Overview

This is a Laravel work-order management platform for service desks, facilities, and equipment operations. Its main workflow is self-service fault reporting, dispatch or engineer pickup, collaborative repair, resolution and completion, followed by satisfaction follow-up. Separate branches manage locations and reference data, reporting, identity providers, notifications, signatures, and backups. The graph combines README-documented capabilities with source-index references and excerpts; unsampled controllers and routes are represented only where the README establishes their role, so some internal wiring is omitted.

Main entry points: [`app/Http/Controllers/WorkorderController.php`](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/WorkorderController.php) (Work-order operations), [`app/Models/Workorder.php`](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Workorder.php) (Work-order domain), [`app/Http/Controllers/Auth/OidcAuthController.php`](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/Auth/OidcAuthController.php) (Authentication), [`app/Services/Notification/NotificationDispatcher.php`](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Services/Notification/NotificationDispatcher.php) (Notification dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_work["Work-order lifecycle"]
  node_workorder_ui["Work-order screens<br/>[create.blade.php]"]
  node_reporting_form["Self-service report"]
  node_workorder_ctrl["Work-order operations"]
  node_report_trait["Report handling<br/>[HandlesReport.php]"]
  node_workorder["Work-order domain<br/>[Workorder.php]"]
  node_workorder_db[("Work-order records<br/>[Workorder.php]")]
  node_collaboration["Collaboration"]
  node_signatures["Signed work records"]
  node_attachments["Attachment access"]
end

subgraph group_admin["Operational administration"]
  node_reference_admin["Reference-data management"]
  node_location["Project locations<br/>[Location.php]"]
  node_category["Work-order categories"]
  node_workorder_type["Work-order types<br/>[WorkorderType.php]"]
  node_department["Departments<br/>[Department.php]"]
  node_user_admin["User administration"]
end

subgraph group_identity["Identity and platform"]
  node_users["Users and roles<br/>[User.php]"]
  node_auth["Authentication"]
  node_settings["System settings<br/>[SystemSetting.php]"]
  node_backup["Backup and restore"]
end

subgraph group_comms["Reports and communications"]
  node_reporting["Statistics and reports"]
  node_notifications["In-app notifications<br/>[Notification.php]"]
  node_dispatcher["Notification dispatch"]
  node_channels["IM notification channels"]
  node_sms["SMS delivery<br/>[SmsManager.php]"]
  node_visits["Satisfaction follow-up<br/>[WorkorderVisit.php]"]
end

node_requester(("Requester / engineer"))
node_database[("Relational database")]
node_identity_provider(("CAS / OIDC / OAuth"))
node_messaging_providers(("IM and SMS providers"))

node_requester -->|"reports fault"| node_reporting_form
node_reporting_form -->|"creates ticket"| node_workorder
node_requester -->|"handles ticket"| node_workorder_ui
node_workorder_ui -->|"submits actions"| node_workorder_ctrl
node_workorder_ctrl -->|"delegates report"| node_report_trait
node_workorder_ctrl -->|"updates lifecycle"| node_workorder
node_workorder -->|"persists state"| node_workorder_db
node_workorder_ctrl -->|"invites collaborators"| node_collaboration
node_workorder_ctrl -->|"starts signing"| node_signatures
node_workorder_ctrl -->|"manages files"| node_attachments
node_workorder_ctrl -->|"loads location options"| node_location
node_workorder_ctrl -->|"loads categories"| node_category
node_workorder_ctrl -->|"uses work-order types"| node_workorder_type
node_workorder_ctrl -->|"loads departments"| node_department
node_reference_admin -->|"maintains addresses"| node_location
node_user_admin -->|"manages accounts"| node_users
node_auth -->|"authenticates users"| node_users
node_auth -->|"reads provider config"| node_settings
node_auth -->|"exchanges identity"| node_identity_provider
node_reporting -->|"aggregates tickets"| node_workorder_db
node_workorder -->|"creates notices"| node_notifications
node_workorder -->|"dispatches events"| node_dispatcher
node_dispatcher -->|"sends IM"| node_channels
node_dispatcher -.->|"sends SMS"| node_sms
node_channels -->|"delivers messages"| node_messaging_providers
node_sms -->|"sends texts"| node_messaging_providers
node_workorder -->|"records follow-up"| node_visits
node_backup -->|"backs up data"| node_database
node_workorder_db -.->|"stores records"| node_database

click node_workorder_ui "https://github.com/hicool-ml/workorder-system-public/blob/main/resources/views/workorders/create.blade.php"
click node_reporting_form "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/ReportController.php"
click node_workorder_ctrl "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/WorkorderController.php"
click node_report_trait "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/Traits/HandlesReport.php"
click node_workorder "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Workorder.php"
click node_workorder_db "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Workorder.php"
click node_collaboration "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/WorkorderCollaboration.php"
click node_signatures "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/WorkorderSignatureController.php"
click node_attachments "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/AttachmentController.php"
click node_reference_admin "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/LocationController.php"
click node_location "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Location.php"
click node_category "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/WorkorderCategorySimplified.php"
click node_workorder_type "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/WorkorderType.php"
click node_department "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Department.php"
click node_user_admin "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/UserManagementController.php"
click node_users "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/User.php"
click node_auth "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/Auth/OidcAuthController.php"
click node_settings "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/SystemSetting.php"
click node_reporting "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/ReportController.php"
click node_notifications "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Notification.php"
click node_dispatcher "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Services/Notification/NotificationDispatcher.php"
click node_channels "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Services/Notification/WeComWebhookService.php"
click node_sms "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Services/Sms/SmsManager.php"
click node_visits "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/WorkorderVisit.php"
click node_backup "https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/BackupController.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_workorder_ui,node_reporting_form,node_workorder_ctrl,node_report_trait,node_workorder,node_workorder_db,node_collaboration,node_signatures,node_attachments toneBlue
class node_reference_admin,node_location,node_category,node_workorder_type,node_department,node_user_admin,node_database toneAmber
class node_users,node_auth,node_settings,node_backup,node_requester toneMint
class node_reporting,node_notifications,node_dispatcher,node_channels,node_sms,node_visits toneRose
class node_identity_provider,node_messaging_providers toneIndigo
```

## Components

### Work-order lifecycle

- [Work-order screens](https://github.com/hicool-ml/workorder-system-public/blob/main/resources/views/workorders/create.blade.php): `resources/views/workorders/create.blade.php`
- [Self-service report](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/ReportController.php): `app/Http/Controllers/ReportController.php`
- [Work-order operations](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/WorkorderController.php): `app/Http/Controllers/WorkorderController.php`
- [Report handling](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/Traits/HandlesReport.php): `app/Http/Controllers/Traits/HandlesReport.php`
- [Work-order domain](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Workorder.php): `app/Models/Workorder.php`
- [Work-order records](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Workorder.php): `app/Models/Workorder.php`
- [Collaboration](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/WorkorderCollaboration.php): `app/Models/WorkorderCollaboration.php`
- [Signed work records](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/WorkorderSignatureController.php): `app/Http/Controllers/WorkorderSignatureController.php`
- [Attachment access](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/AttachmentController.php): `app/Http/Controllers/AttachmentController.php`

### Operational administration

- [Reference-data management](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/LocationController.php): `app/Http/Controllers/LocationController.php`
- [Project locations](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Location.php): `app/Models/Location.php`
- [Work-order categories](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/WorkorderCategorySimplified.php): `app/Models/WorkorderCategorySimplified.php`
- [Work-order types](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/WorkorderType.php): `app/Models/WorkorderType.php`
- [Departments](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Department.php): `app/Models/Department.php`
- [User administration](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/UserManagementController.php): `app/Http/Controllers/UserManagementController.php`

### Identity and platform

- [Users and roles](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/User.php): `app/Models/User.php`
- [Authentication](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/Auth/OidcAuthController.php): `app/Http/Controllers/Auth/OidcAuthController.php`
- [System settings](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/SystemSetting.php): `app/Models/SystemSetting.php`
- [Backup and restore](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/BackupController.php): `app/Http/Controllers/BackupController.php`

### Reports and communications

- [Statistics and reports](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Http/Controllers/ReportController.php): `app/Http/Controllers/ReportController.php`
- [In-app notifications](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/Notification.php): `app/Models/Notification.php`
- [Notification dispatch](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Services/Notification/NotificationDispatcher.php): `app/Services/Notification/NotificationDispatcher.php`
- [IM notification channels](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Services/Notification/WeComWebhookService.php): `app/Services/Notification/WeComWebhookService.php`
- [SMS delivery](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Services/Sms/SmsManager.php): `app/Services/Sms/SmsManager.php`
- [Satisfaction follow-up](https://github.com/hicool-ml/workorder-system-public/blob/main/app/Models/WorkorderVisit.php): `app/Models/WorkorderVisit.php`

### Other components

- **Requester / engineer**
- **Relational database**
- **CAS / OIDC / OAuth**
- **IM and SMS providers**

## Connections

- Requester / engineer → Self-service report: reports fault (evidence: `README.md`)
- Self-service report → Work-order domain: creates ticket (evidence: `README.md`)
- Requester / engineer → Work-order screens: handles ticket (evidence: `README.md`)
- Work-order screens → Work-order operations: submits actions (evidence: `README.md`)
- Work-order operations → Report handling: delegates report (evidence: `app/Http/Controllers/WorkorderController.php`)
- Work-order operations → Work-order domain: updates lifecycle (evidence: `app/Http/Controllers/WorkorderController.php`)
- Work-order domain → Work-order records: persists state (evidence: `README.md`)
- Work-order operations → Collaboration: invites collaborators (evidence: `README.md`)
- Work-order operations → Signed work records: starts signing (evidence: `README.md`)
- Work-order operations → Attachment access: manages files (evidence: `README.md`)
- Work-order operations → Project locations: loads location options (evidence: `app/Http/Controllers/WorkorderController.php`)
- Work-order operations → Work-order categories: loads categories (evidence: `app/Http/Controllers/WorkorderController.php`)
- Work-order operations → Work-order types: uses work-order types (evidence: `app/Http/Controllers/WorkorderController.php`)
- Work-order operations → Departments: loads departments (evidence: `app/Http/Controllers/WorkorderController.php`)
- Reference-data management → Project locations: maintains addresses (evidence: `README.md`)
- User administration → Users and roles: manages accounts (evidence: `README.md`)
- Authentication → Users and roles: authenticates users (evidence: `app/Http/Controllers/Auth/OidcAuthController.php`)
- Authentication → System settings: reads provider config (evidence: `app/Http/Controllers/Auth/OidcAuthController.php`)
- Authentication → CAS / OIDC / OAuth: exchanges identity (evidence: `README.md`)
- Statistics and reports → Work-order records: aggregates tickets (evidence: `app/Http/Controllers/ReportController.php`)
- Work-order domain → In-app notifications: creates notices (evidence: `app/Models/Workorder.php`)
- Work-order domain → Notification dispatch: dispatches events (evidence: `app/Models/Workorder.php`)
- Notification dispatch → IM notification channels: sends IM (evidence: `README.md`)
- Notification dispatch → SMS delivery: sends SMS
- IM notification channels → IM and SMS providers: delivers messages (evidence: `README.md`)
- SMS delivery → IM and SMS providers: sends texts (evidence: `README.md`)
- Work-order domain → Satisfaction follow-up: records follow-up (evidence: `README.md`)
- Backup and restore → Relational database: backs up data (evidence: `README.md`)
- Work-order records → Relational database: stores records
