# nikhildath/astra-astronaut-safety-tracking-real-time-analytics architecture

> Architecture diagram of the GitHub repository nikhildath/astra-astronaut-safety-tracking-real-time-analytics, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics
- Repository: https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics

## Overview

ASTRA is a spaceflight self-monitoring dashboard: an astronaut reviews health indicators and body systems, logs readings, and consults hazard-linked actions and education; recorded readings also support trends and gamification. The Home page is the main workflow coordinator, with ThreeScene providing the interactive body map and data-service handling persistence. The README documents additional dashboard capabilities, but excerpts do not expose all their internal wiring; those are represented at subsystem level rather than with inferred call chains.

Main entry points: [`src/pages/Home.tsx`](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/pages/Home.tsx) (Health dashboard), [`src/content.ts`](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/content.ts) (Health definitions and guidance), [`src/components/IndicatorCard.tsx`](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/IndicatorCard.tsx) (Indicator cards), [`src/lib/data-service.ts`](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/lib/data-service.ts) (Health data service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Dashboard experience"]
  node_app["Application router<br/>[App.tsx]"]
  node_dashboard["Health dashboard<br/>[Home.tsx]"]
  node_bodymap["Interactive body map<br/>[ThreeScene.tsx]"]
  node_indicators["Indicator cards<br/>[IndicatorCard.tsx]"]
  node_healthring["Status rings<br/>[HealthRing.tsx]"]
  node_bodysystems["Body system cards<br/>[BodySystemCard.tsx]"]
end

subgraph group_guidance["Health guidance"]
  node_hazards["Spaceflight hazards<br/>[HazardCard.tsx]"]
  node_actions["Action library<br/>[ActionCard.tsx]"]
  node_education["Education content<br/>[Docs.tsx]"]
  node_exercise["Exercise and nutrition<br/>[content.ts]"]
end

subgraph group_persistence["Data and progress"]
  node_datastore["Health data service<br/>[data-service.ts]"]
  node_localstore[("Browser storage")]
  node_supabase[("Supabase backend")]
  node_gamification["XP and achievements"]
end

subgraph group_shared["Shared health definitions"]
  node_content["Health definitions and guidance<br/>[content.ts]"]
end

node_astronaut(("Astronaut"))

node_astronaut -->|"opens dashboard"| node_app
node_app -->|"routes to"| node_dashboard
node_dashboard -->|"renders"| node_bodymap
node_dashboard -->|"loads and saves"| node_datastore
node_dashboard -.->|"presents readings"| node_indicators
node_indicators -->|"renders"| node_healthring
node_dashboard -.->|"presents systems"| node_bodysystems
node_dashboard -.->|"presents hazards"| node_hazards
node_dashboard -.->|"presents actions"| node_actions
node_dashboard -.->|"provides education"| node_education
node_dashboard -.->|"shows progress"| node_gamification
node_actions -->|"uses guidance"| node_content
node_bodysystems -->|"uses definitions"| node_content
node_indicators -->|"uses definitions"| node_content
node_gamification -->|"uses configuration"| node_content
node_education -->|"uses reference content"| node_content
node_content -->|"includes"| node_exercise
node_datastore -->|"reads and writes"| node_localstore
node_datastore -->|"reads and writes"| node_supabase

click node_app "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/App.tsx"
click node_dashboard "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/pages/Home.tsx"
click node_bodymap "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/ThreeScene.tsx"
click node_indicators "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/IndicatorCard.tsx"
click node_healthring "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/HealthRing.tsx"
click node_bodysystems "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/BodySystemCard.tsx"
click node_hazards "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/HazardCard.tsx"
click node_actions "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/ActionCard.tsx"
click node_education "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/pages/Docs.tsx"
click node_exercise "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/content.ts"
click node_content "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/content.ts"
click node_datastore "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/lib/data-service.ts"
click node_gamification "https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/GamificationPanel.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_app,node_dashboard,node_bodymap,node_indicators,node_healthring,node_bodysystems toneBlue
class node_hazards,node_actions,node_education,node_exercise toneAmber
class node_datastore,node_localstore,node_supabase,node_gamification toneMint
class node_content toneRose
class node_astronaut toneIndigo
```

## Components

### Dashboard experience

- [Application router](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/App.tsx): `src/App.tsx`
- [Health dashboard](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Interactive body map](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/ThreeScene.tsx): `src/components/ThreeScene.tsx`
- [Indicator cards](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/IndicatorCard.tsx): `src/components/IndicatorCard.tsx`
- [Status rings](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/HealthRing.tsx): `src/components/HealthRing.tsx`
- [Body system cards](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/BodySystemCard.tsx): `src/components/BodySystemCard.tsx`

### Health guidance

- [Spaceflight hazards](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/HazardCard.tsx): `src/components/HazardCard.tsx`
- [Action library](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/ActionCard.tsx): `src/components/ActionCard.tsx`
- [Education content](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/pages/Docs.tsx): `src/pages/Docs.tsx`
- [Exercise and nutrition](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/content.ts): `src/content.ts`

### Data and progress

- [Health data service](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/lib/data-service.ts): `src/lib/data-service.ts`
- **Browser storage**
- **Supabase backend**
- [XP and achievements](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/components/GamificationPanel.tsx): `src/components/GamificationPanel.tsx`

### Shared health definitions

- [Health definitions and guidance](https://github.com/nikhildath/astra-astronaut-safety-tracking-real-time-analytics/blob/main/src/content.ts): `src/content.ts`

### Other components

- **Astronaut**

## Connections

- Astronaut → Application router: opens dashboard (evidence: `src/App.tsx`)
- Application router → Health dashboard: routes to (evidence: `src/App.tsx`)
- Health dashboard → Interactive body map: renders (evidence: `src/pages/Home.tsx`)
- Health dashboard → Health data service: loads and saves (evidence: `src/pages/Home.tsx`)
- Health dashboard → Indicator cards: presents readings
- Indicator cards → Status rings: renders (evidence: `src/components/IndicatorCard.tsx`)
- Health dashboard → Body system cards: presents systems
- Health dashboard → Spaceflight hazards: presents hazards
- Health dashboard → Action library: presents actions
- Health dashboard → Education content: provides education
- Health dashboard → XP and achievements: shows progress
- Action library → Health definitions and guidance: uses guidance (evidence: `src/components/ActionCard.tsx`)
- Body system cards → Health definitions and guidance: uses definitions (evidence: `src/components/BodySystemCard.tsx`)
- Indicator cards → Health definitions and guidance: uses definitions (evidence: `src/components/IndicatorCard.tsx`)
- XP and achievements → Health definitions and guidance: uses configuration (evidence: `src/components/GamificationPanel.tsx`)
- Education content → Health definitions and guidance: uses reference content (evidence: `src/pages/Docs.tsx`)
- Health definitions and guidance → Exercise and nutrition: includes (evidence: `README.md`)
- Health data service → Browser storage: reads and writes (evidence: `src/lib/data-service.ts`)
- Health data service → Supabase backend: reads and writes (evidence: `src/lib/data-service.ts`)
