# superiorpython/astrolabe architecture

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

- Interactive diagram: https://gitdiagram.com/superiorpython/astrolabe
- Repository: https://github.com/superiorpython/astrolabe

## Overview

Astrolabe is a NASA-data space dashboard. Visitors choose one of five feeds from the interactive globe or tab navigation; the selected section fetches and presents its data. An Express API proxies and caches upstream data, with the same app also usable as a Netlify function. The graph preserves the documented feed capabilities and sampled routing/data layers. Some route and section internals are represented from the README and SOURCE INDEX rather than inspected excerpts, so uncertain upstream links are omitted.

Main entry points: [`client/src/App.tsx`](https://github.com/superiorpython/astrolabe/blob/main/client/src/App.tsx) (Dashboard shell), [`client/src/lib/api.ts`](https://github.com/superiorpython/astrolabe/blob/main/client/src/lib/api.ts) (Typed API client), [`server/src/app.ts`](https://github.com/superiorpython/astrolabe/blob/main/server/src/app.ts) (Express API), [`server/src/lib/cache.ts`](https://github.com/superiorpython/astrolabe/blob/main/server/src/lib/cache.ts) (Memory TTL cache)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Navigation"]
  node_app_ui["Dashboard shell<br/>[App.tsx]"]
  node_globe["Home globe<br/>[HomeGlobe.tsx]"]
  node_home_menu["Home menu<br/>[HomeMenu.tsx]"]
  node_tabs["Tab navigation<br/>[TabHeader.tsx]"]
end

subgraph group_dashboard["Dashboard feeds"]
  node_apod["APOD viewer<br/>[ApodSection.tsx]"]
  node_iss["ISS tracker<br/>[IssSection.tsx]"]
  node_neows["Asteroid radar<br/>[NeoWsSection.tsx]"]
  node_exoplanets["Exoplanet catalog"]
  node_weather["Space weather"]
end

subgraph group_client_data["Client data and UI"]
  node_api_client["Typed API client<br/>[api.ts]"]
  node_feed_health["Feed health monitor<br/>[useFeedHealth.ts]"]
  node_fetch_hook["Fetch state hook<br/>[useFetch.ts]"]
  node_format["Data formatting<br/>[format.ts]"]
  node_shared_ui["Shared panel UI"]
end

subgraph group_api["API routing"]
  node_express["Express API<br/>[app.ts]"]
  node_apod_route["APOD route<br/>[apod.ts]"]
  node_iss_route["ISS route<br/>[iss.ts]"]
  node_neows_route["Near-Earth route<br/>[neows.ts]"]
  node_exoplanet_route["Exoplanet route<br/>[exoplanets.ts]"]
  node_donki_route["DONKI route<br/>[donki.ts]"]
end

subgraph group_backend["Backend services"]
  node_cache[("Memory TTL cache<br/>[cache.ts]")]
  node_nasa_client["NASA request client<br/>[nasaClient.ts]"]
end

node_visitor(("Visitor"))
node_nasa_sources{{"NASA and ISS feeds"}}

node_visitor -->|"opens dashboard"| node_app_ui
node_app_ui -->|"shows landing"| node_globe
node_app_ui -->|"shows landing"| node_home_menu
node_app_ui -->|"renders tabs"| node_tabs
node_app_ui -->|"checks feeds"| node_feed_health
node_app_ui -->|"selects feed"| node_apod
node_app_ui -->|"selects feed"| node_iss
node_app_ui -->|"selects feed"| node_neows
node_app_ui -->|"selects feed"| node_exoplanets
node_app_ui -->|"selects feed"| node_weather
node_apod -->|"requests feed"| node_api_client
node_iss -->|"requests position"| node_api_client
node_neows -->|"requests approaches"| node_api_client
node_exoplanets -->|"requests catalog"| node_api_client
node_weather -->|"requests events"| node_api_client
node_feed_health -->|"probes feeds"| node_api_client
node_apod -->|"uses fetch state"| node_fetch_hook
node_iss -->|"uses panels"| node_shared_ui
node_neows -->|"formats values"| node_format
node_api_client -->|"requests API"| node_express
node_express -->|"mounts route"| node_apod_route
node_express -->|"mounts route"| node_iss_route
node_express -->|"mounts route"| node_neows_route
node_express -->|"mounts route"| node_exoplanet_route
node_express -->|"mounts route"| node_donki_route
node_apod_route -->|"caches responses"| node_cache
node_iss_route -->|"caches responses"| node_cache
node_neows_route -->|"caches responses"| node_cache
node_exoplanet_route -->|"caches responses"| node_cache
node_donki_route -->|"caches responses"| node_cache
node_apod_route -->|"fetches upstream"| node_nasa_client
node_neows_route -->|"fetches upstream"| node_nasa_client
node_donki_route -->|"fetches upstream"| node_nasa_client
node_nasa_client -->|"requests data"| node_nasa_sources
node_iss_route -->|"gets position"| node_nasa_sources
node_exoplanet_route -->|"queries catalog"| node_nasa_sources

click node_app_ui "https://github.com/superiorpython/astrolabe/blob/main/client/src/App.tsx"
click node_globe "https://github.com/superiorpython/astrolabe/blob/main/client/src/components/HomeGlobe.tsx"
click node_home_menu "https://github.com/superiorpython/astrolabe/blob/main/client/src/components/HomeMenu.tsx"
click node_tabs "https://github.com/superiorpython/astrolabe/blob/main/client/src/components/TabHeader.tsx"
click node_apod "https://github.com/superiorpython/astrolabe/blob/main/client/src/components/ApodSection.tsx"
click node_iss "https://github.com/superiorpython/astrolabe/blob/main/client/src/components/IssSection.tsx"
click node_neows "https://github.com/superiorpython/astrolabe/blob/main/client/src/components/NeoWsSection.tsx"
click node_exoplanets "https://github.com/superiorpython/astrolabe/blob/main/client/src/components/ExoplanetsSection.tsx"
click node_weather "https://github.com/superiorpython/astrolabe/blob/main/client/src/components/SpaceWeatherSection.tsx"
click node_api_client "https://github.com/superiorpython/astrolabe/blob/main/client/src/lib/api.ts"
click node_feed_health "https://github.com/superiorpython/astrolabe/blob/main/client/src/lib/useFeedHealth.ts"
click node_fetch_hook "https://github.com/superiorpython/astrolabe/blob/main/client/src/lib/useFetch.ts"
click node_format "https://github.com/superiorpython/astrolabe/blob/main/client/src/lib/format.ts"
click node_shared_ui "https://github.com/superiorpython/astrolabe/tree/main/client/src/components"
click node_express "https://github.com/superiorpython/astrolabe/blob/main/server/src/app.ts"
click node_apod_route "https://github.com/superiorpython/astrolabe/blob/main/server/src/routes/apod.ts"
click node_iss_route "https://github.com/superiorpython/astrolabe/blob/main/server/src/routes/iss.ts"
click node_neows_route "https://github.com/superiorpython/astrolabe/blob/main/server/src/routes/neows.ts"
click node_exoplanet_route "https://github.com/superiorpython/astrolabe/blob/main/server/src/routes/exoplanets.ts"
click node_donki_route "https://github.com/superiorpython/astrolabe/blob/main/server/src/routes/donki.ts"
click node_cache "https://github.com/superiorpython/astrolabe/blob/main/server/src/lib/cache.ts"
click node_nasa_client "https://github.com/superiorpython/astrolabe/blob/main/server/src/lib/nasaClient.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_ui,node_globe,node_home_menu,node_tabs toneBlue
class node_apod,node_iss,node_neows,node_exoplanets,node_weather toneAmber
class node_api_client,node_feed_health,node_fetch_hook,node_format,node_shared_ui toneMint
class node_express,node_apod_route,node_iss_route,node_neows_route,node_exoplanet_route,node_donki_route toneRose
class node_cache,node_nasa_client,node_visitor,node_nasa_sources toneIndigo
```

## Components

### Navigation

- [Dashboard shell](https://github.com/superiorpython/astrolabe/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Home globe](https://github.com/superiorpython/astrolabe/blob/main/client/src/components/HomeGlobe.tsx): `client/src/components/HomeGlobe.tsx`
- [Home menu](https://github.com/superiorpython/astrolabe/blob/main/client/src/components/HomeMenu.tsx): `client/src/components/HomeMenu.tsx`
- [Tab navigation](https://github.com/superiorpython/astrolabe/blob/main/client/src/components/TabHeader.tsx): `client/src/components/TabHeader.tsx`

### Dashboard feeds

- [APOD viewer](https://github.com/superiorpython/astrolabe/blob/main/client/src/components/ApodSection.tsx): `client/src/components/ApodSection.tsx`
- [ISS tracker](https://github.com/superiorpython/astrolabe/blob/main/client/src/components/IssSection.tsx): `client/src/components/IssSection.tsx`
- [Asteroid radar](https://github.com/superiorpython/astrolabe/blob/main/client/src/components/NeoWsSection.tsx): `client/src/components/NeoWsSection.tsx`
- [Exoplanet catalog](https://github.com/superiorpython/astrolabe/blob/main/client/src/components/ExoplanetsSection.tsx): `client/src/components/ExoplanetsSection.tsx`
- [Space weather](https://github.com/superiorpython/astrolabe/blob/main/client/src/components/SpaceWeatherSection.tsx): `client/src/components/SpaceWeatherSection.tsx`

### Client data and UI

- [Typed API client](https://github.com/superiorpython/astrolabe/blob/main/client/src/lib/api.ts): `client/src/lib/api.ts`
- [Feed health monitor](https://github.com/superiorpython/astrolabe/blob/main/client/src/lib/useFeedHealth.ts): `client/src/lib/useFeedHealth.ts`
- [Fetch state hook](https://github.com/superiorpython/astrolabe/blob/main/client/src/lib/useFetch.ts): `client/src/lib/useFetch.ts`
- [Data formatting](https://github.com/superiorpython/astrolabe/blob/main/client/src/lib/format.ts): `client/src/lib/format.ts`
- [Shared panel UI](https://github.com/superiorpython/astrolabe/tree/main/client/src/components): `client/src/components`

### API routing

- [Express API](https://github.com/superiorpython/astrolabe/blob/main/server/src/app.ts): `server/src/app.ts`
- [APOD route](https://github.com/superiorpython/astrolabe/blob/main/server/src/routes/apod.ts): `server/src/routes/apod.ts`
- [ISS route](https://github.com/superiorpython/astrolabe/blob/main/server/src/routes/iss.ts): `server/src/routes/iss.ts`
- [Near-Earth route](https://github.com/superiorpython/astrolabe/blob/main/server/src/routes/neows.ts): `server/src/routes/neows.ts`
- [Exoplanet route](https://github.com/superiorpython/astrolabe/blob/main/server/src/routes/exoplanets.ts): `server/src/routes/exoplanets.ts`
- [DONKI route](https://github.com/superiorpython/astrolabe/blob/main/server/src/routes/donki.ts): `server/src/routes/donki.ts`

### Backend services

- [Memory TTL cache](https://github.com/superiorpython/astrolabe/blob/main/server/src/lib/cache.ts): `server/src/lib/cache.ts`
- [NASA request client](https://github.com/superiorpython/astrolabe/blob/main/server/src/lib/nasaClient.ts): `server/src/lib/nasaClient.ts`

### Other components

- **Visitor**
- **NASA and ISS feeds**

## Connections

- Visitor → Dashboard shell: opens dashboard (evidence: `README.md`)
- Dashboard shell → Home globe: shows landing (evidence: `client/src/App.tsx`)
- Dashboard shell → Home menu: shows landing (evidence: `client/src/App.tsx`)
- Dashboard shell → Tab navigation: renders tabs (evidence: `client/src/App.tsx`)
- Dashboard shell → Feed health monitor: checks feeds (evidence: `client/src/App.tsx`)
- Dashboard shell → APOD viewer: selects feed (evidence: `client/src/App.tsx`)
- Dashboard shell → ISS tracker: selects feed (evidence: `client/src/App.tsx`)
- Dashboard shell → Asteroid radar: selects feed (evidence: `client/src/App.tsx`)
- Dashboard shell → Exoplanet catalog: selects feed (evidence: `client/src/App.tsx`)
- Dashboard shell → Space weather: selects feed (evidence: `client/src/App.tsx`)
- APOD viewer → Typed API client: requests feed (evidence: `client/src/components/ApodSection.tsx`)
- ISS tracker → Typed API client: requests position (evidence: `client/src/components/IssSection.tsx`)
- Asteroid radar → Typed API client: requests approaches (evidence: `client/src/components/NeoWsSection.tsx`)
- Exoplanet catalog → Typed API client: requests catalog (evidence: `client/src/components/ExoplanetsSection.tsx`)
- Space weather → Typed API client: requests events (evidence: `client/src/components/SpaceWeatherSection.tsx`)
- Feed health monitor → Typed API client: probes feeds (evidence: `client/src/lib/useFeedHealth.ts`)
- APOD viewer → Fetch state hook: uses fetch state (evidence: `client/src/components/ApodSection.tsx`)
- ISS tracker → Shared panel UI: uses panels (evidence: `client/src/components/IssSection.tsx`)
- Asteroid radar → Data formatting: formats values (evidence: `client/src/components/NeoWsSection.tsx`)
- Typed API client → Express API: requests API (evidence: `README.md`)
- Express API → APOD route: mounts route (evidence: `server/src/app.ts`)
- Express API → ISS route: mounts route (evidence: `server/src/app.ts`)
- Express API → Near-Earth route: mounts route (evidence: `server/src/app.ts`)
- Express API → Exoplanet route: mounts route (evidence: `server/src/app.ts`)
- Express API → DONKI route: mounts route (evidence: `server/src/app.ts`)
- APOD route → Memory TTL cache: caches responses (evidence: `server/src/routes/apod.ts`)
- ISS route → Memory TTL cache: caches responses (evidence: `server/src/routes/iss.ts`)
- Near-Earth route → Memory TTL cache: caches responses (evidence: `server/src/routes/neows.ts`)
- Exoplanet route → Memory TTL cache: caches responses (evidence: `server/src/routes/exoplanets.ts`)
- DONKI route → Memory TTL cache: caches responses (evidence: `server/src/routes/donki.ts`)
- APOD route → NASA request client: fetches upstream (evidence: `server/src/routes/apod.ts`)
- Near-Earth route → NASA request client: fetches upstream (evidence: `server/src/routes/neows.ts`)
- DONKI route → NASA request client: fetches upstream (evidence: `server/src/routes/donki.ts`)
- NASA request client → NASA and ISS feeds: requests data (evidence: `README.md`)
- ISS route → NASA and ISS feeds: gets position (evidence: `README.md`)
- Exoplanet route → NASA and ISS feeds: queries catalog (evidence: `README.md`)
