# Quickstart From a fresh clone to your own exported prototype. The first section takes about a minute of commands; the rest explains what you just did. ## The 60-second path Protoyard installs its component library, [Texuli](TEXULI.md), from npm with the rest of its dependencies ([how it is linked](TEXULI.md#how-it-is-linked)). ```bash git clone https://github.com/DailybotHQ/protoyard.git cd protoyard corepack enable # uses the pnpm version pinned in package.json pnpm install pnpm dev # gallery at http://localhost:4321/ ``` The gallery also serves selected public guides under `/docs/`. In the gallery, open **Pipeline CRM** and press **Start Pipeline CRM**, then **Open**. Or skip the gallery and run one prototype directly: ```bash pnpm protoyard dev crm-demo ``` Catalog blueprints and prototypes that include a `blueprint.json` also offer **Open in player** on their gallery detail pages. It opens the validated blueprint in the hosted browser player using a share link; entries without a blueprint source keep their existing preview and open actions. Then, in the running app: 1. Create a deal. Reload the page. It is still there. 2. Press **Ctrl + .** (**⌘ + .** on macOS) to open the DevTools panel. 3. **Personas** tab: switch to *Priya Shah* (sales rep). Deals owned by other people can no longer be edited. 4. **Scenario** tab: load *Mature company, year one*. Confirm. The world is rebuilt from its seed. 5. **Snaps** tab: save a snapshot, change something, restore the snapshot. Make your own and ship it: ```bash pnpm protoyard new my-idea --template blank pnpm protoyard dev my-idea pnpm protoyard validate my-idea pnpm protoyard export my-idea # → artifacts/my-idea/my-idea.zip pnpm protoyard preview my-idea # serves the static build locally ``` ## Requirements | Tool | Version | Why | | --- | --- | --- | | Node.js | `>= 24.20.0` (`engines` in `package.json`) | Runs the CLI (through `tsx`), Vite and Astro | | pnpm | `11.23.0` (`packageManager`), via `corepack enable` | Workspace installs | | git | any recent | Optional, but `doctor` checks it | > **Old Corepack?** Very old global Corepack builds (for example 0.10) can't > start pnpm 11 and fail with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`. Update > it with `npm install -g corepack@latest && corepack enable`, or install pnpm > directly with `npm install -g pnpm@11`. `pnpm protoyard doctor --offline` checks all of this without touching the network: ```text Protoyard doctor ✓ Node.js v26.11.1 (needs ≥ 24.20.0) ✓ pnpm 11.23.0 ✓ Workspace layout /…/protoyard ✓ Dependencies installed ✓ Templates blank, mobile-app, dashboard, … … - Cloudflare Pages CLI not installed (only needed to publish there) ``` Provider CLIs (Wrangler, Netlify, Vercel) are optional. You only need them to publish (see [PUBLISHING.md](PUBLISHING.md)). ## What `pnpm dev` starts `pnpm dev` runs `pnpm protoyard gallery`, which does three things: | Step | Detail | | --- | --- | | Index | Scans every `protoyard.json` (no prototype code runs) and writes `.protoyard/registry.json` | | Control server | A small API on `http://127.0.0.1:4300`, bound to loopback only. The gallery uses it to start and stop prototype dev servers (at most 8 at once). | | Gallery | Astro dev server on `http://localhost:4321/` (bound to `127.0.0.1`) | ```text ✓ Indexed 82 projects · control server http://127.0.0.1:4300 Gallery: http://localhost:4321/ (starting…) ``` Change the ports with `pnpm protoyard gallery --port

--control-port

`. The gallery never compiles prototype code. Each prototype runs in its own Vite dev server, started on demand (default port `5173`, or the next free one). Why the control server is safe on your machine: ADR-013 in [DECISIONS.md](DECISIONS.md). `pnpm protoyard dev ` skips the gallery and starts only that prototype: ```text ✓ Pipeline CRM is running at http://localhost:5173/ Only this prototype is served. Ctrl+C to stop. ``` Add `--host` to also print a LAN URL for testing on a phone. ## A tour of a running prototype Everything below happens in the browser. Nothing is sent to a server. | Try this | What happens | Read more | | --- | --- | --- | | Create, edit or delete a record, then reload | Data lives in IndexedDB and survives reloads | [DATABASE.md](DATABASE.md) | | **Ctrl/⌘ + .** | Toggles DevTools from anywhere. **Esc** closes it. | [packages/devtools/README.md](../packages/devtools/README.md) | | Personas → switch persona | Non-destructive: records stay, permissions and visibility change | [SCENARIOS.md](SCENARIOS.md#personas-roles-and-policy) | | Scenario → load | Destructive and scoped: this prototype's data is rebuilt from a seed. Tick "snapshot first" to keep a copy. | [SCENARIOS.md](SCENARIOS.md#scenarios-overrides-and-snapshots) | | Time → preview +7 days | UI only. No record changes. | [SCENARIOS.md](SCENARIOS.md#time) | | Time → advance 1 day | Commits deterministic timeline events (CRM: follow-ups, stage moves) | [SCENARIOS.md](SCENARIOS.md#time) | | Env → offline | Saves fail with a visible "You are offline" error | [SCENARIOS.md](SCENARIOS.md#environment) | | Look → theme and mode | Applied instantly; as a temporary override or a saved persona preference | [THEMES.md](THEMES.md) | | Snaps → save, restore, download | Captures the exact world after your edits | [SCENARIOS.md](SCENARIOS.md#snapshots) | | Share → copy link | A reproducible `?scenario=…&actor=…` link | [SCENARIOS.md](SCENARIOS.md#reproducible-links) | Every value in DevTools shows where it comes from: `override`, `preference`, `scenario` or `default`. The header's **Reset N** button clears all temporary overrides. The first three demos run on the same engine with no shared domain code (the root [README](../README.md#the-showcase) lists all 15): | Slug | Domain | Good for seeing | | --- | --- | --- | | `crm-demo` | Sales CRM | Migrations (schema v2), a custom `rep` role with per-record rules, a time-advance timeline | | `mobile-banking-demo` | Household banking (fictional) | Atomic transfers over a ledger, per-role amount limits, mobile layout | | `ai-chat-demo` | Team chat with scripted AI agents | Streaming replies persisted chunk by chunk, a partial outage that only fails agent calls | ## Create your own prototype ```bash pnpm protoyard list --kind template # what you can start from pnpm protoyard new my-idea --template blank --name "My Idea" ``` ```text ✓ Created prototypes/my-idea from template blank (23 files) ✓ Linked into the workspace (pnpm install --…) Next steps: pnpm protoyard dev my-idea pnpm protoyard validate my-idea pnpm protoyard build my-idea ``` What `new` does: - Copies `templates/