# ganes-git/nexus-nowcast architecture

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

- Interactive diagram: https://gitdiagram.com/ganes-git/nexus-nowcast
- Repository: https://github.com/ganes-git/nexus-nowcast

## Overview

NEXUS-NOWCAST presents a meteorological nowcasting dashboard and alert service. The documented user workflow is to select a corridor and forecast lead time, inspect mapped storm and lightning information, and view or export CAP alerts. The sampled backend shows a FastAPI API coordinating mock observations and meteorological/graph components; the README also describes real-data ingestion and STGAT-PIE capabilities. Source excerpts do not establish how every documented subsystem is wired, so those connections are omitted or marked unverified.

Main entry points: [`backend/main.py`](https://github.com/ganes-git/nexus-nowcast/blob/main/backend/main.py) (FastAPI Endpoints), [`frontend/js/app.js`](https://github.com/ganes-git/nexus-nowcast/blob/main/frontend/js/app.js) (Map Dashboard), [`backend/cap_generator.py`](https://github.com/ganes-git/nexus-nowcast/blob/main/backend/cap_generator.py) (CAP XML Generator), [`backend/mock_feeder.py`](https://github.com/ganes-git/nexus-nowcast/blob/main/backend/mock_feeder.py) (Mock Observations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mission Control UI"]
  node_dashboard["Map Dashboard<br/>[app.js]"]
  node_browser_engine["Client Simulation<br/>[nexus-engine.js]"]
end

subgraph group_service["API Service"]
  node_api["FastAPI Endpoints<br/>[main.py]"]
end

subgraph group_forecast["Nowcast Processing"]
  node_mock_data["Mock Observations<br/>[mock_feeder.py]"]
  node_real_ingest["Real Data Ingestion<br/>[ingest_real.py]"]
  node_graph["Atmospheric Graph<br/>[graph_engine.py]"]
  node_neural_model["STGAT-PIE Model<br/>[torch_model.py]"]
  node_met_algorithms["Meteorology Algorithms<br/>[meteorology.py]"]
end

subgraph group_alerts["Alerts and Dissemination"]
  node_cap_generator["CAP XML Generator<br/>[cap_generator.py]"]
end

node_operator(("Forecaster"))
node_civil_services["Civil Alert Services"]

node_operator -->|"selects region"| node_dashboard
node_dashboard -->|"requests forecasts"| node_api
node_api -->|"gets snapshots"| node_mock_data
node_api -->|"uses graph engine"| node_graph
node_api -->|"uses algorithms"| node_met_algorithms
node_api -->|"generates alerts"| node_cap_generator
node_cap_generator -.->|"disseminates alerts"| node_civil_services

click node_dashboard "https://github.com/ganes-git/nexus-nowcast/blob/main/frontend/js/app.js"
click node_browser_engine "https://github.com/ganes-git/nexus-nowcast/blob/main/frontend/js/nexus-engine.js"
click node_api "https://github.com/ganes-git/nexus-nowcast/blob/main/backend/main.py"
click node_mock_data "https://github.com/ganes-git/nexus-nowcast/blob/main/backend/mock_feeder.py"
click node_real_ingest "https://github.com/ganes-git/nexus-nowcast/blob/main/backend/ingest_real.py"
click node_graph "https://github.com/ganes-git/nexus-nowcast/blob/main/backend/graph_engine.py"
click node_neural_model "https://github.com/ganes-git/nexus-nowcast/blob/main/backend/torch_model.py"
click node_met_algorithms "https://github.com/ganes-git/nexus-nowcast/blob/main/backend/meteorology.py"
click node_cap_generator "https://github.com/ganes-git/nexus-nowcast/blob/main/backend/cap_generator.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_dashboard,node_browser_engine toneBlue
class node_api toneAmber
class node_mock_data,node_real_ingest,node_graph,node_neural_model,node_met_algorithms toneMint
class node_cap_generator toneRose
class node_operator,node_civil_services toneIndigo
```

## Components

### Mission Control UI

- [Map Dashboard](https://github.com/ganes-git/nexus-nowcast/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Client Simulation](https://github.com/ganes-git/nexus-nowcast/blob/main/frontend/js/nexus-engine.js): `frontend/js/nexus-engine.js`

### API Service

- [FastAPI Endpoints](https://github.com/ganes-git/nexus-nowcast/blob/main/backend/main.py): `backend/main.py`

### Nowcast Processing

- [Mock Observations](https://github.com/ganes-git/nexus-nowcast/blob/main/backend/mock_feeder.py): `backend/mock_feeder.py`
- [Real Data Ingestion](https://github.com/ganes-git/nexus-nowcast/blob/main/backend/ingest_real.py): `backend/ingest_real.py`
- [Atmospheric Graph](https://github.com/ganes-git/nexus-nowcast/blob/main/backend/graph_engine.py): `backend/graph_engine.py`
- [STGAT-PIE Model](https://github.com/ganes-git/nexus-nowcast/blob/main/backend/torch_model.py): `backend/torch_model.py`
- [Meteorology Algorithms](https://github.com/ganes-git/nexus-nowcast/blob/main/backend/meteorology.py): `backend/meteorology.py`

### Alerts and Dissemination

- [CAP XML Generator](https://github.com/ganes-git/nexus-nowcast/blob/main/backend/cap_generator.py): `backend/cap_generator.py`

### Other components

- **Forecaster**
- **Civil Alert Services**

## Connections

- Forecaster → Map Dashboard: selects region (evidence: `README.md`)
- Map Dashboard → FastAPI Endpoints: requests forecasts (evidence: `frontend/js/app.js`)
- FastAPI Endpoints → Mock Observations: gets snapshots (evidence: `backend/main.py`)
- FastAPI Endpoints → Atmospheric Graph: uses graph engine (evidence: `backend/main.py`)
- FastAPI Endpoints → Meteorology Algorithms: uses algorithms (evidence: `backend/main.py`)
- FastAPI Endpoints → CAP XML Generator: generates alerts (evidence: `backend/main.py`)
- CAP XML Generator → Civil Alert Services: disseminates alerts (evidence: `README.md`)
