Installable PWA for browsing NASA-inspired bioscience dossiers from local JSON exports. Built with Vite, React, and a futuristic HUD treatment.
npm i
npm run build:nasa-data
npm run devnpm run build
npm run previewnpm run dev– start Vite dev servernpm run build– type-check and build production bundlenpm run preview– preview built outputnpm run make:dummy– generate dummy JSON data intopublic/datanpm run build:nasa-data– transform harvested dossiers indata/papersinto runtime JSON underpublic/data
- React Router for routing across archive and dossier views
- Zustand state store for query + filter state
- React Query for data fetching and caching
- Dexie for IndexedDB persistence, seeding
/data/index.jsonon first run - MiniSearch for client-side search + typeahead
- React Flow renders the branching document map
- Recharts provides trend telemetry visuals
- Tailwind CSS styles the classified HUD aesthetic
- vite-plugin-pwa + Workbox for installable, offline-first experience
All runtime data is static JSON under public/data. The data builders populate:
public/data/index.json– list of dossier summariespublic/data/papers/*.json– detailed dossiers matching the schema
Dexie caches the index and dossiers locally, MiniSearch indexes the cache, and Workbox caches /data/** via Stale-While-Revalidate for offline resilience.
The data/papers/ directory holds harvested NASA/Space Biology dossiers produced by scripts/pmc_ingest.py. These JSON files are treated as the raw source of truth. Run npm run build:nasa-data to enrich them with HUD-specific telemetry (confidence, access tags, entity list, citation timeline placeholders) and emit the runtime mirror under public/data.
Use scripts/pmc_ingest.py to pull the official Space Biology PMC publications into the repository. The pipeline performs two actions:
- Fetch – downloads each article listed in
resources/SB_publication_PMC.csvand caches the raw HTML atdata/raw_pmc/<PMCID>.html. - Transform – parses the cached HTML, extracts sections (abstract/methods/results/conclusion), and optionally calls an OpenAI model to infer higher-level metadata. A final dossier JSON is written to
data/papers/exp_<NNN>.json.
Basic usage:
pip install pandas requests beautifulsoup4 lxml tqdm openai # optional: openai
python scripts/pmc_ingest.py --csv resources/SB_publication_PMC.csvProvide an OPENAI_API_KEY environment variable to enable LLM-powered summarisation. Without a key the script falls back to deterministic heuristics (keyword extraction, section summaries, platform/organism detection) so that the JSON schema is still populated.
Key output locations:
data/raw_pmc/– cached raw HTML from PMC (safe to version for reproducibility).data/papers/– structured dossiers ready for ingestion by the Astro Genesis UI.
The PWA manifest is generated by vite-plugin-pwa with an InjectManifest service worker (src/sw.ts). The app shell is precached and /data/** requests use a StaleWhileRevalidate strategy.
- Keyboard focus rings across interactive components
- High-contrast monochrome palette with accent glows
- Typeahead suggestions for rapid dossier targeting
- Responsive layout tuned for desktop and tablet mission stations