Architecture overview
| Layer | Technology |
|---|---|
| Desktop shell | Tauri v2 (Rust), with the dialog, fs and store plugins |
| UI | React 18 + TypeScript, built with Vite 6 |
| Map | MapLibre GL JS with an Esri World Imagery basemap |
| State | Zustand stores |
| Styling | Tailwind CSS v4 + design tokens (apps/web/src/styles/tokens.css) |
| Motion | motion (Framer Motion), respecting reduced-motion |
| Icons | lucide-react |
| GeoTIFF reads | Pure-Rust tiff crate; no GDAL |
| Tests and lint | Vitest + Testing Library + axe-core, Biome |
| Data pipeline | Python 3.11+: rasterio, numpy, shapely, pyproj, Pillow (build time only) |
| Docs | Astro + Starlight (apps/docs) |
Repository layout
Section titled “Repository layout”.├── apps/│ ├── web/ # React frontend (pnpm package "web")│ │ ├── public/│ │ │ ├── data/ # manifest.json, tables.json, *.geojson (committed)│ │ │ ├── tiles/ # generated XYZ PNG tiles (gitignored)│ │ │ ├── styles/basemap.json│ │ │ └── images/│ │ ├── src/│ │ │ ├── app/ # App shell, ThemeProvider, entry point│ │ │ ├── features/ # one folder per UI feature│ │ │ ├── shared/ # ui primitives, types, utils│ │ │ ├── stores/ # Zustand stores│ │ │ ├── styles/ # tokens.css / tokens.ts│ │ │ └── fixtures/ # chrome-only fixtures (labels, tools, defaults)│ │ ├── tests/ # Vitest suites│ │ └── vite.config.ts│ ├── desktop/ # Tauri shell (pnpm package "desktop")│ │ └── src-tauri/ # Rust shell and commands│ └── docs/ # this documentation (Astro Starlight)├── docs/ # specs, inventory notes, screenshots├── scripts/│ ├── tiles/ # fetch, inventory, pipeline, ramps, manifest schema│ └── capture_screenshots.py├── biome.jsonc├── pnpm-workspace.yaml└── package.json # root shortcuts that forward to the packagesData flow
Section titled “Data flow”upstream GeoTIFF release ──► scripts/tiles (Python, build time) │ ┌──────────────────┴──────────────────┐ ▼ ▼ apps/web/public/tiles/**.png apps/web/public/data/manifest.json + tables.json │ │ │ datasetStore.loadManifestAndTables() │ ├─ validateManifest() │ └─ layerStore.hydrateFromManifest() ▼ │ MapLibre raster sources ◄── TileOverlay ◄────────┘ ▲ click ─► selectionStore.inspectCoordinate() ├─ Tauri: invoke("sample_layers") ─► Rust reads data/*.tif └─ browser: placeholder readings- At startup,
AppShellcallsdatasetStore.loadManifestAndTables(). It fetchesdata/manifest.jsonanddata/tables.json(from<VITE_TILE_BASE_URL>/data/first, then the bundled/data/copy), validates the manifest, and seeds the layer store. TileOverlaykeeps one MapLibre raster source and layer per visible data layer. It resolves each layer’s period for the current date and points the source at that entry’stilePath.- On a map click,
selectionStoreasks the Rust backend for real pixel values, or falls back to placeholders outside Tauri. - The right rail (legend, Current View, Location Info, Quick Stats) reads from the same stores.
Design principles
Section titled “Design principles”- The manifest is the contract. The app never guesses file names or globs directories.
- One ramp definition drives tiles and legends.
- Be honest in the UI. Snapped periods, partial coverage, failing tiles and data limits are always visible.
- No runtime GIS dependencies. All heavy geoprocessing happens at build time in Python. The app only reads PNGs, JSON and, for sampling, GeoTIFF pixels.
More detail: Frontend · Tauri backend · Testing and quality.
