# eloquent-dev/city-voice architecture

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

- Interactive diagram: https://gitdiagram.com/eloquent-dev/city-voice
- Repository: https://github.com/eloquent-dev/city-voice

## Overview

This is a Laravel municipal complaint and work-order application. Citizens submit and track complaints; staff route work to employees, workers report completion, and administrators review outcomes before citizen feedback and reporting. The map includes authentication, dispatch, review, and core domain records. Relationships are limited to those visible in excerpts or the SOURCE INDEX; several capabilities are evident from the tree but their implementation and wiring were not sampled, so their links are omitted rather than inferred.

Main entry points: [`app/Models/Complaint.php`](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Complaint.php) (Complaints), [`app/Models/JobOrder.php`](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/JobOrder.php) (Job orders), [`app/Services/ReviewService.php`](https://github.com/eloquent-dev/city-voice/blob/main/app/Services/ReviewService.php) (Review decisions), [`app/Models/Division.php`](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Division.php) (Divisions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and entry"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_google["Google sign-in"]
end

subgraph group_operations["Complaint operations"]
  node_complaint_controller["Complaint intake"]
  node_complaint_service["Complaint handling"]
  node_dashboard["Dashboard"]
  node_feedback["Citizen feedback"]
  node_notification["Status notification"]
end

subgraph group_staff["Staff workflow"]
  node_dispatcher["Dispatch"]
  node_dispatch_service["Dispatch logic"]
  node_worker["Worker assignments"]
  node_worker_service["Worker operations<br/>[WorkerService.php]"]
  node_review["Administrator review"]
  node_review_service["Review decisions<br/>[ReviewService.php]"]
  node_reports["Administrative reports<br/>[ReportService.php]"]
  node_admin_users["User administration"]
end

subgraph group_records["Domain records"]
  node_user[("User accounts<br/>[User.php]")]
  node_complaint[("Complaints<br/>[Complaint.php]")]
  node_category[("Categories<br/>[Category.php]")]
  node_joborder[("Job orders<br/>[JobOrder.php]")]
  node_employee[("Employees<br/>[Employee.php]")]
  node_division[("Divisions<br/>[Division.php]")]
  node_department[("Departments<br/>[Department.php]")]
  node_section[("Sections<br/>[Section.php]")]
  node_feedback_model[("Feedback records<br/>[Feedback.php]")]
  node_complaint_log[("Complaint history<br/>[ComplaintLog.php]")]
  node_completion[("Completion reports")]
  node_admin_report[("Report records<br/>[AdminReport.php]")]
end

node_citizen(("Citizens"))
node_staff_actor(("Staff"))

node_citizen -->|"signs in"| node_auth
node_auth -->|"creates account"| node_user
node_citizen -->|"submits complaint"| node_complaint_controller
node_complaint_controller -->|"delegates handling"| node_complaint_service
node_complaint_controller -->|"reads categories"| node_category
node_complaint_service -.->|"manages complaints"| node_complaint
node_staff_actor -.->|"routes work"| node_dispatcher
node_dispatcher -->|"delegates dispatch"| node_dispatch_service
node_dispatch_service -->|"manages assignments"| node_joborder
node_dispatch_service -->|"selects workers"| node_employee
node_staff_actor -->|"updates work"| node_worker
node_worker -->|"delegates operations"| node_worker_service
node_worker_service -.->|"updates status"| node_joborder
node_staff_actor -.->|"reviews completion"| node_review
node_review -->|"submits decision"| node_review_service
node_review_service -->|"updates outcome"| node_joborder
node_review_service -->|"updates complaint"| node_complaint
node_review_service -->|"notifies user"| node_notification
node_citizen -.->|"provides feedback"| node_feedback
node_feedback -->|"records feedback"| node_feedback_model
node_dashboard -->|"reads complaints"| node_complaint
node_reports -->|"reports on"| node_complaint
node_reports -->|"uses report records"| node_admin_report
node_admin_users -->|"manages accounts"| node_user
node_admin_users -->|"updates complaint details"| node_complaint
node_complaint -->|"writes status history"| node_complaint_log
node_complaint -->|"belongs to"| node_user
node_complaint -->|"belongs to"| node_category
node_complaint -->|"has job orders"| node_joborder
node_user -->|"has employee profile"| node_employee
node_joborder -->|"assigns workers"| node_employee
node_employee -->|"belongs to"| node_division
node_division -->|"belongs to"| node_department
node_division -->|"has sections"| node_section
node_division -->|"has categories"| node_category
node_joborder -->|"has completion report"| node_completion

click node_auth "https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/AuthController.php"
click node_google "https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/oAuth/GoogleController.php"
click node_complaint_controller "https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/ComplaintController.php"
click node_complaint_service "https://github.com/eloquent-dev/city-voice/blob/main/app/Services/ComplaintService.php"
click node_dashboard "https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/DashboardController.php"
click node_dispatcher "https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/DispatcherController.php"
click node_dispatch_service "https://github.com/eloquent-dev/city-voice/blob/main/app/Services/DispatcherService.php"
click node_worker "https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/WorkerController.php"
click node_worker_service "https://github.com/eloquent-dev/city-voice/blob/main/app/Services/WorkerService.php"
click node_review "https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/Admin/ReviewController.php"
click node_review_service "https://github.com/eloquent-dev/city-voice/blob/main/app/Services/ReviewService.php"
click node_feedback "https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/FeedbackController.php"
click node_reports "https://github.com/eloquent-dev/city-voice/blob/main/app/Services/ReportService.php"
click node_user "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/User.php"
click node_complaint "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Complaint.php"
click node_category "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Category.php"
click node_joborder "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/JobOrder.php"
click node_employee "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Employee.php"
click node_division "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Division.php"
click node_department "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Department.php"
click node_section "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Section.php"
click node_feedback_model "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Feedback.php"
click node_complaint_log "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/ComplaintLog.php"
click node_completion "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/CompletionReport.php"
click node_admin_report "https://github.com/eloquent-dev/city-voice/blob/main/app/Models/AdminReport.php"
click node_notification "https://github.com/eloquent-dev/city-voice/blob/main/app/Notifications/complaintStatusUpdated.php"
click node_admin_users "https://github.com/eloquent-dev/city-voice/blob/main/app/Services/AdminUserService.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_auth,node_google toneBlue
class node_complaint_controller,node_complaint_service,node_dashboard,node_feedback,node_notification toneAmber
class node_dispatcher,node_dispatch_service,node_worker,node_worker_service,node_review,node_review_service,node_reports,node_admin_users toneMint
class node_user,node_complaint,node_category,node_joborder,node_employee,node_division,node_department,node_section,node_feedback_model,node_complaint_log,node_completion,node_admin_report toneRose
class node_citizen,node_staff_actor toneIndigo
```

## Components

### Access and entry

- [Authentication](https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Google sign-in](https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/oAuth/GoogleController.php): `app/Http/Controllers/oAuth/GoogleController.php`

### Complaint operations

- [Complaint intake](https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/ComplaintController.php): `app/Http/Controllers/ComplaintController.php`
- [Complaint handling](https://github.com/eloquent-dev/city-voice/blob/main/app/Services/ComplaintService.php): `app/Services/ComplaintService.php`
- [Dashboard](https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Citizen feedback](https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/FeedbackController.php): `app/Http/Controllers/FeedbackController.php`
- [Status notification](https://github.com/eloquent-dev/city-voice/blob/main/app/Notifications/complaintStatusUpdated.php): `app/Notifications/complaintStatusUpdated.php`

### Staff workflow

- [Dispatch](https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/DispatcherController.php): `app/Http/Controllers/DispatcherController.php`
- [Dispatch logic](https://github.com/eloquent-dev/city-voice/blob/main/app/Services/DispatcherService.php): `app/Services/DispatcherService.php`
- [Worker assignments](https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/WorkerController.php): `app/Http/Controllers/WorkerController.php`
- [Worker operations](https://github.com/eloquent-dev/city-voice/blob/main/app/Services/WorkerService.php): `app/Services/WorkerService.php`
- [Administrator review](https://github.com/eloquent-dev/city-voice/blob/main/app/Http/Controllers/Admin/ReviewController.php): `app/Http/Controllers/Admin/ReviewController.php`
- [Review decisions](https://github.com/eloquent-dev/city-voice/blob/main/app/Services/ReviewService.php): `app/Services/ReviewService.php`
- [Administrative reports](https://github.com/eloquent-dev/city-voice/blob/main/app/Services/ReportService.php): `app/Services/ReportService.php`
- [User administration](https://github.com/eloquent-dev/city-voice/blob/main/app/Services/AdminUserService.php): `app/Services/AdminUserService.php`

### Domain records

- [User accounts](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/User.php): `app/Models/User.php`
- [Complaints](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Complaint.php): `app/Models/Complaint.php`
- [Categories](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Category.php): `app/Models/Category.php`
- [Job orders](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/JobOrder.php): `app/Models/JobOrder.php`
- [Employees](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Employee.php): `app/Models/Employee.php`
- [Divisions](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Division.php): `app/Models/Division.php`
- [Departments](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Department.php): `app/Models/Department.php`
- [Sections](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Section.php): `app/Models/Section.php`
- [Feedback records](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/Feedback.php): `app/Models/Feedback.php`
- [Complaint history](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/ComplaintLog.php): `app/Models/ComplaintLog.php`
- [Completion reports](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/CompletionReport.php): `app/Models/CompletionReport.php`
- [Report records](https://github.com/eloquent-dev/city-voice/blob/main/app/Models/AdminReport.php): `app/Models/AdminReport.php`

### Other components

- **Citizens**
- **Staff**

## Connections

- Citizens → Authentication: signs in
- Authentication → User accounts: creates account (evidence: `app/Http/Controllers/AuthController.php`)
- Citizens → Complaint intake: submits complaint
- Complaint intake → Complaint handling: delegates handling (evidence: `app/Http/Controllers/ComplaintController.php`)
- Complaint intake → Categories: reads categories (evidence: `app/Http/Controllers/ComplaintController.php`)
- Complaint handling → Complaints: manages complaints
- Staff → Dispatch: routes work
- Dispatch → Dispatch logic: delegates dispatch (evidence: `app/Http/Controllers/DispatcherController.php`)
- Dispatch logic → Job orders: manages assignments (evidence: `app/Services/DispatcherService.php`)
- Dispatch logic → Employees: selects workers (evidence: `app/Services/DispatcherService.php`)
- Staff → Worker assignments: updates work
- Worker assignments → Worker operations: delegates operations (evidence: `app/Http/Controllers/WorkerController.php`)
- Worker operations → Job orders: updates status
- Staff → Administrator review: reviews completion
- Administrator review → Review decisions: submits decision (evidence: `app/Http/Controllers/Admin/ReviewController.php`)
- Review decisions → Job orders: updates outcome (evidence: `app/Services/ReviewService.php`)
- Review decisions → Complaints: updates complaint (evidence: `app/Services/ReviewService.php`)
- Review decisions → Status notification: notifies user (evidence: `app/Services/ReviewService.php`)
- Citizens → Citizen feedback: provides feedback
- Citizen feedback → Feedback records: records feedback (evidence: `app/Http/Controllers/FeedbackController.php`)
- Dashboard → Complaints: reads complaints (evidence: `app/Http/Controllers/DashboardController.php`)
- Administrative reports → Complaints: reports on (evidence: `app/Services/ReportService.php`)
- Administrative reports → Report records: uses report records (evidence: `app/Services/ReportService.php`)
- User administration → User accounts: manages accounts (evidence: `app/Services/AdminUserService.php`)
- User administration → Complaints: updates complaint details (evidence: `app/Services/AdminUserService.php`)
- Complaints → Complaint history: writes status history (evidence: `app/Models/Complaint.php`)
- Complaints → User accounts: belongs to (evidence: `app/Models/Complaint.php`)
- Complaints → Categories: belongs to (evidence: `app/Models/Complaint.php`)
- Complaints → Job orders: has job orders (evidence: `app/Models/Complaint.php`)
- User accounts → Employees: has employee profile (evidence: `app/Models/User.php`)
- Job orders → Employees: assigns workers (evidence: `app/Models/JobOrder.php`)
- Employees → Divisions: belongs to (evidence: `app/Models/Employee.php`)
- Divisions → Departments: belongs to (evidence: `app/Models/Division.php`)
- Divisions → Sections: has sections (evidence: `app/Models/Division.php`)
- Divisions → Categories: has categories (evidence: `app/Models/Division.php`)
- Job orders → Completion reports: has completion report (evidence: `app/Models/JobOrder.php`)
