# yasar-sys/living-earth-trend-detective-nasc architecture

> Architecture diagram of the GitHub repository yasar-sys/living-earth-trend-detective-nasc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yasar-sys/living-earth-trend-detective-nasc
- Repository: https://github.com/yasar-sys/living-earth-trend-detective-nasc

## Overview

Earth Trend Watch is an interactive Earth-observation trend investigation app. The main workflow moves from the landing page into the globe investigation: users choose a data layer and year, select a region, then inspect its time series, rate, significance, and source. Separate cases, hypothesis puzzles, and a printable report broaden the analysis experience. The graph reflects documented imports and calls; unsampled UI and route internals are represented only where the README or source index supports them. The README describes pre-fetched data rather than live NASA API access.

Main entry points: [`src/data/trends.ts`](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/data/trends.ts) (Cached trend results), [`src/components/RegionPanel.tsx`](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/RegionPanel.tsx) (Region details), [`src/routes/investigate.tsx`](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/investigate.tsx) (Investigation page), [`src/routes/cases.tsx`](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/cases.tsx) (Cases page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_landing["Landing page<br/>[index.tsx]"]
  node_starfield["Starfield<br/>[Starfield.tsx]"]
end

subgraph group_exploration["Globe exploration"]
  node_investigate["Investigation page<br/>[investigate.tsx]"]
  node_globe["3D globe<br/>[EarthScene.tsx]"]
  node_globeview["Globe canvas<br/>[GlobeCanvas.tsx]"]
  node_layers["Layer selector<br/>[LayerPanel.tsx]"]
  node_timeslider["Year slider<br/>[TimeSlider.tsx]"]
  node_regionpanel["Region details<br/>[RegionPanel.tsx]"]
end

subgraph group_analysis["Trend analysis"]
  node_datasets[("NASA time series<br/>[nasa-datasets.ts]")]
  node_trends["Cached trend results<br/>[trends.ts]"]
  node_mannkendall["Mann–Kendall test<br/>[mann-kendall.ts]"]
end

subgraph group_content["Investigation content"]
  node_casesroute["Cases page<br/>[cases.tsx]"]
  node_detectiveroute["Detective mode<br/>[detective-mode.tsx]"]
  node_report["Printable report<br/>[report.tsx]"]
  node_casecontent["Case narratives<br/>[cases.ts]"]
end

subgraph group_shared["Shared presentation"]
  node_navigation["Site navigation<br/>[SiteNav.tsx]"]
  node_chart["Trend chart<br/>[TrendChart.tsx]"]
  node_credit["Source credits<br/>[SourceCredit.tsx]"]
  node_animated["Animated values<br/>[AnimatedNumber.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_landing
node_visitor -->|"starts investigating"| node_investigate
node_visitor -->|"opens cases"| node_casesroute
node_landing -->|"renders"| node_starfield
node_investigate -->|"renders"| node_globeview
node_globeview -.->|"hosts"| node_globe
node_investigate -->|"renders"| node_layers
node_investigate -->|"renders"| node_timeslider
node_investigate -->|"renders"| node_regionpanel
node_globe -->|"reads series"| node_datasets
node_globe -->|"reads trends"| node_trends
node_regionpanel -->|"gets regional trend"| node_trends
node_regionpanel -->|"reads metadata"| node_datasets
node_regionpanel -->|"renders"| node_chart
node_regionpanel -->|"renders"| node_credit
node_regionpanel -->|"renders"| node_animated
node_timeslider -.->|"reads year value"| node_trends
node_trends -->|"gets series"| node_datasets
node_trends -->|"computes statistics"| node_mannkendall
node_casesroute -->|"reads cases"| node_casecontent
node_casesroute -->|"renders charts"| node_chart
node_casesroute -->|"reads layer metadata"| node_datasets
node_detectiveroute -.->|"gets trends"| node_trends
node_detectiveroute -->|"renders charts"| node_chart
node_detectiveroute -->|"renders credits"| node_credit
node_report -->|"reads cases"| node_casecontent
node_report -->|"gets layer trends"| node_trends
node_report -->|"formats p-values"| node_mannkendall
node_landing -.->|"links to app"| node_navigation

click node_landing "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/index.tsx"
click node_navigation "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/SiteNav.tsx"
click node_casesroute "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/cases.tsx"
click node_detectiveroute "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/detective-mode.tsx"
click node_investigate "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/investigate.tsx"
click node_report "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/report.tsx"
click node_globe "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/globe/EarthScene.tsx"
click node_globeview "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/globe/GlobeCanvas.tsx"
click node_layers "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/LayerPanel.tsx"
click node_timeslider "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/TimeSlider.tsx"
click node_regionpanel "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/RegionPanel.tsx"
click node_datasets "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/data/nasa-datasets.ts"
click node_trends "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/data/trends.ts"
click node_mannkendall "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/lib/mann-kendall.ts"
click node_chart "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/TrendChart.tsx"
click node_credit "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/SourceCredit.tsx"
click node_animated "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/AnimatedNumber.tsx"
click node_casecontent "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/data/cases.ts"
click node_starfield "https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/Starfield.tsx"

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_landing,node_starfield toneBlue
class node_investigate,node_globe,node_globeview,node_layers,node_timeslider,node_regionpanel toneAmber
class node_datasets,node_trends,node_mannkendall toneMint
class node_casesroute,node_detectiveroute,node_report,node_casecontent toneRose
class node_navigation,node_chart,node_credit,node_animated,node_visitor toneIndigo
```

## Components

### App experience

- [Landing page](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Starfield](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/Starfield.tsx): `src/components/Starfield.tsx`

### Globe exploration

- [Investigation page](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/investigate.tsx): `src/routes/investigate.tsx`
- [3D globe](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/globe/EarthScene.tsx): `src/components/globe/EarthScene.tsx`
- [Globe canvas](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/globe/GlobeCanvas.tsx): `src/components/globe/GlobeCanvas.tsx`
- [Layer selector](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/LayerPanel.tsx): `src/components/LayerPanel.tsx`
- [Year slider](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/TimeSlider.tsx): `src/components/TimeSlider.tsx`
- [Region details](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/RegionPanel.tsx): `src/components/RegionPanel.tsx`

### Trend analysis

- [NASA time series](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/data/nasa-datasets.ts): `src/data/nasa-datasets.ts`
- [Cached trend results](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/data/trends.ts): `src/data/trends.ts`
- [Mann–Kendall test](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/lib/mann-kendall.ts): `src/lib/mann-kendall.ts`

### Investigation content

- [Cases page](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/cases.tsx): `src/routes/cases.tsx`
- [Detective mode](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/detective-mode.tsx): `src/routes/detective-mode.tsx`
- [Printable report](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/routes/report.tsx): `src/routes/report.tsx`
- [Case narratives](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/data/cases.ts): `src/data/cases.ts`

### Shared presentation

- [Site navigation](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/SiteNav.tsx): `src/components/SiteNav.tsx`
- [Trend chart](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/TrendChart.tsx): `src/components/TrendChart.tsx`
- [Source credits](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/SourceCredit.tsx): `src/components/SourceCredit.tsx`
- [Animated values](https://github.com/yasar-sys/living-earth-trend-detective-nasc/blob/main/src/components/AnimatedNumber.tsx): `src/components/AnimatedNumber.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Landing page: opens (evidence: `src/routes/index.tsx`)
- Visitor → Investigation page: starts investigating
- Visitor → Cases page: opens cases
- Landing page → Starfield: renders (evidence: `src/routes/index.tsx`)
- Investigation page → Globe canvas: renders (evidence: `src/routes/investigate.tsx`)
- Globe canvas → 3D globe: hosts
- Investigation page → Layer selector: renders (evidence: `src/routes/investigate.tsx`)
- Investigation page → Year slider: renders (evidence: `src/routes/investigate.tsx`)
- Investigation page → Region details: renders (evidence: `src/routes/investigate.tsx`)
- 3D globe → NASA time series: reads series (evidence: `src/components/globe/EarthScene.tsx`)
- 3D globe → Cached trend results: reads trends (evidence: `src/components/globe/EarthScene.tsx`)
- Region details → Cached trend results: gets regional trend (evidence: `src/components/RegionPanel.tsx`)
- Region details → NASA time series: reads metadata (evidence: `src/components/RegionPanel.tsx`)
- Region details → Trend chart: renders (evidence: `src/components/RegionPanel.tsx`)
- Region details → Source credits: renders (evidence: `src/components/RegionPanel.tsx`)
- Region details → Animated values: renders (evidence: `src/components/RegionPanel.tsx`)
- Year slider → Cached trend results: reads year value
- Cached trend results → NASA time series: gets series (evidence: `src/data/trends.ts`)
- Cached trend results → Mann–Kendall test: computes statistics (evidence: `src/data/trends.ts`)
- Cases page → Case narratives: reads cases (evidence: `src/routes/cases.tsx`)
- Cases page → Trend chart: renders charts (evidence: `src/routes/cases.tsx`)
- Cases page → NASA time series: reads layer metadata (evidence: `src/routes/cases.tsx`)
- Detective mode → Cached trend results: gets trends (evidence: `src/routes/detective-mode.tsx`)
- Detective mode → Trend chart: renders charts (evidence: `src/routes/detective-mode.tsx`)
- Detective mode → Source credits: renders credits (evidence: `src/routes/detective-mode.tsx`)
- Printable report → Case narratives: reads cases (evidence: `src/routes/report.tsx`)
- Printable report → Cached trend results: gets layer trends (evidence: `src/routes/report.tsx`)
- Printable report → Mann–Kendall test: formats p-values (evidence: `src/routes/report.tsx`)
- Landing page → Site navigation: links to app
