# joeryl69-rgb/raniag architecture

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

- Interactive diagram: https://gitdiagram.com/joeryl69-rgb/raniag
- Repository: https://github.com/joeryl69-rgb/raniag

## Overview

RANIAG is an incident and disaster-response coordination application for public reporters, administrators, agencies, and field personnel. The main workflow is report submission, triage and assignment, field response and evidence capture, resolution, and public tracking; the app also supports hazard and evacuation mapping, notifications, and operational reporting. This map reflects the provided tree and excerpts; unsampled routes and services are represented only where their product role is clear, and uncertain wiring is left unasserted.

Main entry points: [`app/Models/Incident.php`](https://github.com/joeryl69-rgb/raniag/blob/main/app/Models/Incident.php) (Incident records), [`app/Http/Controllers/Public/IncidentReportController.php`](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/IncidentReportController.php) (Incident reporting), [`app/Http/Controllers/Admin/IncidentController.php`](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Admin/IncidentController.php) (Admin operations), [`app/Http/Controllers/Agency/IncidentController.php`](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Agency/IncidentController.php) (Agency workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Public Intake"]
  node_public_web["Public portal<br/>[HomeController.php]"]
  node_submit["Incident reporting"]
  node_tracking["Incident tracking"]
  node_feedback["Public feedback"]
end

subgraph group_operations["Incident Operations"]
  node_incident[("Incident records<br/>[Incident.php]")]
  node_admin["Admin operations"]
  node_assignment["Dispatch assignment"]
  node_agency["Agency workspace"]
  node_documents["Document requests"]
  node_repository["Incident queries"]
end

subgraph group_response["Field Response"]
  node_personnel["Personnel workspace"]
  node_responder["Field updates"]
  node_evidence["Evidence handling"]
  node_resolution["Resolution workflow"]
end

subgraph group_insight["Maps &amp; Reporting"]
  node_hazard["Hazard mapping"]
  node_geofence["Geofence analysis"]
  node_evacuation[("Evacuation centers")]
  node_reports["Operational reports"]
  node_report_records["Report records"]
end

subgraph group_platform["Identity &amp; Messaging"]
  node_auth["Authentication"]
  node_users[("User accounts<br/>[User.php]")]
  node_notifications["Notifications"]
end

node_public(("Public users"))
node_sms{{"SMS gateway"}}

node_public -->|"visits"| node_public_web
node_public_web -.->|"opens reporting"| node_submit
node_public -.->|"files report"| node_submit
node_submit -.->|"creates report"| node_incident
node_incident -.->|"tracked by"| node_tracking
node_public -.->|"checks status"| node_tracking
node_public -.->|"sends feedback"| node_feedback
node_admin -.->|"manages"| node_incident
node_admin -.->|"dispatches"| node_assignment
node_assignment -.->|"assigns"| node_incident
node_agency -.->|"handles cases"| node_incident
node_agency -.->|"requests documents"| node_documents
node_personnel -->|"queries cases"| node_repository
node_repository -->|"loads records"| node_incident
node_personnel -.->|"updates field status"| node_responder
node_responder -->|"updates response"| node_incident
node_incident -->|"has evidence"| node_evidence
node_incident -->|"has resolutions"| node_resolution
node_hazard -->|"checks geometry"| node_geofence
node_hazard -->|"lists centers"| node_evacuation
node_reports -->|"summarizes"| node_incident
node_report_records -.->|"reports on"| node_incident
node_auth -->|"authenticates"| node_users
node_incident -.->|"notifies on events"| node_notifications
node_notifications -->|"sends SMS"| node_sms

click node_public_web "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/HomeController.php"
click node_submit "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/IncidentReportController.php"
click node_tracking "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/IncidentTrackController.php"
click node_feedback "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/FeedbackController.php"
click node_incident "https://github.com/joeryl69-rgb/raniag/blob/main/app/Models/Incident.php"
click node_admin "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Admin/IncidentController.php"
click node_assignment "https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/AssignmentService.php"
click node_agency "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Agency/IncidentController.php"
click node_documents "https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/DocumentRequestService.php"
click node_personnel "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Personnel/IncidentController.php"
click node_responder "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Shared/ResponderFieldController.php"
click node_evidence "https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/EvidenceService.php"
click node_resolution "https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/ResolutionService.php"
click node_hazard "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/HazardMapController.php"
click node_geofence "https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/GeofenceService.php"
click node_evacuation "https://github.com/joeryl69-rgb/raniag/blob/main/app/Models/EvacuationCenter.php"
click node_reports "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Admin/ReportController.php"
click node_report_records "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Admin/ReportRecordController.php"
click node_auth "https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_users "https://github.com/joeryl69-rgb/raniag/blob/main/app/Models/User.php"
click node_notifications "https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/NotificationService.php"
click node_repository "https://github.com/joeryl69-rgb/raniag/blob/main/app/Repositories/IncidentRepository.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_public_web,node_submit,node_tracking,node_feedback,node_public toneBlue
class node_incident,node_admin,node_assignment,node_agency,node_documents,node_repository toneAmber
class node_personnel,node_responder,node_evidence,node_resolution toneMint
class node_hazard,node_geofence,node_evacuation,node_reports,node_report_records toneRose
class node_auth,node_users,node_notifications,node_sms toneIndigo
```

## Components

### Public Intake

- [Public portal](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/HomeController.php): `app/Http/Controllers/Public/HomeController.php`
- [Incident reporting](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/IncidentReportController.php): `app/Http/Controllers/Public/IncidentReportController.php`
- [Incident tracking](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/IncidentTrackController.php): `app/Http/Controllers/Public/IncidentTrackController.php`
- [Public feedback](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/FeedbackController.php): `app/Http/Controllers/Public/FeedbackController.php`

### Incident Operations

- [Incident records](https://github.com/joeryl69-rgb/raniag/blob/main/app/Models/Incident.php): `app/Models/Incident.php`
- [Admin operations](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Admin/IncidentController.php): `app/Http/Controllers/Admin/IncidentController.php`
- [Dispatch assignment](https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/AssignmentService.php): `app/Services/AssignmentService.php`
- [Agency workspace](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Agency/IncidentController.php): `app/Http/Controllers/Agency/IncidentController.php`
- [Document requests](https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/DocumentRequestService.php): `app/Services/DocumentRequestService.php`
- [Incident queries](https://github.com/joeryl69-rgb/raniag/blob/main/app/Repositories/IncidentRepository.php): `app/Repositories/IncidentRepository.php`

### Field Response

- [Personnel workspace](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Personnel/IncidentController.php): `app/Http/Controllers/Personnel/IncidentController.php`
- [Field updates](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Shared/ResponderFieldController.php): `app/Http/Controllers/Shared/ResponderFieldController.php`
- [Evidence handling](https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/EvidenceService.php): `app/Services/EvidenceService.php`
- [Resolution workflow](https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/ResolutionService.php): `app/Services/ResolutionService.php`

### Maps & Reporting

- [Hazard mapping](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Public/HazardMapController.php): `app/Http/Controllers/Public/HazardMapController.php`
- [Geofence analysis](https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/GeofenceService.php): `app/Services/GeofenceService.php`
- [Evacuation centers](https://github.com/joeryl69-rgb/raniag/blob/main/app/Models/EvacuationCenter.php): `app/Models/EvacuationCenter.php`
- [Operational reports](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Admin/ReportController.php): `app/Http/Controllers/Admin/ReportController.php`
- [Report records](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Admin/ReportRecordController.php): `app/Http/Controllers/Admin/ReportRecordController.php`

### Identity & Messaging

- [Authentication](https://github.com/joeryl69-rgb/raniag/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [User accounts](https://github.com/joeryl69-rgb/raniag/blob/main/app/Models/User.php): `app/Models/User.php`
- [Notifications](https://github.com/joeryl69-rgb/raniag/blob/main/app/Services/NotificationService.php): `app/Services/NotificationService.php`

### Other components

- **Public users**
- **SMS gateway**

## Connections

- Public users → Public portal: visits
- Public portal → Incident reporting: opens reporting
- Public users → Incident reporting: files report
- Incident reporting → Incident records: creates report
- Incident records → Incident tracking: tracked by
- Public users → Incident tracking: checks status
- Public users → Public feedback: sends feedback
- Admin operations → Incident records: manages
- Admin operations → Dispatch assignment: dispatches
- Dispatch assignment → Incident records: assigns
- Agency workspace → Incident records: handles cases
- Agency workspace → Document requests: requests documents
- Personnel workspace → Incident queries: queries cases (evidence: `app/Http/Controllers/Personnel/IncidentController.php`)
- Incident queries → Incident records: loads records (evidence: `app/Repositories/IncidentRepository.php`)
- Personnel workspace → Field updates: updates field status
- Field updates → Incident records: updates response (evidence: `app/Http/Controllers/Shared/ResponderFieldController.php`)
- Incident records → Evidence handling: has evidence (evidence: `app/Models/Incident.php`)
- Incident records → Resolution workflow: has resolutions (evidence: `app/Models/Incident.php`)
- Hazard mapping → Geofence analysis: checks geometry (evidence: `app/Http/Controllers/Public/HazardMapController.php`)
- Hazard mapping → Evacuation centers: lists centers (evidence: `app/Http/Controllers/Public/HazardMapController.php`)
- Operational reports → Incident records: summarizes (evidence: `app/Http/Controllers/Admin/ReportController.php`)
- Report records → Incident records: reports on (evidence: `app/Http/Controllers/Admin/ReportRecordController.php`)
- Authentication → User accounts: authenticates (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Incident records → Notifications: notifies on events (evidence: `app/Services/NotificationService.php`)
- Notifications → SMS gateway: sends SMS (evidence: `app/Services/NotificationService.php`)
