# hirah-ma/myevacuate architecture

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

- Interactive diagram: https://gitdiagram.com/hirah-ma/myevacuate
- Repository: https://github.com/hirah-ma/myevacuate

## Overview

MyEvacuate is presented as a disaster evacuation assistant, with a user-facing Flutter app and a Flask wildfire-routing API. The main documented workflow is finding wildfire zones and planning a safer route around them; the API source shows how fire data, road-network filtering, and pathfinding implement that routing. The README also describes resource discovery, community support, AI guidance, alerts, risk analysis, and personalization. Those capabilities are represented as documented product areas, but their internal implementation and wiring are not shown in the sampled source.

Main entry points: [`wildfire/lib/main.dart`](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/main.dart) (Mobile App), [`wildfire/backend/wildfire_api.py`](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py) (Safe Route Handler), [`wildfire/lib/map_routes_page.dart`](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/map_routes_page.dart) (Evacuation Map), [`wildfire/lib/services_page.dart`](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/services_page.dart) (Nearby Resources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Evacuation App"]
  node_app["Mobile App<br/>[main.dart]"]
  node_map["Evacuation Map"]
  node_resources["Nearby Resources<br/>[services_page.dart]"]
end

subgraph group_api["Wildfire API"]
  node_fire_api["Wildfire API<br/>[wildfire_api.py]"]
  node_fire_zones["Fire Zone Feed<br/>[wildfire_api.py]"]
  node_route_handler["Safe Route Handler<br/>[wildfire_api.py]"]
  node_safe_roads["Fire-Avoiding Roads<br/>[wildfire_api.py]"]
  node_pathfinder["Shortest Path<br/>[wildfire_api.py]"]
end

subgraph group_support["User Support"]
  node_helpline["Helpline Guidance<br/>[helpline_page.dart]"]
  node_precautions["Safety Precautions"]
  node_community["Community Chat"]
end

subgraph group_intelligence["Response Intelligence"]
  node_alerting["Alert Prioritization"]
  node_risk["Risk Zone Detection"]
  node_personalization["Personalized Guidance"]
end

node_evacuee(("Evacuee"))
node_nasa["NASA FIRMS"]
node_road_network["Road Network"]

node_evacuee -->|"uses"| node_app
node_app -.->|"offers mapping"| node_map
node_app -.->|"offers discovery"| node_resources
node_app -.->|"offers guidance"| node_helpline
node_app -.->|"offers precautions"| node_precautions
node_app -.->|"offers chat"| node_community
node_app -.->|"presents alerts"| node_alerting
node_app -.->|"presents risk zones"| node_risk
node_app -.->|"offers personalization"| node_personalization
node_map -.->|"requests routes"| node_fire_api
node_fire_api -->|"serves zones"| node_fire_zones
node_fire_zones -->|"reads detections"| node_nasa
node_fire_api -->|"routes requests"| node_route_handler
node_route_handler -->|"loads roads"| node_road_network
node_route_handler -->|"loads fire data"| node_nasa
node_route_handler -->|"filters roads"| node_safe_roads
node_route_handler -->|"computes route"| node_pathfinder
node_pathfinder -->|"returns coordinates"| node_route_handler

click node_app "https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/main.dart"
click node_map "https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/map_routes_page.dart"
click node_resources "https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/services_page.dart"
click node_fire_api "https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py"
click node_fire_zones "https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py"
click node_route_handler "https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py"
click node_safe_roads "https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py"
click node_pathfinder "https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py"
click node_helpline "https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/helpline_page.dart"
click node_precautions "https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/precautions_page.dart"
click node_community "https://github.com/hirah-ma/myevacuate/tree/main/wildfire/lib"
click node_alerting "https://github.com/hirah-ma/myevacuate/tree/main/wildfire/lib"
click node_risk "https://github.com/hirah-ma/myevacuate/tree/main/wildfire/lib"
click node_personalization "https://github.com/hirah-ma/myevacuate/tree/main/wildfire/lib"

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_map,node_resources toneBlue
class node_fire_api,node_fire_zones,node_route_handler,node_safe_roads,node_pathfinder toneAmber
class node_helpline,node_precautions,node_community toneMint
class node_alerting,node_risk,node_personalization toneRose
class node_evacuee,node_nasa,node_road_network toneIndigo
```

## Components

### Evacuation App

- [Mobile App](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/main.dart): `wildfire/lib/main.dart`
- [Evacuation Map](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/map_routes_page.dart): `wildfire/lib/map_routes_page.dart`
- [Nearby Resources](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/services_page.dart): `wildfire/lib/services_page.dart`

### Wildfire API

- [Wildfire API](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py): `wildfire/backend/wildfire_api.py`
- [Fire Zone Feed](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py): `wildfire/backend/wildfire_api.py`
- [Safe Route Handler](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py): `wildfire/backend/wildfire_api.py`
- [Fire-Avoiding Roads](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py): `wildfire/backend/wildfire_api.py`
- [Shortest Path](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/backend/wildfire_api.py): `wildfire/backend/wildfire_api.py`

### User Support

- [Helpline Guidance](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/helpline_page.dart): `wildfire/lib/helpline_page.dart`
- [Safety Precautions](https://github.com/hirah-ma/myevacuate/blob/main/wildfire/lib/precautions_page.dart): `wildfire/lib/precautions_page.dart`
- [Community Chat](https://github.com/hirah-ma/myevacuate/tree/main/wildfire/lib): `wildfire/lib`

### Response Intelligence

- [Alert Prioritization](https://github.com/hirah-ma/myevacuate/tree/main/wildfire/lib): `wildfire/lib`
- [Risk Zone Detection](https://github.com/hirah-ma/myevacuate/tree/main/wildfire/lib): `wildfire/lib`
- [Personalized Guidance](https://github.com/hirah-ma/myevacuate/tree/main/wildfire/lib): `wildfire/lib`

### Other components

- **Evacuee**
- **NASA FIRMS**
- **Road Network**

## Connections

- Evacuee → Mobile App: uses (evidence: `README.md`)
- Mobile App → Evacuation Map: offers mapping
- Mobile App → Nearby Resources: offers discovery
- Mobile App → Helpline Guidance: offers guidance
- Mobile App → Safety Precautions: offers precautions
- Mobile App → Community Chat: offers chat
- Mobile App → Alert Prioritization: presents alerts
- Mobile App → Risk Zone Detection: presents risk zones
- Mobile App → Personalized Guidance: offers personalization
- Evacuation Map → Wildfire API: requests routes
- Wildfire API → Fire Zone Feed: serves zones (evidence: `wildfire/backend/wildfire_api.py`)
- Fire Zone Feed → NASA FIRMS: reads detections (evidence: `wildfire/backend/wildfire_api.py`)
- Wildfire API → Safe Route Handler: routes requests (evidence: `wildfire/backend/wildfire_api.py`)
- Safe Route Handler → Road Network: loads roads (evidence: `wildfire/backend/wildfire_api.py`)
- Safe Route Handler → NASA FIRMS: loads fire data (evidence: `wildfire/backend/wildfire_api.py`)
- Safe Route Handler → Fire-Avoiding Roads: filters roads (evidence: `wildfire/backend/wildfire_api.py`)
- Safe Route Handler → Shortest Path: computes route (evidence: `wildfire/backend/wildfire_api.py`)
- Shortest Path → Safe Route Handler: returns coordinates (evidence: `wildfire/backend/wildfire_api.py`)
