# nanosdynasty/dashboard-repo architecture

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

- Interactive diagram: https://gitdiagram.com/nanosdynasty/dashboard-repo
- Repository: https://github.com/nanosdynasty/dashboard-repo

## Overview

This is a map-first global energy and maritime intelligence dashboard. Users explore energy and commodity assets, inspect normalized ports, or choose origin and destination ports for an analytical voyage estimate; the browser frontend reaches the FastAPI application, which owns the API and domain integrations. The README also documents weather, river-level, cyclone, disruption, news, and Data Hub capabilities. Backend module links are dashed where the supplied excerpts and import index identify integration candidates but do not show the runtime call sites.

Main entry points: [`app.py`](https://github.com/nanosdynasty/dashboard-repo/blob/main/app.py) (API application), [`static/js/app.js`](https://github.com/nanosdynasty/dashboard-repo/blob/main/static/js/app.js) (Map interface), [`port_catalog.py`](https://github.com/nanosdynasty/dashboard-repo/blob/main/port_catalog.py) (Port catalog), [`data`](https://github.com/nanosdynasty/dashboard-repo/tree/main/data) (Energy datasets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Dashboard interface"]
  node_frontend["Map interface<br/>[app.js]"]
  node_backend["API application<br/>[app.py]"]
end

subgraph group_assets["Energy and ports"]
  node_assetdata["Energy datasets"]
  node_portcatalog["Port catalog<br/>[port_catalog.py]"]
  node_portdetails["Port enrichment<br/>[maritime_extras.py]"]
end

subgraph group_routing["Voyage and risk"]
  node_voyage["Voyage routing<br/>[app.py]"]
  node_riskzones["Route risk zones<br/>[maritime_extras.py]"]
end

subgraph group_intelligence["Maritime intelligence"]
  node_coastalweather["Coastal forecasts"]
  node_indonesiaweather["BMKG forecasts"]
  node_seaforecasts["Asian marine forecasts"]
  node_portweather["Global port weather"]
  node_cyclones["Global cyclones<br/>[global_cyclones.py]"]
  node_riverlevels["River levels<br/>[river_levels.py]"]
  node_disruptions["Port disruptions"]
  node_news["Trade news"]
  node_datahub["Data Hub<br/>[data_hub.py]"]
  node_sourcemonitor["Source monitoring"]
  node_weathercontract["Weather schema"]
end

node_user(("Dashboard user"))

node_user -->|"explores"| node_frontend
node_frontend -->|"requests data"| node_backend
node_backend -.->|"serves layers"| node_assetdata
node_backend -.->|"uses catalog"| node_portcatalog
node_portcatalog -->|"enriches ports"| node_portdetails
node_backend -->|"calculates routes"| node_voyage
node_voyage -.->|"checks exposure"| node_riskzones
node_backend -.->|"loads forecasts"| node_coastalweather
node_backend -.->|"loads forecasts"| node_indonesiaweather
node_backend -.->|"loads forecasts"| node_seaforecasts
node_backend -.->|"loads forecasts"| node_portweather
node_backend -.->|"loads cyclones"| node_cyclones
node_backend -.->|"loads levels"| node_riverlevels
node_backend -.->|"loads disruptions"| node_disruptions
node_backend -.->|"loads news"| node_news
node_backend -.->|"routes workspace"| node_datahub
node_backend -.->|"checks sources"| node_sourcemonitor
node_backend -.->|"normalizes weather"| node_weathercontract

click node_frontend "https://github.com/nanosdynasty/dashboard-repo/blob/main/static/js/app.js"
click node_backend "https://github.com/nanosdynasty/dashboard-repo/blob/main/app.py"
click node_assetdata "https://github.com/nanosdynasty/dashboard-repo/tree/main/data"
click node_portcatalog "https://github.com/nanosdynasty/dashboard-repo/blob/main/port_catalog.py"
click node_portdetails "https://github.com/nanosdynasty/dashboard-repo/blob/main/maritime_extras.py"
click node_voyage "https://github.com/nanosdynasty/dashboard-repo/blob/main/app.py"
click node_riskzones "https://github.com/nanosdynasty/dashboard-repo/blob/main/maritime_extras.py"
click node_coastalweather "https://github.com/nanosdynasty/dashboard-repo/blob/main/imd_coastal_weather.py"
click node_indonesiaweather "https://github.com/nanosdynasty/dashboard-repo/blob/main/bmkg_marine_weather.py"
click node_seaforecasts "https://github.com/nanosdynasty/dashboard-repo/blob/main/sea_marine_weather.py"
click node_portweather "https://github.com/nanosdynasty/dashboard-repo/blob/main/major_port_weather.py"
click node_cyclones "https://github.com/nanosdynasty/dashboard-repo/blob/main/global_cyclones.py"
click node_riverlevels "https://github.com/nanosdynasty/dashboard-repo/blob/main/river_levels.py"
click node_disruptions "https://github.com/nanosdynasty/dashboard-repo/blob/main/port_disruptions.py"
click node_news "https://github.com/nanosdynasty/dashboard-repo/blob/main/news_intelligence.py"
click node_datahub "https://github.com/nanosdynasty/dashboard-repo/blob/main/data_hub.py"
click node_sourcemonitor "https://github.com/nanosdynasty/dashboard-repo/blob/main/india_source_monitor.py"
click node_weathercontract "https://github.com/nanosdynasty/dashboard-repo/blob/main/coastal_weather_schema.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_frontend,node_backend,node_user toneBlue
class node_assetdata,node_portcatalog,node_portdetails toneAmber
class node_voyage,node_riskzones toneMint
class node_coastalweather,node_indonesiaweather,node_seaforecasts,node_portweather,node_cyclones,node_riverlevels,node_disruptions,node_news,node_datahub,node_sourcemonitor,node_weathercontract toneRose
```

## Components

### Dashboard interface

- [Map interface](https://github.com/nanosdynasty/dashboard-repo/blob/main/static/js/app.js): `static/js/app.js`
- [API application](https://github.com/nanosdynasty/dashboard-repo/blob/main/app.py): `app.py`

### Energy and ports

- [Energy datasets](https://github.com/nanosdynasty/dashboard-repo/tree/main/data): `data`
- [Port catalog](https://github.com/nanosdynasty/dashboard-repo/blob/main/port_catalog.py): `port_catalog.py`
- [Port enrichment](https://github.com/nanosdynasty/dashboard-repo/blob/main/maritime_extras.py): `maritime_extras.py`

### Voyage and risk

- [Voyage routing](https://github.com/nanosdynasty/dashboard-repo/blob/main/app.py): `app.py`
- [Route risk zones](https://github.com/nanosdynasty/dashboard-repo/blob/main/maritime_extras.py): `maritime_extras.py`

### Maritime intelligence

- [Coastal forecasts](https://github.com/nanosdynasty/dashboard-repo/blob/main/imd_coastal_weather.py): `imd_coastal_weather.py`
- [BMKG forecasts](https://github.com/nanosdynasty/dashboard-repo/blob/main/bmkg_marine_weather.py): `bmkg_marine_weather.py`
- [Asian marine forecasts](https://github.com/nanosdynasty/dashboard-repo/blob/main/sea_marine_weather.py): `sea_marine_weather.py`
- [Global port weather](https://github.com/nanosdynasty/dashboard-repo/blob/main/major_port_weather.py): `major_port_weather.py`
- [Global cyclones](https://github.com/nanosdynasty/dashboard-repo/blob/main/global_cyclones.py): `global_cyclones.py`
- [River levels](https://github.com/nanosdynasty/dashboard-repo/blob/main/river_levels.py): `river_levels.py`
- [Port disruptions](https://github.com/nanosdynasty/dashboard-repo/blob/main/port_disruptions.py): `port_disruptions.py`
- [Trade news](https://github.com/nanosdynasty/dashboard-repo/blob/main/news_intelligence.py): `news_intelligence.py`
- [Data Hub](https://github.com/nanosdynasty/dashboard-repo/blob/main/data_hub.py): `data_hub.py`
- [Source monitoring](https://github.com/nanosdynasty/dashboard-repo/blob/main/india_source_monitor.py): `india_source_monitor.py`
- [Weather schema](https://github.com/nanosdynasty/dashboard-repo/blob/main/coastal_weather_schema.py): `coastal_weather_schema.py`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Map interface: explores (evidence: `README.md`)
- Map interface → API application: requests data (evidence: `README.md`)
- API application → Energy datasets: serves layers
- API application → Port catalog: uses catalog (evidence: `app.py`)
- Port catalog → Port enrichment: enriches ports (evidence: `port_catalog.py`)
- API application → Voyage routing: calculates routes (evidence: `app.py`)
- Voyage routing → Route risk zones: checks exposure (evidence: `app.py`)
- API application → Coastal forecasts: loads forecasts (evidence: `app.py`)
- API application → BMKG forecasts: loads forecasts (evidence: `app.py`)
- API application → Asian marine forecasts: loads forecasts (evidence: `app.py`)
- API application → Global port weather: loads forecasts (evidence: `app.py`)
- API application → Global cyclones: loads cyclones (evidence: `app.py`)
- API application → River levels: loads levels (evidence: `app.py`)
- API application → Port disruptions: loads disruptions (evidence: `app.py`)
- API application → Trade news: loads news (evidence: `app.py`)
- API application → Data Hub: routes workspace (evidence: `app.py`)
- API application → Source monitoring: checks sources (evidence: `app.py`)
- API application → Weather schema: normalizes weather (evidence: `app.py`)
