# ajeeva91-debug/alertora architecture

> Architecture diagram of the GitHub repository ajeeva91-debug/alertora, 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/ajeeva91-debug/alertora
- Repository: https://github.com/ajeeva91-debug/alertora

## Overview

ALERTORA AI is a prototype severe-weather nowcasting and emergency-response platform. Users choose a location or map point, inspect hazard forecasts and risk, then use alerts, district operations guidance, or citizen precautions to respond. The browser controller renders the GIS map, timeline, countdown, simulation, and explainability panels; its API service uses mock data by default and can call the FastAPI backend when enabled. The backend prediction endpoint delegates to the nowcast engine. The documented sensor fusion and spatial database are not evidenced as live ingestion or persistence in the sampled runtime code.

Main entry points: [`js/app.js`](https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js) (App controller), [`js/api.js`](https://github.com/ajeeva91-debug/alertora/blob/main/js/api.js) (API service), [`backend/main.py`](https://github.com/ajeeva91-debug/alertora/blob/main/backend/main.py) (REST API), [`js/mockData.js`](https://github.com/ajeeva91-debug/alertora/blob/main/js/mockData.js) (Demo weather data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser experience"]
  node_controller["App controller<br/>[app.js]"]
  node_gis["GIS map<br/>[app.js]"]
  node_nowcast["Nowcast timeline<br/>[app.js]"]
  node_simulation["Storm simulation<br/>[app.js]"]
  node_countdown["Storm countdown<br/>[app.js]"]
  node_alerts["Alerts feed<br/>[app.js]"]
  node_eoc["EOC operations<br/>[app.js]"]
  node_safety["Safety guidance<br/>[app.js]"]
  node_explainability["XAI factors<br/>[app.js]"]
end

subgraph group_data["Data service"]
  node_api["API service<br/>[api.js]"]
  node_mock["Demo weather data<br/>[mockData.js]"]
end

subgraph group_backend["Forecast backend"]
  node_fastapi["REST API<br/>[main.py]"]
  node_engine["Nowcast engine<br/>[ai_engine.py]"]
  node_models["API data models<br/>[models.py]"]
end

node_user(("Dashboard user"))
node_nominatim["Nominatim geocoder"]

node_user -->|"uses"| node_controller
node_controller -->|"requests data"| node_api
node_api -->|"reads fallback"| node_mock
node_api -.->|"fetches live data"| node_fastapi
node_fastapi -->|"requests prediction"| node_engine
node_fastapi -->|"imports schemas"| node_models
node_controller -->|"renders map"| node_gis
node_controller -->|"renders forecasts"| node_nowcast
node_controller -->|"runs demo"| node_simulation
node_controller -->|"starts timer"| node_countdown
node_controller -->|"renders alerts"| node_alerts
node_controller -->|"renders district view"| node_eoc
node_controller -->|"renders precautions"| node_safety
node_controller -->|"renders factors"| node_explainability
node_controller -.->|"reverse geocodes"| node_nominatim

click node_controller "https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js"
click node_gis "https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js"
click node_nowcast "https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js"
click node_simulation "https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js"
click node_countdown "https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js"
click node_alerts "https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js"
click node_eoc "https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js"
click node_safety "https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js"
click node_explainability "https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js"
click node_api "https://github.com/ajeeva91-debug/alertora/blob/main/js/api.js"
click node_mock "https://github.com/ajeeva91-debug/alertora/blob/main/js/mockData.js"
click node_fastapi "https://github.com/ajeeva91-debug/alertora/blob/main/backend/main.py"
click node_engine "https://github.com/ajeeva91-debug/alertora/blob/main/backend/ai_engine.py"
click node_models "https://github.com/ajeeva91-debug/alertora/blob/main/backend/models.py"

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_controller,node_gis,node_nowcast,node_simulation,node_countdown,node_alerts,node_eoc,node_safety,node_explainability,node_user toneBlue
class node_api,node_mock toneAmber
class node_fastapi,node_engine,node_models toneMint
class node_nominatim toneIndigo
```

## Components

### Browser experience

- [App controller](https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js): `js/app.js`
- [GIS map](https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js): `js/app.js`
- [Nowcast timeline](https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js): `js/app.js`
- [Storm simulation](https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js): `js/app.js`
- [Storm countdown](https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js): `js/app.js`
- [Alerts feed](https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js): `js/app.js`
- [EOC operations](https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js): `js/app.js`
- [Safety guidance](https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js): `js/app.js`
- [XAI factors](https://github.com/ajeeva91-debug/alertora/blob/main/js/app.js): `js/app.js`

### Data service

- [API service](https://github.com/ajeeva91-debug/alertora/blob/main/js/api.js): `js/api.js`
- [Demo weather data](https://github.com/ajeeva91-debug/alertora/blob/main/js/mockData.js): `js/mockData.js`

### Forecast backend

- [REST API](https://github.com/ajeeva91-debug/alertora/blob/main/backend/main.py): `backend/main.py`
- [Nowcast engine](https://github.com/ajeeva91-debug/alertora/blob/main/backend/ai_engine.py): `backend/ai_engine.py`
- [API data models](https://github.com/ajeeva91-debug/alertora/blob/main/backend/models.py): `backend/models.py`

### Other components

- **Dashboard user**
- **Nominatim geocoder**

## Connections

- Dashboard user → App controller: uses
- App controller → API service: requests data
- API service → Demo weather data: reads fallback
- API service → REST API: fetches live data
- REST API → Nowcast engine: requests prediction
- REST API → API data models: imports schemas
- App controller → GIS map: renders map
- App controller → Nowcast timeline: renders forecasts
- App controller → Storm simulation: runs demo
- App controller → Storm countdown: starts timer
- App controller → Alerts feed: renders alerts
- App controller → EOC operations: renders district view
- App controller → Safety guidance: renders precautions
- App controller → XAI factors: renders factors
- App controller → Nominatim geocoder: reverse geocodes
