# acesarp/iss_tracker architecture

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

- Interactive diagram: https://gitdiagram.com/acesarp/iss_tracker
- Repository: https://github.com/acesarp/iss_tracker

## Overview

Mission Control is a Next.js dashboard for live ISS tracking, orbit prediction, and NOAA space weather. The browser polls app routes; those routes fetch and cache upstream data, and React components present it as a globe or flat map, position statistics, and weather charts. Orbit calculation is a server-side layer called by the track route. README statements document the orbit’s TLE sources and SGP4 calculation; the orbit implementation itself was read but not excerpted, so those upstream links are attributed to the README. The graph omits deployment and build machinery.

Main entry points: [`mission-control/components/IssTracker.tsx`](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/components/IssTracker.tsx) (ISS tracker), [`mission-control/components/SpaceWeatherPanel.tsx`](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/components/SpaceWeatherPanel.tsx) (Weather panel), [`mission-control/lib/orbit.ts`](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/lib/orbit.ts) (Orbit calculation), [`mission-control/app/page.tsx`](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/page.tsx) (Dashboard page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard UI"]
  node_dashboard["Dashboard page<br/>[page.tsx]"]
  node_iss_tracker["ISS tracker<br/>[IssTracker.tsx]"]
  node_world_map["Globe and map<br/>[WorldMap.tsx]"]
  node_weather_panel["Weather panel"]
  node_sparkline["Weather sparklines<br/>[Sparkline.tsx]"]
end

subgraph group_iss["ISS Data"]
  node_iss_position_route["Position API<br/>[route.ts]"]
  node_track_route["Orbit track API<br/>[route.ts]"]
  node_orbit["Orbit calculation<br/>[orbit.ts]"]
  node_iss_types["ISS data types<br/>[iss.ts]"]
end

subgraph group_weather["Space Weather"]
  node_weather_route["Weather API<br/>[route.ts]"]
  node_weather_types["Weather types and helpers<br/>[space-weather.ts]"]
end

subgraph group_shared["Shared App Layer"]
  node_layout["App layout<br/>[layout.tsx]"]
  node_base_path["API path prefix<br/>[base-path.ts]"]
end

node_browser(("Browser visitor"))
node_wheretheiss["Where the ISS at?"]
node_celestrak["CelesTrak TLE"]
node_noaa["NOAA SWPC"]
node_satellitejs["satellite.js SGP4"]

node_browser -->|"views"| node_dashboard
node_dashboard -->|"renders"| node_iss_tracker
node_dashboard -->|"renders"| node_weather_panel
node_iss_tracker -->|"polls"| node_iss_position_route
node_iss_tracker -->|"polls"| node_track_route
node_iss_tracker -->|"renders"| node_world_map
node_weather_panel -->|"polls"| node_weather_route
node_weather_panel -->|"renders"| node_sparkline
node_iss_position_route -->|"fetches position"| node_wheretheiss
node_track_route -->|"requests track"| node_orbit
node_orbit -->|"downloads TLE"| node_celestrak
node_orbit -.->|"uses fallback"| node_wheretheiss
node_orbit -->|"calculates orbit"| node_satellitejs
node_weather_route -->|"fetches feeds"| node_noaa
node_iss_position_route -->|"returns position"| node_iss_types
node_track_route -->|"returns track"| node_iss_types
node_weather_route -->|"returns weather data"| node_weather_types
node_weather_panel -->|"uses helpers"| node_weather_types
node_world_map -->|"uses position data"| node_iss_types
node_layout -->|"wraps page"| node_dashboard
node_iss_tracker -->|"prefixes API paths"| node_base_path
node_weather_panel -->|"prefixes API path"| node_base_path
node_world_map -->|"prefixes asset path"| node_base_path

click node_dashboard "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/page.tsx"
click node_iss_tracker "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/components/IssTracker.tsx"
click node_world_map "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/components/WorldMap.tsx"
click node_weather_panel "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/components/SpaceWeatherPanel.tsx"
click node_sparkline "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/components/Sparkline.tsx"
click node_iss_position_route "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/api/iss/route.ts"
click node_track_route "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/api/iss/track/route.ts"
click node_orbit "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/lib/orbit.ts"
click node_iss_types "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/lib/iss.ts"
click node_weather_route "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/api/space-weather/route.ts"
click node_weather_types "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/lib/space-weather.ts"
click node_layout "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/layout.tsx"
click node_base_path "https://github.com/acesarp/iss_tracker/blob/dev/mission-control/lib/base-path.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_dashboard,node_iss_tracker,node_world_map,node_weather_panel,node_sparkline,node_browser toneBlue
class node_iss_position_route,node_track_route,node_orbit,node_iss_types toneAmber
class node_weather_route,node_weather_types toneMint
class node_layout,node_base_path toneRose
class node_wheretheiss,node_celestrak,node_noaa,node_satellitejs toneIndigo
```

## Components

### Dashboard UI

- [Dashboard page](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/page.tsx): `mission-control/app/page.tsx`
- [ISS tracker](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/components/IssTracker.tsx): `mission-control/components/IssTracker.tsx`
- [Globe and map](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/components/WorldMap.tsx): `mission-control/components/WorldMap.tsx`
- [Weather panel](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/components/SpaceWeatherPanel.tsx): `mission-control/components/SpaceWeatherPanel.tsx`
- [Weather sparklines](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/components/Sparkline.tsx): `mission-control/components/Sparkline.tsx`

### ISS Data

- [Position API](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/api/iss/route.ts): `mission-control/app/api/iss/route.ts`
- [Orbit track API](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/api/iss/track/route.ts): `mission-control/app/api/iss/track/route.ts`
- [Orbit calculation](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/lib/orbit.ts): `mission-control/lib/orbit.ts`
- [ISS data types](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/lib/iss.ts): `mission-control/lib/iss.ts`

### Space Weather

- [Weather API](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/api/space-weather/route.ts): `mission-control/app/api/space-weather/route.ts`
- [Weather types and helpers](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/lib/space-weather.ts): `mission-control/lib/space-weather.ts`

### Shared App Layer

- [App layout](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/app/layout.tsx): `mission-control/app/layout.tsx`
- [API path prefix](https://github.com/acesarp/iss_tracker/blob/dev/mission-control/lib/base-path.ts): `mission-control/lib/base-path.ts`

### Other components

- **Browser visitor**
- **Where the ISS at?**
- **CelesTrak TLE**
- **NOAA SWPC**
- **satellite.js SGP4**

## Connections

- Browser visitor → Dashboard page: views (evidence: `mission-control/app/page.tsx`)
- Dashboard page → ISS tracker: renders (evidence: `mission-control/app/page.tsx`)
- Dashboard page → Weather panel: renders (evidence: `mission-control/app/page.tsx`)
- ISS tracker → Position API: polls (evidence: `mission-control/components/IssTracker.tsx`)
- ISS tracker → Orbit track API: polls (evidence: `mission-control/components/IssTracker.tsx`)
- ISS tracker → Globe and map: renders (evidence: `mission-control/components/IssTracker.tsx`)
- Weather panel → Weather API: polls (evidence: `mission-control/components/SpaceWeatherPanel.tsx`)
- Weather panel → Weather sparklines: renders (evidence: `mission-control/components/SpaceWeatherPanel.tsx`)
- Position API → Where the ISS at?: fetches position (evidence: `mission-control/app/api/iss/route.ts`)
- Orbit track API → Orbit calculation: requests track (evidence: `mission-control/app/api/iss/track/route.ts`)
- Orbit calculation → CelesTrak TLE: downloads TLE (evidence: `README.md`)
- Orbit calculation → Where the ISS at?: uses fallback (evidence: `README.md`)
- Orbit calculation → satellite.js SGP4: calculates orbit (evidence: `README.md`)
- Weather API → NOAA SWPC: fetches feeds (evidence: `mission-control/app/api/space-weather/route.ts`)
- Position API → ISS data types: returns position (evidence: `mission-control/app/api/iss/route.ts`)
- Orbit track API → ISS data types: returns track (evidence: `mission-control/app/api/iss/track/route.ts`)
- Weather API → Weather types and helpers: returns weather data (evidence: `mission-control/app/api/space-weather/route.ts`)
- Weather panel → Weather types and helpers: uses helpers (evidence: `mission-control/components/SpaceWeatherPanel.tsx`)
- Globe and map → ISS data types: uses position data (evidence: `mission-control/components/WorldMap.tsx`)
- App layout → Dashboard page: wraps page (evidence: `mission-control/app/layout.tsx`)
- ISS tracker → API path prefix: prefixes API paths (evidence: `mission-control/components/IssTracker.tsx`)
- Weather panel → API path prefix: prefixes API path (evidence: `mission-control/components/SpaceWeatherPanel.tsx`)
- Globe and map → API path prefix: prefixes asset path (evidence: `mission-control/components/WorldMap.tsx`)
