# urveebettadapur/resq-grid-ai architecture

> Architecture diagram of the GitHub repository urveebettadapur/resq-grid-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/urveebettadapur/resq-grid-ai
- Repository: https://github.com/urveebettadapur/resq-grid-ai

## Overview

ResQ-Grid AI is a browser-based disaster-response coordination application. Civilians submit SOS reports with location and optional media; the application ranks incoming incidents, selects a nearby relief hub, and calculates a hazard-aware route for coordinators and responders. Mission control presents incidents, hazards, routes, triage, and resources; offline queuing and hop relay support the software-side blackout workflow. The sampled code confirms the main App-to-engine calls and SOS intake; several README-described features have tree-supported components but their internal wiring was not sampled.

Main entry points: [`src/App.jsx`](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/App.jsx) (Application), [`src/components/MobileCivilianSOS.jsx`](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/MobileCivilianSOS.jsx) (SOS Portal), [`src/components/SatelliteMap.jsx`](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/SatelliteMap.jsx) (GIS Mission Map), [`src/components/TriageMatrix.jsx`](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/TriageMatrix.jsx) (Triage Feed)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Civilian SOS Intake"]
  node_sos_form["SOS Portal"]
  node_sos_audio["Alert Audio<br/>[audioAlerts.js]"]
  node_qr_modal["QR Sharing<br/>[MobileQrModal.jsx]"]
end

subgraph group_coordination["Mission Coordination"]
  node_app["Application<br/>[App.jsx]"]
  node_map["GIS Mission Map<br/>[SatelliteMap.jsx]"]
  node_inventory["Resource Inventory"]
  node_sitrep["Situation Reports<br/>[SitrepExport.jsx]"]
  node_disaster_data["Disaster Scenarios<br/>[disasterData.js]"]
  node_guide["Disaster Guide"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
end

subgraph group_decision["Response Decision Support"]
  node_triage_engine["Triage Scoring<br/>[triageEngine.js]"]
  node_triage_feed["Triage Feed<br/>[TriageMatrix.jsx]"]
  node_routing_engine["Safe Routing<br/>[routingEngine.js]"]
  node_route_optimizer["Route Optimizer<br/>[RouteOptimizer.jsx]"]
end

subgraph group_connectivity["Offline Connectivity"]
  node_offline_queue[("Offline Queue<br/>[offlineStorage.js]")]
  node_relay_engine["Hop Relay Engine<br/>[hopRelayEngine.js]"]
  node_relay_terminal["Relay Terminal"]
  node_mesh_visualizer["Mesh Visualizer"]
end

node_civilian(("Civilian"))
node_responder(("Responder"))
node_map_tiles["Satellite Imagery"]

node_civilian -->|"submits SOS"| node_sos_form
node_sos_form -->|"submits incident"| node_app
node_sos_form -->|"queues offline"| node_offline_queue
node_sos_form -->|"plays alert"| node_sos_audio
node_app -->|"plays alert"| node_sos_audio
node_app -->|"ranks incidents"| node_triage_engine
node_app -->|"selects hub and routes"| node_routing_engine
node_app -->|"supplies map state"| node_map
node_app -->|"supplies incidents"| node_triage_feed
node_app -->|"renders optimizer"| node_route_optimizer
node_app -->|"renders resources"| node_inventory
node_app -->|"renders terminal"| node_relay_terminal
node_app -->|"renders mesh view"| node_mesh_visualizer
node_app -->|"renders reports"| node_sitrep
node_app -->|"loads scenarios"| node_disaster_data
node_app -->|"renders guide"| node_guide
node_app -->|"renders QR modal"| node_qr_modal
node_app -->|"renders navigation"| node_navbar
node_map -.->|"loads imagery"| node_map_tiles
node_triage_feed -->|"presents priorities"| node_responder
node_map -->|"shows hazards and routes"| node_responder

click node_app "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/App.jsx"
click node_sos_form "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/MobileCivilianSOS.jsx"
click node_sos_audio "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/audioAlerts.js"
click node_offline_queue "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/offlineStorage.js"
click node_relay_engine "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/hopRelayEngine.js"
click node_relay_terminal "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/HopRelayTerminal.jsx"
click node_mesh_visualizer "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/OfflineMeshVisualizer.jsx"
click node_triage_engine "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/triageEngine.js"
click node_triage_feed "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/TriageMatrix.jsx"
click node_routing_engine "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/routingEngine.js"
click node_route_optimizer "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/RouteOptimizer.jsx"
click node_map "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/SatelliteMap.jsx"
click node_inventory "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/ResourceInventory.jsx"
click node_sitrep "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/SitrepExport.jsx"
click node_disaster_data "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/disasterData.js"
click node_guide "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/DisasterGuideModal.jsx"
click node_qr_modal "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/MobileQrModal.jsx"
click node_navbar "https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/Navbar.jsx"

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_sos_form,node_sos_audio,node_qr_modal toneBlue
class node_app,node_map,node_inventory,node_sitrep,node_disaster_data,node_guide,node_navbar toneAmber
class node_triage_engine,node_triage_feed,node_routing_engine,node_route_optimizer toneMint
class node_offline_queue,node_relay_engine,node_relay_terminal,node_mesh_visualizer toneRose
class node_civilian,node_responder,node_map_tiles toneIndigo
```

## Components

### Civilian SOS Intake

- [SOS Portal](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/MobileCivilianSOS.jsx): `src/components/MobileCivilianSOS.jsx`
- [Alert Audio](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/audioAlerts.js): `src/services/audioAlerts.js`
- [QR Sharing](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/MobileQrModal.jsx): `src/components/MobileQrModal.jsx`

### Mission Coordination

- [Application](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/App.jsx): `src/App.jsx`
- [GIS Mission Map](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/SatelliteMap.jsx): `src/components/SatelliteMap.jsx`
- [Resource Inventory](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/ResourceInventory.jsx): `src/components/ResourceInventory.jsx`
- [Situation Reports](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/SitrepExport.jsx): `src/components/SitrepExport.jsx`
- [Disaster Scenarios](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/disasterData.js): `src/services/disasterData.js`
- [Disaster Guide](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/DisasterGuideModal.jsx): `src/components/DisasterGuideModal.jsx`
- [Navigation](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`

### Response Decision Support

- [Triage Scoring](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/triageEngine.js): `src/services/triageEngine.js`
- [Triage Feed](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/TriageMatrix.jsx): `src/components/TriageMatrix.jsx`
- [Safe Routing](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/routingEngine.js): `src/services/routingEngine.js`
- [Route Optimizer](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/RouteOptimizer.jsx): `src/components/RouteOptimizer.jsx`

### Offline Connectivity

- [Offline Queue](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/offlineStorage.js): `src/services/offlineStorage.js`
- [Hop Relay Engine](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/services/hopRelayEngine.js): `src/services/hopRelayEngine.js`
- [Relay Terminal](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/HopRelayTerminal.jsx): `src/components/HopRelayTerminal.jsx`
- [Mesh Visualizer](https://github.com/urveebettadapur/resq-grid-ai/blob/main/src/components/OfflineMeshVisualizer.jsx): `src/components/OfflineMeshVisualizer.jsx`

### Other components

- **Civilian**
- **Responder**
- **Satellite Imagery**

## Connections

- Civilian → SOS Portal: submits SOS
- SOS Portal → Application: submits incident
- SOS Portal → Offline Queue: queues offline
- SOS Portal → Alert Audio: plays alert
- Application → Alert Audio: plays alert
- Application → Triage Scoring: ranks incidents
- Application → Safe Routing: selects hub and routes
- Application → GIS Mission Map: supplies map state
- Application → Triage Feed: supplies incidents
- Application → Route Optimizer: renders optimizer
- Application → Resource Inventory: renders resources
- Application → Relay Terminal: renders terminal
- Application → Mesh Visualizer: renders mesh view
- Application → Situation Reports: renders reports
- Application → Disaster Scenarios: loads scenarios
- Application → Disaster Guide: renders guide
- Application → QR Sharing: renders QR modal
- Application → Navigation: renders navigation
- GIS Mission Map → Satellite Imagery: loads imagery
- Triage Feed → Responder: presents priorities
- GIS Mission Map → Responder: shows hazards and routes
