# madhan-crypto/astronaut-mission-trainer architecture

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

- Interactive diagram: https://gitdiagram.com/madhan-crypto/astronaut-mission-trainer
- Repository: https://github.com/madhan-crypto/astronaut-mission-trainer

## Overview

This is a browser-based Artemis lunar-outpost mission trainer for learners. The user journey runs through the React application: review a mission, preview and commit trade-off choices, monitor the three system gauges and habitat telemetry, then see a debrief and continue or restart. The same application provides the glossary, accessibility/audio controls, and Nova guide. Its NASA service fetches flare and imagery data with archived fallbacks. App-to-service wiring is evidenced by the source index; the excerpts do not expose the complete mission-state flow or all service rendering details.

Main entry points: [`src/App.jsx`](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx) (Mission Trainer), [`src/services/nasaApi.js`](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/services/nasaApi.js) (Telemetry Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mission["Mission Simulation"]
  node_app["Mission Trainer<br/>[App.jsx]"]
  node_missionplay["Mission Decisions<br/>[App.jsx]"]
  node_gauges["System Gauges<br/>[App.jsx]"]
  node_habitat["Habitat View<br/>[App.jsx]"]
  node_debrief["Mission Debrief<br/>[App.jsx]"]
end

subgraph group_learning["Learning and Guidance"]
  node_accessibility["Accessibility Controls<br/>[App.jsx]"]
  node_glossary["Space Glossary<br/>[App.jsx]"]
  node_nova["Nova Guide<br/>[App.jsx]"]
end

subgraph group_telemetry["NASA Telemetry"]
  node_telemetry["Telemetry Service<br/>[nasaApi.js]"]
  node_donki["NASA DONKI"]
  node_imagelibrary["NASA Image Library"]
  node_archived["Offline Fallback Data<br/>[nasaApi.js]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_app -->|"presents"| node_missionplay
node_missionplay -->|"previews deltas"| node_gauges
node_missionplay -->|"updates telemetry view"| node_habitat
node_missionplay -->|"reports outcome"| node_debrief
node_app -->|"offers controls"| node_accessibility
node_app -->|"renders"| node_glossary
node_app -->|"renders"| node_nova
node_app -->|"fetches data"| node_telemetry
node_telemetry -->|"requests flares"| node_donki
node_telemetry -->|"requests imagery"| node_imagelibrary
node_telemetry -->|"falls back to"| node_archived
node_telemetry -->|"returns weather and images"| node_app

click node_app "https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx"
click node_missionplay "https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx"
click node_gauges "https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx"
click node_habitat "https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx"
click node_debrief "https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx"
click node_accessibility "https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx"
click node_glossary "https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx"
click node_nova "https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx"
click node_telemetry "https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/services/nasaApi.js"
click node_archived "https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/services/nasaApi.js"

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_missionplay,node_gauges,node_habitat,node_debrief toneBlue
class node_accessibility,node_glossary,node_nova toneAmber
class node_telemetry,node_donki,node_imagelibrary,node_archived toneMint
class node_learner toneIndigo
```

## Components

### Mission Simulation

- [Mission Trainer](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx): `src/App.jsx`
- [Mission Decisions](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx): `src/App.jsx`
- [System Gauges](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx): `src/App.jsx`
- [Habitat View](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx): `src/App.jsx`
- [Mission Debrief](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx): `src/App.jsx`

### Learning and Guidance

- [Accessibility Controls](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx): `src/App.jsx`
- [Space Glossary](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx): `src/App.jsx`
- [Nova Guide](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/App.jsx): `src/App.jsx`

### NASA Telemetry

- [Telemetry Service](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/services/nasaApi.js): `src/services/nasaApi.js`
- **NASA DONKI**
- **NASA Image Library**
- [Offline Fallback Data](https://github.com/madhan-crypto/astronaut-mission-trainer/blob/main/src/services/nasaApi.js): `src/services/nasaApi.js`

### Other components

- **Learner**

## Connections

- Learner → Mission Trainer: uses (evidence: `README.md`)
- Mission Trainer → Mission Decisions: presents (evidence: `src/App.jsx`)
- Mission Decisions → System Gauges: previews deltas (evidence: `src/App.jsx`)
- Mission Decisions → Habitat View: updates telemetry view (evidence: `README.md`)
- Mission Decisions → Mission Debrief: reports outcome (evidence: `README.md`)
- Mission Trainer → Accessibility Controls: offers controls (evidence: `src/App.jsx`)
- Mission Trainer → Space Glossary: renders (evidence: `src/App.jsx`)
- Mission Trainer → Nova Guide: renders (evidence: `src/App.jsx`)
- Mission Trainer → Telemetry Service: fetches data (evidence: `README.md`)
- Telemetry Service → NASA DONKI: requests flares (evidence: `src/services/nasaApi.js`)
- Telemetry Service → NASA Image Library: requests imagery (evidence: `src/services/nasaApi.js`)
- Telemetry Service → Offline Fallback Data: falls back to (evidence: `src/services/nasaApi.js`)
- Telemetry Service → Mission Trainer: returns weather and images (evidence: `src/App.jsx`)
