No external API. No latency.
All diagnoses, cross-parameter risk predictions, EVA decisions and smart prescriptions are produced by a deterministic rule engine that runs instantly in the browser and structured medical protocol databases. No external AI endpoint is ever contacted.
Three layers, one direction.
React + TypeScript
Mission console, 3D viewer, EEG renderers and all modules. Strict mode, zero any.
Deterministic Engine
Rule engine + inventory engine + protocol database. Version-defined, reproducible, tested.
Firebase + FaceNet
Email/password authentication is the only authorization authority; face verification is a second factor and can never bypass it.
NASA Open Source Layer
Live OSDR search API, NLSP reference layer and Spaceflight Standard Measures topic mapping. Hybrid cache with staleness indicator; a provenance label is mandatory on every record. If there is no connection it reads from the cache and is marked "cached".
PWA + Offline
Runs with zero connectivity thanks to a service worker and local cache. Emergency protocols are embedded in advance.
Four cross rules, open triggers.
Rules evaluate variable combinations, not a single threshold. Every output contains the severity, a physiological explanation, the linked 3D target and a step-by-step action plan.
When Theta waves rise while decision-making and sleep quality drop, a "Micro-Sleep Onset and Cognitive Decision Blindness" diagnosis is produced; an immediate EVA abort is recommended.
Theta > 65%Decision Making < 65Sleep Quality < 60When intracranial pressure rises while focus level drops, a "SANS Ocular Pressure Warning" is produced; portable ocular ultrasound and the LBNP protocol are recommended.
Intracranial Pressure > 70Focus Level < 65%When the cosmic radiation threshold is exceeded while immune resilience drops, an "Acute Ionizing Radiation and Immune Suppression" diagnosis is produced; shelter and antioxidant countermeasures are recommended.
Cosmic Radiation > 75 mSvImmune Resilience < 60%When HRV drops while mental stress is high, an "Autonomic System Overload" warning is produced; the guided 4-7-8 vagal breathing protocol kicks in.
HRV < 35 msMental Stress > 75%When stock runs out,
you are not left stranded.
The medical bay inventory is monitored live. When a diagnosis is produced, the engine first checks the primary drug: if available and not degraded by radiation, it returns the dose adjusted for microgravity. If stock is zero or it has become unusable due to radiation, it automatically moves to non-pharmacological alternatives.
- Modafinil → 20 min NASA-controlled nap + 480nm blue light therapy
- Acetazolamide → LBNP suit session + sodium restriction + ocular acuity test
- Radiation countermeasure → antioxidant pack + shelter protocol
"Drug availability" never means medical authorization. The system gives no dose; it produces decision support, not a prescription.
| Modafinil | Stock: 6 · radiation status: nominal · alternative: 480nm LED + power nap |
|---|---|
| Acetazolamide | Stock: 0 · OUT · alternative: LBNP + eye exercise |
| Ibuprofen | Stock: 12 · radiation status: nominal |
| Melatonin | Stock: 4 · radiation status: DEGRADE · alternative: blackout + sound insulation |
| Countermeasure Pack | Stock: 2 · antioxidant · matched with the shelter protocol |
Two-layer identity, one authorization authority.
| Identity authority | Firebase Authentication — email + password, password reset, session persistence. The single source of authorization in the system. |
|---|---|
| Second factor | Face verification (FaceNet) — the FaceNet API runs server-side, is stored encrypted, and no raw image is kept. It can never bypass authentication; it is only a second factor. |
| Informed consent | Explicit consent, rate limiting and a deletion flow are mandatory for face enrollment. |
| Disconnected state | If there is no hosted endpoint, the app runs with an explicitly labeled on-device demo verifier. |
| Decision transparency | Recommended steps are separated into automatic alerts and steps requiring human approval. |
| Medical boundary | No dose is given, no prescription is written, no diagnosis is made. Decision-support simulation only. |
A provenance label on every record.
Uses the NASA Open Science Data Repository (OSDR), the NASA Living with a Star (NLSP) program reference layer and the Spaceflight Standard Measures topic mapping. The source is always visible.
| OSDR | Open science data records via a live search API. If there is no connection it reads from the hybrid cache and is shown with a cached label. |
|---|---|
| NLSP | Space life and safety reference layer; provides context for radiation and environment measurements. |
| Standard Measures | Module measurements are linked to standard topics through the Spaceflight Standard Measures topic mapping. |
| Provenance | Every record carries a source, type and confidence label (nominal / info / warn); data without a source is never shown. |
| Labeling | All telemetry in the app is marked SIMULATED. NASA research is shown with its source cited. |
Technologies used.
| Frontend | React 18 · TypeScript (strict) · Vite · Tailwind CSS |
|---|---|
| 3D | Three.js · @react-three/fiber · @react-three/drei — 10 .glb models, lazy-load, automatic centering |
| Animation | Framer Motion + hardware-accelerated CSS keyframes |
| Charts | Custom HTML5 Canvas EEG renderers (60fps), column charts with real data |
| Identity | Firebase Auth · face verification: Python / FastAPI FaceNet |
| Resilience | PWA · service worker · offline shell |
| Testing | Vitest (unit) · Playwright (E2E) · pytest (FaceNet) |
See the architecture live.
5 crisis scenarios, 3 communication modes and all decision outputs on a single page.