Live site: https://ui.plan.ai/ · Docs: https://ui.plan.ai/docs/ · Setup: SETUP.md
Public site and documentation for ui.plan.ai — the next evolutionary step of the plan.ai/ui proof of concept, moving from a static archive into a Supabase-backed platform for agent-generated UI streams.
This repo is the static frontend: a marketing/home surface and the Starlight docs that explain the V1 platform. It does not include the Supabase project, the Agent API, or the workbench runtime — those are tracked under the V1 plan in the docs.
pnpm build emits a self-contained static dist/. No Supabase, Cloudflare, or other backend credentials are required to clone, run, build, preview, or self-host — any static host works.
- Node ≥
24.15.0(pinned in.node-version; Cloudflare Pages reads the same file). - pnpm
11.1.2, pinned viapackageManagerin the rootpackage.json. The simplest way to get the right version is Corepack:corepack enable corepack prepare pnpm@11.1.2 --activatenpmandyarnare not supported and will silently break the docs build. - Git.
git clone https://github.com/101design/ui.plan.ai.git
cd ui.plan.ai
pnpm install # one install at the root sets up both projects
pnpm dev # main app on :4321, docs on :4322/docs/Open http://localhost:4321/ for the main app and http://localhost:4322/docs/ for the docs. On a fresh clone, the docs route under the main app at :4321/docs/ 404s until pnpm build:docs has run once (it serves public/docs/, which is generated and gitignored); after that it shows whatever was last built. Use :4322/docs/ for live editing.
pnpm dev # both projects, concurrently
pnpm dev:app # main app only
pnpm dev:docs # Starlight docs only
pnpm check # astro check on both projects (pre-merge gate)
pnpm build # ordered: docs → main; produces dist/
pnpm preview # serves the merged dist/Add dependencies with pnpm add <pkg> (main app) or pnpm --filter starlight-docs add <pkg> (Starlight). Always run pnpm install from the repo root.
pnpm build produces a self-contained dist/ that any static host can serve. The main app lives at /, the docs at /docs/. There is no SSR and no server-side runtime.
- Build locally (or in your host's CI):
pnpm install pnpm build
- Upload the contents of
dist/to the host's web root. Configure:- Publish/output directory:
dist - Build command (if the host builds for you):
pnpm build - Node version: read from
.node-version(24.15.0) - Package manager: pnpm via Corepack (set
packageManagerinpackage.json, which is already there)
- Publish/output directory:
- Ensure the host honors directory-style URLs with trailing slashes: requests for
/foo/must serve/foo/index.html. Most static hosts do this by default. The build emitspage/index.htmlfiles, sotrailingSlash: 'always'is already wired in both Astro configs. - Add the equivalent of
public/_redirectsto your host so/docsand/docs/301 to/docs/start-here/welcome/. Cloudflare and Netlify read_redirectsnatively; for Nginx/Apache/CDN setups, translate the two rules inpublic/_redirects. The Starlight build also emits a meta-refresh HTML fallback at/docs/index.html, so the redirect still works if your host can't serve_redirects. - (Optional) Apply the security and caching headers in
public/_headers. Cloudflare and Netlify read it natively; other hosts need an equivalent in their own header/CDN config. - If you serve from a different origin, change
site:in bothastro.config.mjsandstarlight/astro.config.mjs(drives sitemap absolute URLs and Starlight's canonical links), then rebuild.
This is how ui.plan.ai itself is hosted. Connect the GitHub repo and set:
| Setting | Value |
|---|---|
| Production branch | main |
| Preview branch | preview |
| Build command | pnpm build |
| Build output directory | dist |
| Root directory | / |
| Node version | from .node-version (auto-detected) |
| Environment variables | none |
pnpm itself is installed by Cloudflare Pages via Corepack from packageManager in the root package.json. _headers and _redirects are read directly from dist/. Full reference (headers detail, sitemap, preview-deploy mechanics, troubleshooting): /docs/reference/cloudflare-pages/.
mainis protected. Never push to it directly. Changes ship via feature branch → PR → rebase merge tomain.previewis a disposable scratch branch wired to the Cloudflare Pages preview URL. Force-push your feature branch into it to deploy a preview:git push origin <branch>:preview --force. Never mergepreviewintomain.- Branch names:
<type>/<slug>matching Conventional Commit types (feat/,fix/,docs/, …). Each commit is Conventional Commits + apackage.jsonversion bump (rebase merge preserves every commit onmain).
There is no GitHub Actions CI on this repo. The pre-merge gate is local:
pnpm check && pnpm buildCloudflare Pages rebuilds after merge to main (production) or push to preview (preview URL) — that's the only build pipeline.
pnpm: command not found— enable Corepack:corepack enable && corepack prepare pnpm@11.1.2 --activate.npmandyarnare not supported and will silently break the docs build.Unsupported engineduring install — your Node is older than24.15.0. Install/switch via nvm, fnm, asdf, or your OS package manager; the pin lives in.node-version./docs/404s after deploy —build:docsran butpublic/docs/wasn't included indist/. Re-runpnpm buildlocally and confirmdist/docs/index.htmlexists. Most common cause: usingnpm/yarninstead ofpnpm./docs/doesn't redirect to the welcome page — your host isn't serving_redirects. Either configure the redirect in the host's native format, or rely on the meta-refresh fallback Starlight emits atdist/docs/index.html.- Pages render but internal links 404 —
site:in one of theastro.config.mjsfiles doesn't match the served origin, or your host strips trailing slashes. Fixsite:and ensure the host preserves directory URLs. - Stale assets after redeploy —
/_astro/*and/docs/_astro/*are content-hashed and immutable for one year. Hard-refresh; if the HTML still points at old hashes, the deploy didn't pick up the new build. pnpm installfails after a Node upgrade — deletenode_modulesand the lockfile-resolved cache, then reinstall:rm -rf node_modules starlight/node_modules && pnpm install. The lockfile itself stays committed.- Verifying the build with no backend —
pnpm build && pnpm previewserves the mergeddist/on:4321with no Supabase or Cloudflare connection. The whole site is static; nothing should call out beyond the configuredsite:origin.
The Starlight docs site is the canonical reference. Operational entry points:
- Cloudflare Pages configuration — project settings, Node version, build pipeline, headers, redirects, preview deploys, troubleshooting. Live:
/docs/reference/cloudflare-pages/. - Self-hosting on any static host — generic-host deploy recipe: settings, redirect/header translations for Netlify, Vercel, Nginx, Apache, CloudFront, GitHub Pages. Live:
/docs/reference/static-hosting/. - Supabase setup — project setup, env vars, auth and data assumptions, storage layout, realtime, edge functions, setup checklist. Live:
/docs/reference/supabase-setup/. - Welcome — product direction and how the docs are organized.
- Platform architecture — the Supabase / Cloudflare / Astro split.
- Supabase SQL plan — tables, enums, RLS, indexes for V1.
- Auth & sessions — browser auth and session rules.
- API reference — Agent API surface.
- V1 plan — what ships first.
Read AGENTS.md first — it's the agent-optimized entry point (toolchain, layout table, hard rules). Then load the skill that matches your task from .agents/skills/:
| When you're about to… | Read |
|---|---|
Start a branch, open a PR, push to preview |
branch-pr-workflow |
| Run, troubleshoot, or change deps | dev-build |
| Commit (mandatory version bump) | git-commit |
| Touch routing, build pipeline, or layout | docs-architecture |
| Change build output, Node/pnpm version, headers, redirects | deployment |
Move/rename anything AGENTS.md references |
skills-maintenance |
V1 doesn't use named "council" voices — it uses concrete agent producer roles carried as metadata on submissions and events: frame producer, review assistant, media processor, and (V2) generation service. See Agent roles.
Two Astro projects in one pnpm workspace:
- Main app (
/) — served atui.plan.ai/ - Starlight docs (
starlight/) — served atui.plan.ai/docs/
The main app's astro build sweeps the docs build into a single merged dist/.