🧭 Start
Run it locally
Clone, install, start a seeded demo household, and run the checks.
Before you start
- Bun installed.
- This repo cloned, with
getmaipai/commonscloned beside it. Dependencies on@maipai/core,@maipai/specand@maipai/uiresolve to tag worktrees under../commons-tags/;bash ../commons/scripts/ensure-tag.sh <workspace> <tag>creates a missing one. - Optional: a Stack on
127.0.0.1:8770so chat and generation work. Without one, start with--no-stack.
Install and start
cd backend && bun install
cd ../frontend && bun install
cd .. && bun run devbun run dev (scripts/dev.sh start) runs the backend with bun run --hot and Vite with hot reload. No build. A frontend edit shows in about a second; a backend edit restarts the hub in one to three seconds.
- The first start seeds a demo household into
data/dev/hub: Sage (owner), Marlow (teen), Nova (child). The sign-in secret is printed bydev.sh startand works for the demo household only. bash scripts/dev.sh urlprints the address. The API port is 8800 plus a number derived from the worktree path; the app is that port plus 1000. In the main checkout the API port is 8787.bash scripts/dev.sh statuslists what runs.bash scripts/dev.sh reseedstarts the demo data fresh.- Options:
--no-stack,--stack <url>,--port <n>. bun run dev:stopstops it. It also stops after 30 idle minutes with no browser connected (MAIPAI_DEV_IDLE_MINUTES).
Do not use the installed hub's data or port for development. bun start and bun stop run a source checkout as a local app (scripts/app.sh); they are not the development loop.
Run the checks
cd backend && bun test
cd frontend && bun test
cd backend && bun run lint
cd frontend && bun run lint
cd frontend && bun run lint:ui-rulesbash scripts/check.sh --preis the cheap preflight (typechecks, UI rules, secrets scan, PII wordlist, drift checks). Plainbash scripts/check.shis the full gate and takes a machine-wide lock.--docsis for docs-only changes.MAIPAI_TEST_NO_PORTS=1 bun testskips the port probe for tests that start no server.
Land a change
Work in a worktree made by scripts/wt.sh start, commit by file name, then bash scripts/land.sh. The lander runs the static check and fast-forwards main; the watcher runs the full suite afterward. The whole path, including shipping to a live hub, is in docs/dev/delivery-pipeline.md.

