# Astrolabe

A browser-based **snippet manager for [Vega-Lite](https://vega.github.io/vega-lite/)
visualizations**. Author chart specs as JSON, watch them render live, and keep a personal,
searchable library — local, offline-capable, no account.

> Astrolabe is a **spec-driven rebuild** on an architecture adapted from its sibling
> project Syto. The authoritative behavioral contract lives in [`docs/spec/`](docs/spec/).
> See [SOUL.md](SOUL.md) for the philosophy and [docs/IMPLEMENTATION-PLAN.md](docs/IMPLEMENTATION-PLAN.md)
> for the build sequence.

## Stack

Vite · TypeScript · React + Zustand · Monaco · Vega-Lite + vega-embed · IndexedDB · PWA (offline + installable).

## Develop

```bash
npm install
npm run dev        # dev server
npm run build      # typecheck + production build (+ service worker)
npm run typecheck
npm test           # Vitest
```

## What it does

- **Editor + live preview** — write Vega-Lite specs as JSON in Monaco with schema-aware
  validation and autocomplete; the chart re-renders as you type.
- **Snippet library** — save, search, tag, and organize specs. Each snippet carries a stable
  published version plus a separate editable draft, so you can tinker without losing a
  known-good copy.
- **Reusable datasets** — store data once (inline, or fetched once from a URL and snapshotted)
  and reference it by name from many snippets.
- **Chart Builder** — a no-JSON on-ramp that generates a spec from field, mark, and encoding
  choices. The JSON stays the source of truth and is always editable.
- **Theming & fonts** — custom chart themes with a visual Theme Builder, a curated font roster,
  and your own uploaded font faces.
- **Local-first** — your library lives in the browser (IndexedDB); offline-capable and installable
  (PWA), with import/export for backup and transfer. No account, no server, no AI — with no
  backend to send it to, your library stays on your device, so it's safe for confidential work
  from the first chart.

## Status

Active development, **pre-1.0** and not yet publicly released — well past the initial milestones
and usable day to day; the first public release will be `1.0.0`. Behavior is specified in
[`docs/spec/`](docs/spec/) and the architecture patterns in
[`docs/architecture/`](docs/architecture/00-overview.md).

## License

TBD.
