# mithun616/pelagix-global architecture

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

- Interactive diagram: https://gitdiagram.com/mithun616/pelagix-global
- Repository: https://github.com/mithun616/pelagix-global

## Overview

PELAGIX is a React coastal-risk exploration dashboard. Users select a region and climate scenario, then explore projections, mapped exposure, infrastructure access, event simulations, and risk rankings. The graph separates dashboard navigation, analytical features, curated data, and routing/scoring services. The README describes these capabilities, while implementation evidence is uneven: sampled imports and excerpts support the shown links; live feeds and backend processing are not established as implemented.

Main entry points: [`src/App.tsx`](https://github.com/mithun616/pelagix-global/blob/main/src/App.tsx) (Dashboard Shell), [`src/components/pages/GlobalOverviewPage.tsx`](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/GlobalOverviewPage.tsx) (Global Overview), [`src/components/map/PelagixMap.tsx`](https://github.com/mithun616/pelagix-global/blob/main/src/components/map/PelagixMap.tsx) (Interactive Map), [`src/context/AppContext.tsx`](https://github.com/mithun616/pelagix-global/blob/main/src/context/AppContext.tsx) (App State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard UI"]
  node_app["Dashboard Shell<br/>[App.tsx]"]
  node_context["App State<br/>[AppContext.tsx]"]
end

subgraph group_analysis["Risk Exploration"]
  node_overview["Global Overview"]
  node_trends["Sea-Level Trends"]
  node_coastal["Coastal Risk Map"]
  node_scenario["Scenario Explorer"]
  node_infrastructure["Infrastructure Access"]
  node_events["Event Monitor"]
  node_prioritization["Risk Prioritization"]
  node_sources["Data Sources"]
  node_methodology["Methodology"]
  node_settings["Settings<br/>[SettingsPage.tsx]"]
  node_map2d["Interactive Map<br/>[PelagixMap.tsx]"]
  node_globe["3D Globe<br/>[PelagixGlobe3D.tsx]"]
end

subgraph group_data["Domain Data"]
  node_locations["Coastal Regions"]
  node_observations["Historical Observations"]
  node_projections["Climate Projections<br/>[ipccProjections.ts]"]
  node_roads["Road Networks<br/>[roadNetworks.ts]"]
  node_registry["Source Registry"]
end

subgraph group_services["Analysis Services"]
  node_riskcalc["Risk Calculator<br/>[riskCalculator.ts]"]
  node_router["Route Solver<br/>[dijkstraRouter.ts]"]
  node_adapters["API Adapters<br/>[apiAdapters.ts]"]
end

node_user(("Planner"))

node_user -->|"uses"| node_app
node_app -->|"provides state"| node_context
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_trends
node_app -->|"routes to"| node_coastal
node_app -->|"routes to"| node_scenario
node_app -->|"routes to"| node_infrastructure
node_app -->|"routes to"| node_events
node_app -->|"routes to"| node_prioritization
node_app -->|"routes to"| node_sources
node_app -->|"routes to"| node_methodology
node_app -->|"routes to"| node_settings
node_context -->|"loads region state"| node_locations
node_context -->|"loads road graph"| node_roads
node_context -->|"creates router"| node_router
node_overview -->|"reads state"| node_context
node_overview -->|"renders"| node_map2d
node_overview -->|"renders"| node_globe
node_overview -->|"reads projections"| node_projections
node_overview -->|"reads regions"| node_locations
node_overview -->|"reads sources"| node_registry
node_trends -->|"reads observations"| node_observations
node_trends -->|"reads projections"| node_projections
node_coastal -->|"renders"| node_map2d
node_coastal -->|"renders"| node_globe
node_scenario -->|"calculates risk"| node_riskcalc
node_scenario -->|"reads projections"| node_projections
node_infrastructure -->|"renders"| node_map2d
node_infrastructure -->|"reads network"| node_roads
node_events -.->|"uses adapters"| node_adapters
node_prioritization -->|"calculates ranking"| node_riskcalc
node_prioritization -->|"reads regions"| node_locations
node_sources -->|"reads registry"| node_registry
node_settings -.->|"uses adapters"| node_adapters
node_map2d -->|"renders locations"| node_locations
node_map2d -->|"renders roads"| node_roads
node_map2d -->|"reads gauges"| node_observations
node_globe -->|"renders locations"| node_locations
node_riskcalc -->|"reads projections"| node_projections
node_router -->|"routes on graph"| node_roads

click node_app "https://github.com/mithun616/pelagix-global/blob/main/src/App.tsx"
click node_context "https://github.com/mithun616/pelagix-global/blob/main/src/context/AppContext.tsx"
click node_overview "https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/GlobalOverviewPage.tsx"
click node_trends "https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/SeaLevelTrendsPage.tsx"
click node_coastal "https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/CoastalRiskMapPage.tsx"
click node_scenario "https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/ScenarioExplorerPage.tsx"
click node_infrastructure "https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/InfrastructureAccessibilityPage.tsx"
click node_events "https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/LiveEventMonitorPage.tsx"
click node_prioritization "https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/RiskPrioritizationPage.tsx"
click node_sources "https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/DataSourcesPage.tsx"
click node_methodology "https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/MethodologyPage.tsx"
click node_settings "https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/SettingsPage.tsx"
click node_map2d "https://github.com/mithun616/pelagix-global/blob/main/src/components/map/PelagixMap.tsx"
click node_globe "https://github.com/mithun616/pelagix-global/blob/main/src/components/map/PelagixGlobe3D.tsx"
click node_locations "https://github.com/mithun616/pelagix-global/blob/main/src/data/coastalLocations.ts"
click node_observations "https://github.com/mithun616/pelagix-global/blob/main/src/data/historicalObservations.ts"
click node_projections "https://github.com/mithun616/pelagix-global/blob/main/src/data/ipccProjections.ts"
click node_roads "https://github.com/mithun616/pelagix-global/blob/main/src/data/roadNetworks.ts"
click node_registry "https://github.com/mithun616/pelagix-global/blob/main/src/data/dataSourceRegistry.ts"
click node_riskcalc "https://github.com/mithun616/pelagix-global/blob/main/src/services/riskCalculator.ts"
click node_router "https://github.com/mithun616/pelagix-global/blob/main/src/services/dijkstraRouter.ts"
click node_adapters "https://github.com/mithun616/pelagix-global/blob/main/src/services/apiAdapters.ts"

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_overview,node_trends,node_coastal,node_scenario,node_infrastructure,node_events,node_prioritization,node_sources,node_methodology,node_settings,node_map2d,node_globe toneAmber
class node_locations,node_observations,node_projections,node_roads,node_registry toneMint
class node_riskcalc,node_router,node_adapters toneRose
class node_user toneIndigo
```

## Components

### Dashboard UI

- [Dashboard Shell](https://github.com/mithun616/pelagix-global/blob/main/src/App.tsx): `src/App.tsx`
- [App State](https://github.com/mithun616/pelagix-global/blob/main/src/context/AppContext.tsx): `src/context/AppContext.tsx`

### Risk Exploration

- [Global Overview](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/GlobalOverviewPage.tsx): `src/components/pages/GlobalOverviewPage.tsx`
- [Sea-Level Trends](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/SeaLevelTrendsPage.tsx): `src/components/pages/SeaLevelTrendsPage.tsx`
- [Coastal Risk Map](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/CoastalRiskMapPage.tsx): `src/components/pages/CoastalRiskMapPage.tsx`
- [Scenario Explorer](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/ScenarioExplorerPage.tsx): `src/components/pages/ScenarioExplorerPage.tsx`
- [Infrastructure Access](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/InfrastructureAccessibilityPage.tsx): `src/components/pages/InfrastructureAccessibilityPage.tsx`
- [Event Monitor](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/LiveEventMonitorPage.tsx): `src/components/pages/LiveEventMonitorPage.tsx`
- [Risk Prioritization](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/RiskPrioritizationPage.tsx): `src/components/pages/RiskPrioritizationPage.tsx`
- [Data Sources](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/DataSourcesPage.tsx): `src/components/pages/DataSourcesPage.tsx`
- [Methodology](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/MethodologyPage.tsx): `src/components/pages/MethodologyPage.tsx`
- [Settings](https://github.com/mithun616/pelagix-global/blob/main/src/components/pages/SettingsPage.tsx): `src/components/pages/SettingsPage.tsx`
- [Interactive Map](https://github.com/mithun616/pelagix-global/blob/main/src/components/map/PelagixMap.tsx): `src/components/map/PelagixMap.tsx`
- [3D Globe](https://github.com/mithun616/pelagix-global/blob/main/src/components/map/PelagixGlobe3D.tsx): `src/components/map/PelagixGlobe3D.tsx`

### Domain Data

- [Coastal Regions](https://github.com/mithun616/pelagix-global/blob/main/src/data/coastalLocations.ts): `src/data/coastalLocations.ts`
- [Historical Observations](https://github.com/mithun616/pelagix-global/blob/main/src/data/historicalObservations.ts): `src/data/historicalObservations.ts`
- [Climate Projections](https://github.com/mithun616/pelagix-global/blob/main/src/data/ipccProjections.ts): `src/data/ipccProjections.ts`
- [Road Networks](https://github.com/mithun616/pelagix-global/blob/main/src/data/roadNetworks.ts): `src/data/roadNetworks.ts`
- [Source Registry](https://github.com/mithun616/pelagix-global/blob/main/src/data/dataSourceRegistry.ts): `src/data/dataSourceRegistry.ts`

### Analysis Services

- [Risk Calculator](https://github.com/mithun616/pelagix-global/blob/main/src/services/riskCalculator.ts): `src/services/riskCalculator.ts`
- [Route Solver](https://github.com/mithun616/pelagix-global/blob/main/src/services/dijkstraRouter.ts): `src/services/dijkstraRouter.ts`
- [API Adapters](https://github.com/mithun616/pelagix-global/blob/main/src/services/apiAdapters.ts): `src/services/apiAdapters.ts`

### Other components

- **Planner**

## Connections

- Planner → Dashboard Shell: uses (evidence: `README.md`)
- Dashboard Shell → App State: provides state (evidence: `src/App.tsx`)
- Dashboard Shell → Global Overview: routes to (evidence: `src/App.tsx`)
- Dashboard Shell → Sea-Level Trends: routes to (evidence: `src/App.tsx`)
- Dashboard Shell → Coastal Risk Map: routes to (evidence: `src/App.tsx`)
- Dashboard Shell → Scenario Explorer: routes to (evidence: `src/App.tsx`)
- Dashboard Shell → Infrastructure Access: routes to (evidence: `src/App.tsx`)
- Dashboard Shell → Event Monitor: routes to (evidence: `src/App.tsx`)
- Dashboard Shell → Risk Prioritization: routes to (evidence: `src/App.tsx`)
- Dashboard Shell → Data Sources: routes to (evidence: `src/App.tsx`)
- Dashboard Shell → Methodology: routes to (evidence: `src/App.tsx`)
- Dashboard Shell → Settings: routes to (evidence: `src/App.tsx`)
- App State → Coastal Regions: loads region state (evidence: `src/context/AppContext.tsx`)
- App State → Road Networks: loads road graph (evidence: `src/context/AppContext.tsx`)
- App State → Route Solver: creates router (evidence: `src/context/AppContext.tsx`)
- Global Overview → App State: reads state (evidence: `src/components/pages/GlobalOverviewPage.tsx`)
- Global Overview → Interactive Map: renders (evidence: `src/components/pages/GlobalOverviewPage.tsx`)
- Global Overview → 3D Globe: renders (evidence: `src/components/pages/GlobalOverviewPage.tsx`)
- Global Overview → Climate Projections: reads projections (evidence: `src/components/pages/GlobalOverviewPage.tsx`)
- Global Overview → Coastal Regions: reads regions (evidence: `src/components/pages/GlobalOverviewPage.tsx`)
- Global Overview → Source Registry: reads sources (evidence: `src/components/pages/GlobalOverviewPage.tsx`)
- Sea-Level Trends → Historical Observations: reads observations (evidence: `src/components/pages/SeaLevelTrendsPage.tsx`)
- Sea-Level Trends → Climate Projections: reads projections (evidence: `src/components/pages/SeaLevelTrendsPage.tsx`)
- Coastal Risk Map → Interactive Map: renders (evidence: `src/components/pages/CoastalRiskMapPage.tsx`)
- Coastal Risk Map → 3D Globe: renders (evidence: `src/components/pages/CoastalRiskMapPage.tsx`)
- Scenario Explorer → Risk Calculator: calculates risk (evidence: `src/components/pages/ScenarioExplorerPage.tsx`)
- Scenario Explorer → Climate Projections: reads projections (evidence: `src/components/pages/ScenarioExplorerPage.tsx`)
- Infrastructure Access → Interactive Map: renders (evidence: `src/components/pages/InfrastructureAccessibilityPage.tsx`)
- Infrastructure Access → Road Networks: reads network (evidence: `src/components/pages/InfrastructureAccessibilityPage.tsx`)
- Event Monitor → API Adapters: uses adapters (evidence: `src/components/pages/LiveEventMonitorPage.tsx`)
- Risk Prioritization → Risk Calculator: calculates ranking (evidence: `src/components/pages/RiskPrioritizationPage.tsx`)
- Risk Prioritization → Coastal Regions: reads regions (evidence: `src/components/pages/RiskPrioritizationPage.tsx`)
- Data Sources → Source Registry: reads registry (evidence: `src/components/pages/DataSourcesPage.tsx`)
- Settings → API Adapters: uses adapters (evidence: `src/components/pages/SettingsPage.tsx`)
- Interactive Map → Coastal Regions: renders locations (evidence: `src/components/map/PelagixMap.tsx`)
- Interactive Map → Road Networks: renders roads (evidence: `src/components/map/PelagixMap.tsx`)
- Interactive Map → Historical Observations: reads gauges (evidence: `src/components/map/PelagixMap.tsx`)
- 3D Globe → Coastal Regions: renders locations (evidence: `src/components/map/PelagixGlobe3D.tsx`)
- Risk Calculator → Climate Projections: reads projections (evidence: `src/services/riskCalculator.ts`)
- Route Solver → Road Networks: routes on graph (evidence: `src/services/dijkstraRouter.ts`)
