Skip to content

Architecture Overview

LayerTechWhy
MonorepoNX + pnpmAffected commands, incremental builds
LanguageTypeScript strictEnforced contracts
DocsStarlight (Astro)MDX + Mermaid via remark
AppsReact + ViteFast builds, HMR, modern tooling
VizD3.js + Three.jsScientific dataviz standards
StylingDesign system (Tailwind)Centralized in @lakea/design-system
TestsVitestFast, Vite-compatible
CI/CDGitHub ActionsFree for public repos
DeployCloudflare PagesFree, edge, preview deploys
lakea/
├── packages/
│ ├── core/ # Pure logic, framework-agnostic
│ │ └── src/
│ │ ├── types/ # Galaxy, Star, Coordinates...
│ │ ├── apps/ # App registry and configuration
│ │ ├── routing/ # Cross-app link utilities
│ │ └── data-fetchers/
│ │ └── nasa/ # NASA Exoplanet Archive
│ │
│ ├── ui/ # React components
│ │ └── src/
│ │ ├── charts/
│ │ ├── controls/
│ │ └── layouts/
│ │
│ └── viz/ # D3 + Three.js helpers (planned)
├── apps/
│ ├── handbook/ # Starlight (Astro) — this site
│ ├── portal/ # React + Vite — home page
│ ├── exoplanet-catalog/ # React + Vite — starter app
│ ├── hubble-explorer/ # React + Vite — Hubble diagram (planned)
│ └── cosmic-web/ # React + Vite + Three.js — 3D universe (planned)
├── tools/
│ ├── data-pipeline/ # Fetch scripts for static JSON
│ └── edge-proxy/ # Cloudflare Worker (if needed)
└── .github/
└── workflows/
  • @lakea/core — Pure TypeScript, no framework dependencies. Contains types, data fetchers, and transforms.
  • @lakea/design-system — React components and design tokens. Only package with Tailwind.
  • @lakea/ui — React visualization components for charts. Uses design-system tokens.
  • @lakea/viz — D3 and Three.js visualization helpers. Framework-agnostic bindings. (planned)

Apps are React SPAs built with Vite. They compose components from @lakea/design-system and @lakea/ui. The handbook is the only Astro app (using Starlight theme for documentation).

  1. Build-time: Static JSON fetched and bundled for small datasets
  2. Runtime: Direct API calls for large datasets (SDSS, Gaia)
  3. Edge proxy only when CORS or auth requires it