Skip to content
StatusImplementedData originSIMULATEDREAL_PUBLICVerified on

Architecture Overview ​

The Astronaut Health Intelligence Platform (AHI) has two deployable parts:

  • The web app (frontend/web): the simulation of the crew devices, the health engine, the state store and the 3D viewer all run in one browser tab.
  • The optional AHI API (backend/): a FastAPI modular monolith that stores canonical observations, reads public NASA data (DONKI, OSDR), hosts the demo assistant and an experimental analytics endpoint (Backend and API).

The app does not depend on the API. Without it the app runs in offline demo mode: everything works, space weather comes from a bundled real DONKI snapshot, and only the live OSDR search and the assistant are unavailable. This keeps the hackathon demo reliable while the contracts of the product spec (canonical HealthObservation, data_origin, versioned rules) are already shared by both parts. What is still conceptual (authentication, the Python engine, background jobs) is in Target architecture.

Context (C4 level 1) ​

People use one web page. The browser never calls NASA or the Claude API directly: when the AHI API is reachable it does that on the app's behalf; otherwise the app uses what it ships (the OSDR panels imported at build time, the DONKI snapshot and the 3D anatomy built by the asset pipeline during development).

Containers (C4 level 2) ​

ContainerTechnologyResponsibilityDetails
SimulatorTypeScriptCrew physiology, devices, cabin, scenarios; emits canonical observationsDevice simulation
Health engineTypeScript, no DOMBaselines, anomalies, risk, forecasts, recommendations, alerts, Earth link, check-insEngine and simulation
StorezustandOwns the engine, drives the sim clock, publishes changed slicesFrontend and state
UIReact 19, Tailwind CSS v4, RechartsGround view, Crew view, drawers and dialogsFrontend and state
3D viewerthree.js, react-three-fiber, drei, postprocessingAnatomical atlas with selectable structures, status highlights, live heart beat and breathing; procedural fallback3D anatomy
Anatomy atlasStatic GLB files (meshopt) and manifest.jsonThird party reference anatomy (Z-Anatomy, CC BY-SA 4.0), built by the asset pipeline at development time3D anatomy assets
OSDR panels and DONKI snapshotStatic JSONReal public data as reference and mission contextDataset catalog, NASA data sources
API clientTypeScript, types generated from OpenAPIProbes the API, falls back to offline pathsBackend and API
AHI API (optional)Python 3.12, FastAPI, Pydantic, SQLAlchemy, AlembicRegistry, ingestion, observations, NASA connectors, assistant, analyticsBackend and API
Database (with the API)SQLite by default, PostgreSQL 17 with Docker ComposeObservations, registryBackend and API

Stack ​

LayerTechnology
UI frameworkReact 19 + TypeScript
Build and dev serverVite 8
StylingTailwind CSS v4
3Dthree.js with react-three-fiber, drei and postprocessing (bloom)
3D asset preparation (development time)Blender 4.5 LTS (headless), glTF Transform, meshoptimizer
ChartsRecharts
Statezustand
Iconslucide-react
BackendPython 3.12, FastAPI, Pydantic, SQLAlchemy, Alembic, httpx, scikit-learn (experimental analytics), Anthropic SDK (assistant demo)
DatabaseSQLite (default), PostgreSQL 17 (Docker Compose)
Testsvitest (web), pytest (backend)
Lintoxlint
DocumentationVitePress (this portal)

Data flow ​

Details of the clock and publishing model: Engine and simulation.

Performance decisions ​

DecisionEffect
3D atlas as one compressed GLB per anatomical system, loaded on demand4.64 MB in total; the default view downloads about 3.0 MB and the largest file (muscles) only when needed
One mesh per structure, shared materials and uniformsSelection, alerts and hover change materials on events; per frame work is a few uniform writes
Narrow store selectors and slice versioningA 250 ms publication does not re-render the whole app
The 3D canvas reads live vitals without subscribingHeart and breathing animation run every frame with no React re-render
Lazy chunksThe anatomy viewer, the Data and model dialog and the OSDR datasets are loaded with dynamic import()
Bounded historiesLast 2 h at 1 min, 5 days at 5 min; daily metrics keep 40 points; alerts, audit, comms and check-ins have caps
Streaming detectionO(1) per sample per metric; baselines recomputed every 24 accepted samples

Observed by the team on one development laptop with the atlas viewer: 55 to 57 fps in the Ground view at 1440x900, and the atlas on screen 2.4 to 3.6 s after navigation with a warm cache. These are informal observations, not a benchmark (Results).

Next steps ​

Astronaut Health Intelligence Platform. Decision support only: not a diagnosis and not a medical device. Device data is simulated.