# jaswanth1502/emergency-response architecture

> Architecture diagram of the GitHub repository jaswanth1502/emergency-response, 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/jaswanth1502/emergency-response
- Repository: https://github.com/jaswanth1502/emergency-response

## Overview

AEGIS TWIN is a municipal emergency-operations interface for monitoring hazards and coordinating response. Operators enter through the routed dashboard, review incidents and sensor alerts, and use the twin and GIS views to support resource dispatch, evacuation, and hospital triage; analytics and reports support follow-up. The app context owns shared operational state and invokes the ML engine for inference and retraining. The README documents broader capabilities than the sampled implementation excerpts establish, so uncertain service wiring and external integrations are not shown.

Main entry points: [`src/App.tsx`](https://github.com/jaswanth1502/emergency-response/blob/main/src/App.tsx) (Route application), [`src/context/AppContext.tsx`](https://github.com/jaswanth1502/emergency-response/blob/main/src/context/AppContext.tsx) (Shared operational state), [`src/components/digitaltwin/OperatorDashboard.tsx`](https://github.com/jaswanth1502/emergency-response/blob/main/src/components/digitaltwin/OperatorDashboard.tsx) (Operator view), [`src/pages/DigitalTwin.tsx`](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/DigitalTwin.tsx) (Digital twin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["Route application<br/>[App.tsx]"]
  node_context["Shared operational state<br/>[AppContext.tsx]"]
end

subgraph group_situational["Situational awareness"]
  node_dashboard["Command dashboard<br/>[Dashboard.tsx]"]
  node_incidents["Incident management"]
  node_incident_details["Incident details"]
  node_sensors["Sensor monitoring"]
  node_twin["Digital twin<br/>[DigitalTwin.tsx]"]
  node_operator_view["Operator view"]
  node_three_map["3D geospatial map"]
  node_gis_map["Tactical GIS map<br/>[TacticalGisMap.tsx]"]
end

subgraph group_response["Response coordination"]
  node_incident_dialog["Incident entry"]
  node_resources["Resource allocation"]
  node_fleet["Emergency fleet<br/>[EmergencyFleet.tsx]"]
  node_evacuation["Evacuation routing<br/>[Evacuation.tsx]"]
  node_hospitals["Hospital triage"]
end

subgraph group_intelligence["Intelligence and oversight"]
  node_analytics["Operational analytics<br/>[Analytics.tsx]"]
  node_reports["After-action reports<br/>[Reports.tsx]"]
  node_datasets["Dataset registry"]
  node_ml_engine["ML inference engine<br/>[mlEngine.ts]"]
  node_admin["Administration<br/>[Administration.tsx]"]
end

node_operator(("EOC operator"))

node_operator -->|"uses"| node_app
node_app -->|"provides state"| node_context
node_app -->|"routes"| node_dashboard
node_app -->|"routes"| node_incidents
node_app -->|"routes"| node_incident_details
node_app -->|"routes"| node_sensors
node_app -->|"routes"| node_twin
node_app -->|"routes"| node_resources
node_app -->|"routes"| node_fleet
node_app -->|"routes"| node_evacuation
node_app -->|"routes"| node_hospitals
node_app -->|"routes"| node_analytics
node_app -->|"routes"| node_reports
node_app -->|"routes"| node_datasets
node_app -->|"routes"| node_admin
node_twin -->|"renders"| node_operator_view
node_operator_view -->|"renders"| node_three_map
node_operator_view -->|"renders"| node_gis_map
node_operator -->|"reports incident"| node_incident_dialog
node_incident_dialog -->|"updates state"| node_context
node_context -->|"runs inference"| node_ml_engine
node_context -->|"retraining calls"| node_ml_engine

click node_app "https://github.com/jaswanth1502/emergency-response/blob/main/src/App.tsx"
click node_context "https://github.com/jaswanth1502/emergency-response/blob/main/src/context/AppContext.tsx"
click node_dashboard "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/Dashboard.tsx"
click node_incidents "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/IncidentManagement.tsx"
click node_incident_details "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/IncidentDetails.tsx"
click node_sensors "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/SensorMonitoring.tsx"
click node_twin "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/DigitalTwin.tsx"
click node_operator_view "https://github.com/jaswanth1502/emergency-response/blob/main/src/components/digitaltwin/OperatorDashboard.tsx"
click node_three_map "https://github.com/jaswanth1502/emergency-response/blob/main/src/components/map/ThreeGeospatialMap.tsx"
click node_gis_map "https://github.com/jaswanth1502/emergency-response/blob/main/src/components/map/TacticalGisMap.tsx"
click node_incident_dialog "https://github.com/jaswanth1502/emergency-response/blob/main/src/components/dialogs/IncidentFormDialog.tsx"
click node_resources "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/ResourceAllocation.tsx"
click node_fleet "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/EmergencyFleet.tsx"
click node_evacuation "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/Evacuation.tsx"
click node_hospitals "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/HospitalsTriage.tsx"
click node_analytics "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/Analytics.tsx"
click node_reports "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/Reports.tsx"
click node_datasets "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/DatasetsRegistry.tsx"
click node_ml_engine "https://github.com/jaswanth1502/emergency-response/blob/main/src/services/mlEngine.ts"
click node_admin "https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/Administration.tsx"

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_app,node_context toneBlue
class node_dashboard,node_incidents,node_incident_details,node_sensors,node_twin,node_operator_view,node_three_map,node_gis_map toneAmber
class node_incident_dialog,node_resources,node_fleet,node_evacuation,node_hospitals toneMint
class node_analytics,node_reports,node_datasets,node_ml_engine,node_admin toneRose
class node_operator toneIndigo
```

## Components

### Application shell

- [Route application](https://github.com/jaswanth1502/emergency-response/blob/main/src/App.tsx): `src/App.tsx`
- [Shared operational state](https://github.com/jaswanth1502/emergency-response/blob/main/src/context/AppContext.tsx): `src/context/AppContext.tsx`

### Situational awareness

- [Command dashboard](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Incident management](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/IncidentManagement.tsx): `src/pages/IncidentManagement.tsx`
- [Incident details](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/IncidentDetails.tsx): `src/pages/IncidentDetails.tsx`
- [Sensor monitoring](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/SensorMonitoring.tsx): `src/pages/SensorMonitoring.tsx`
- [Digital twin](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/DigitalTwin.tsx): `src/pages/DigitalTwin.tsx`
- [Operator view](https://github.com/jaswanth1502/emergency-response/blob/main/src/components/digitaltwin/OperatorDashboard.tsx): `src/components/digitaltwin/OperatorDashboard.tsx`
- [3D geospatial map](https://github.com/jaswanth1502/emergency-response/blob/main/src/components/map/ThreeGeospatialMap.tsx): `src/components/map/ThreeGeospatialMap.tsx`
- [Tactical GIS map](https://github.com/jaswanth1502/emergency-response/blob/main/src/components/map/TacticalGisMap.tsx): `src/components/map/TacticalGisMap.tsx`

### Response coordination

- [Incident entry](https://github.com/jaswanth1502/emergency-response/blob/main/src/components/dialogs/IncidentFormDialog.tsx): `src/components/dialogs/IncidentFormDialog.tsx`
- [Resource allocation](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/ResourceAllocation.tsx): `src/pages/ResourceAllocation.tsx`
- [Emergency fleet](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/EmergencyFleet.tsx): `src/pages/EmergencyFleet.tsx`
- [Evacuation routing](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/Evacuation.tsx): `src/pages/Evacuation.tsx`
- [Hospital triage](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/HospitalsTriage.tsx): `src/pages/HospitalsTriage.tsx`

### Intelligence and oversight

- [Operational analytics](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/Analytics.tsx): `src/pages/Analytics.tsx`
- [After-action reports](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/Reports.tsx): `src/pages/Reports.tsx`
- [Dataset registry](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/DatasetsRegistry.tsx): `src/pages/DatasetsRegistry.tsx`
- [ML inference engine](https://github.com/jaswanth1502/emergency-response/blob/main/src/services/mlEngine.ts): `src/services/mlEngine.ts`
- [Administration](https://github.com/jaswanth1502/emergency-response/blob/main/src/pages/Administration.tsx): `src/pages/Administration.tsx`

### Other components

- **EOC operator**

## Connections

- EOC operator → Route application: uses
- Route application → Shared operational state: provides state
- Route application → Command dashboard: routes
- Route application → Incident management: routes
- Route application → Incident details: routes
- Route application → Sensor monitoring: routes
- Route application → Digital twin: routes
- Route application → Resource allocation: routes
- Route application → Emergency fleet: routes
- Route application → Evacuation routing: routes
- Route application → Hospital triage: routes
- Route application → Operational analytics: routes
- Route application → After-action reports: routes
- Route application → Dataset registry: routes
- Route application → Administration: routes
- Digital twin → Operator view: renders
- Operator view → 3D geospatial map: renders
- Operator view → Tactical GIS map: renders
- EOC operator → Incident entry: reports incident
- Incident entry → Shared operational state: updates state
- Shared operational state → ML inference engine: runs inference
- Shared operational state → ML inference engine: retraining calls
