Development environment
Prerequisites
Section titled “Prerequisites”- Node.js ≥ 22
- pnpm — this repo is pnpm-only.
npmandyarnare blocked via theenginesfield andengine-strict, so they fail. - Docker is optional (only needed if you want to validate migrations against a throwaway Postgres locally).
Install & run
Section titled “Install & run”pnpm installcp .env.example .env # set your Supabase parent project ref + access token
pnpm dev # app + docs concurrently → http://localhost:3000 / :4321pnpm dev:app # just the apppnpm dev:docs # just these docsRun database and app commands through the wrapper (see
Branching) — per-branch Supabase
branches are currently disabled (free plan), so every branch, including
main, targets the same shared movement-mapping-dev project; there’s no
per-branch isolation right now:
./scripts/supa db push # migrate the shared movement-mapping-dev project./scripts/supa pnpm dev # run the app pointed at the shared movement-mapping-dev projectRepo layout
Section titled “Repo layout”apps/app TanStack Start application (Router + Query, React 19)apps/docs this Astro Starlight sitepackages/ shared internal packages (added as they emerge)supabase/ schema migrations (app + network) and configscripts/ operational scripts (supa: branch-aware Supabase wrapper)Everyday commands
Section titled “Everyday commands”| Command | What it does |
|---|---|
pnpm check |
Biome lint + format check (the CI gate) |
pnpm format |
Biome auto-format |
pnpm typecheck |
TypeScript across workspaces |
pnpm build |
Build app + docs |
pnpm test (from apps/app) |
Server-function security-boundary tests — needs live Supabase env, so run via ./scripts/supa pnpm test on a feature branch |
pnpm db:migrate |
scripts/supa db push — migrate the shared movement-mapping-dev project (protected-branch refusal currently disabled) |
pnpm db:new <name> |
Create a new migration |
Conventions
Section titled “Conventions”Lint/format is Biome (one config at the repo root — no ESLint/Prettier).
All @tanstack/* and visualisation dependencies are exact-pinned for
supply-chain safety; don’t loosen them to ranges. See
Architecture decisions for the why.