# Build a Nerd Out app

You are building a small web app for a person who may not be a developer. It runs in a sandboxed frame on nerdout.com at its own address, saves data through the `window.nerd` SDK, draws its interface with the `nerd.ui` kit, and is reviewed by its owner before it goes live. Sign-in, people, permissions, storage, live sync, files, reminders and outside data are the platform's job: you spend your effort on what the app is for and how it feels. You need nothing installed: every step is an HTTPS request or a file you write. Guide version 2.25.

## 1. The workflow

1. **Claim your token.** The owner gave you a one-time code like `NA-XXXXX-XXXXX`. `POST https://nerdout.com/api/apps/v1/claim` with `{"code": "...", "agent": "your name"}`. The reply has `token` (keep it private, send it as `Authorization: Bearer <token>`), `appId` and the context URL. The token lasts 30 days and cannot read anyone's data.
2. **Read the context.** `GET https://nerdout.com/api/apps/v1/apps/{appId}/context`. It contains the owner’s `request` and `notes`, `activeVersion.package`, the latest `preview` and `sampleData`, `latestDraft` and its status, and `app.dataScope` (null until first publish). Fix grouped `runtimeErrors` first. `usage` reports opens, saves, returns and top `screens` over 30 days; tabs report automatically, or call `nerd.screen(name)`. Save the token in a private file in your working directory, `nerd-app.json`: `{ "appId": "...", "token": "..." }` (keep it out of version control).
   **Remember what the owner asks for.** When the owner says something that should outlast one change (keep it to one screen, never ask for an email, a tone they like), save it at once: `POST https://nerdout.com/api/apps/v1/apps/{appId}/notes` with `{"note": "Keep it to one screen"}`; `PUT` with `{"notes": [...]}` rewrites the list. The context's `notes` has every one, whichever agent saved it: follow them on every change. The owner can edit them on their page. Never ask the owner to write rules down for you.
   **Ask what to build.** The owner gave Nerd Out nothing, not even a name. Open with only this: ask what to build, say a rough idea is plenty and detail is welcome, and say a short plan and what to decide together come next. On an existing app, ask only what to change. When they answer, send `{"stage": "planning"}` to `POST https://nerdout.com/api/apps/v1/apps/{appId}/progress`: their page moves on.
   **Say only what the owner needs.** Never report setup or your own troubles: connecting, tokens, files you saved, tools that failed, how you got around them. Keep every message short and end it with the one thing you need from them. Raise a problem only when the owner must act, and say exactly what to do.
3. **Plan with the owner, briefly.** Lead with a recommendation in everyday words: what it is for, the two or three things they can do, what it remembers, how it looks on a phone. Ask at most three short questions, each with your recommended answer, and only where the answer changes the app. Never ask about collections, fields, themes or code; decide those.
   **Say how long.** End a first plan with one line: after go, a first version usually takes about 5 to 10 minutes, and goes live when finished.
   **On go**, send `{"stage": "building", "steps": {"done": 0, "total": 6}}` there: `total` is your build's steps (2 to 12), and their page fills a box each time you send `steps` with one more done.
   **Name it and say whose data it is.** When the context's `app.named` is false, put a short name in the plan; it becomes the app's address on the first publish. When `app.dataScope` is null, choose `data.scope` and say it in one plain line the owner can correct ("everyone you invite sees the same board" or "each person keeps their own list"): `app` when people work on one thing together, `account` when each keeps their own, `device` only for no sign-in at all. Your first finished push fixes it for good (step 5). When `dataScope` is set, use it and never ask.
   **Name this chat.** If you can rename this conversation yourself, call it `{app name} • Nerd Out App Workshop` once the app has a name. If you cannot, say nothing; never ask the owner to.
   **Outside data.** If the app needs information that changes on its own (weather, rates, a public feed), use `sources` (section 3) when a public https JSON API with no key covers it, and say which one in the plan. Try it first: `POST https://nerdout.com/api/apps/v1/sources/test` with `{"url", "pick"?, "name"?}` fetches it once the way the server will and returns the JSON after `pick`, its size, and a ready `$sources` sample for your sampleData. For an API that needs a key, add `"key": { "in": "header", "name": "Authorization", "prefix": "Bearer " }` (or `{ "in": "query", "name": "apikey" }`) to the source and tell the owner to add their key on the app page, in "Keys for outside data" (under More, in the Agent row); never ask for the key, put one in a URL, or test with one (the context's `sourceKeys` says `added` or `missing`; write `$sources` from the API's documentation). Data behind a login cannot be fetched this way.
   **A person's own account elsewhere** (their repositories, their calendar, creating something there) is an integration: read https://nerdout.com/workshop/sdk/integrations.md first. You declare the operations, each person connects their own account on a Nerd Out page, and you never see a key.
4. **Start from a template and the design craft guide.** Pick the closest archetype in section 5, read it, and read https://nerdout.com/workshop/sdk/design.md before styling. Templates show the expected structure, kit usage and visual finish; adapt names, fields, theme and screens to fit rather than starting from a blank file.
5. **Show your work as you go.** Post one-line progress, `{"message": "Building the first screen"}`, with `steps` when one is done. **Push the live preview** with `POST https://nerdout.com/api/apps/v1/apps/{appId}/preview` and `{"package", "sampleData", "note"}` as soon as something renders and after every meaningful change. The package is validated like a draft; `note` is one line about what changed. When the owner asked for it, add `asked` (their words) and `kind`: `look`, `layout`, `wording`, `feature`, `behavior`, `data`, `sharing`, `bug`, or `own` when nobody asked. Say in `trouble` what the guide or kit made hard. The owner can publish any preview, so keep each push working.
   **Rough first, then finished.** Once the owner says go, push a rough preview from your template within a couple of minutes with `"inProgress": true` (templates pass the check), and keep it on every push until the version is ready to try. On a first build the owner's page shows your steps, not rough previews, and **the first push without `inProgress` and with no check errors is published**: give the owner the reply's `published.liveUrl` ("Open the live app") and `manageUrl` ("Manage the app"). Later pushes are previews the owner publishes; rough ones say unfinished. **Before changing the current preview**, post progress saying in a few words what you are changing, and again every few minutes: the page shows it until your next push, and after 10 quiet minutes says you may have stopped.
   **Every push is checked for you** (step 7): the reply carries `check: { ok, browser, findings }` (no screenshots). Fix each `error` finding and push again; the owner sees them, and a draft is refused while one remains.
6. **Validate.** `POST https://nerdout.com/api/apps/v1/validate` with `{"package": ..., "sampleData": ...}`. No token needed. Fix every error in one pass: each has a `code`, `path`, `message` and a `fix`. Repeat until `ok` is true. Fix `warnings` too: they bite later (a collection whose fields can outgrow the record limit).
7. **Check it like a person would.** `POST https://nerdout.com/api/apps/v1/check` with the same body and your token runs the app in our headless Chromium at 360, 768 and 1280 px, light and dark, with your sample data and empty, and returns `{ ok, browser, findings, screenshots, console, steps }`: script errors, sideways overflow, tap targets under 44 px, controls hidden under something fixed, unlabeled controls, accessibility violations (axe), hard-coded colors, browser storage use, and screenshots you should look at (JPEGs at 360 light, 360 dark, 1280 light and 360 empty). The check finds mechanical problems; only looking at the screenshots finds ugly ones.
   **Check every screen.** Add `steps` to walk the app the way a person would (at 360 px light with your sample data): `"steps": [{ "click": "text=New note" }, { "type": ["text=Place", "Mt. Tabor"] }, { "screenshot": "new-note" }, { "click": "text=Done" }]`. Every `screenshot` step adds a picture and runs the probes again, so sheets, forms and tabs get the same treatment. Steps can also scroll, drag, upload, go offline, fail a save and act as another member, at any width, scheme, data set and clock. Read https://nerdout.com/workshop/sdk/check.md before your first check: it has every step and the walks every app should pass (a failed save, a change from someone else, the laptop layout). `"viewer": { "readOnly": true }` checks the read-only state.
8. **Submit a draft** when the owner says it is ready, or when they are not around to publish the preview themselves. `POST https://nerdout.com/api/apps/v1/apps/{appId}/drafts` with `{"package", "summary", "verification", "sampleData", "requestId"}` (schema: https://nerdout.com/workshop/sdk/draft-schema.json), or `{"fromPreview": true, "summary", "verification", "requestId"}` to submit the live preview as it stands (a draft says it is ready, so `inProgress` does not apply). `requestId` is a UUID you make up for this submission, so a retry returns the same draft. Give the owner the reply's `previewUrl`. Submitting never publishes: the owner tries it with disposable test data, then publishes or asks for changes.
   **Changes the owner asks for in your chat** are not in the context: only their page sets `request`. For a chat request, read the context, make the change, and push the preview. Cover an open `request` too; the owner's latest word wins.
9. **Wait for the answer.** `GET https://nerdout.com/api/apps/v1/drafts/{draftId}` returns `status`: `pending`, `published`, `changes_requested` with the owner's `feedback`, or `discarded`. Poll at most once a minute, or tell the owner you are ready. On `changes_requested`, read the context again (feedback that starts "About the button ..." is the owner pointing at that element in the preview), revise, and submit a new draft; it replaces the old one.

Do not paste tokens, JSON or error codes into the chat. Tell the owner what you did and what to click. Finish with the preview link, two or three lines on what the app does and which defaults you chose, anything you could not check, and two ideas for a next version. Inviting people, who can view or edit, and export are the owner's, on their app page.

## 2. The package

A package is JSON: `{ "manifest": {...}, "files": { "index.html": "...", "app.js": "...", "style.css": "..." } }`, plus `assets` for a game's binary files (below). Schema: https://nerdout.com/workshop/sdk/schema.json.

### Manifest

| Key | Value |
| --- | --- |
| `format`, `sdk` | `2` and `"2.0"` |
| `name` | 1 to 80 characters. It becomes the app's name, and on the first publish its address. |
| `summary` | One sentence, up to 200 characters, under the title. |
| `icon` | A library icon name, e.g. `"LuNotebook"`, or uploaded artwork (`"custom:..."`, see "The app icon"). Shown on the Home Screen and in the title bar. |
| `icons` | Optional: icon names the app picks at run time, so they ship with it. |
| `theme` | The palette: one of the named palettes below. Default `harbor`. |
| `style` | Optional overrides of the palette's own style: any of `corners`, `shadow`, `font`, `borders`, `density`. |
| `accent` | Optional `"#RRGGBB"` to replace the palette's accent; it is adjusted per scheme for contrast. |
| `groupInviteMessage` | With `groupLabel`: optional invitation text, one line, 240 characters max. |
| `groupLabel` | "Group", "Household" or "Team" on an app-scope app. Owners can also enable groups in Sharing (context: `app.groupLabel`) and control public access. Group data is private. |
| `data.scope` | `"device"`, `"account"` or `"app"`: the context's `app.dataScope` when it is set, otherwise your recommendation (step 3). Fixed after the first publish. |
| `data.collections` | The kinds of records: `{ "cards": { "fields": { "title": { "type": "string", "maxLength": 200 }, "status": { "type": "select", "options": ["To do", "Doing", "Done"] } } } }`. `{}` when the app saves nothing. A collection may add `"scope": "account"` or `"app"` to differ from the app (a shared board with private per-person settings), `"space"` (below) or `"link"` (links.md). |
| `data.documents` | `true` to use `nerd.docs` (shared text). |
| `data.files` | `true` to use `nerd.files` (photos and attachments). |
| `data.comments` | `true` to use `nerd.comments` (not for device scope). |
| `permissions` | `{}` or named booleans: `openUrl` (web links), `notify` (reminder emails, except device scope), `share` (copy, share, save), `location`, `paste`, `voice` (Workshop recorder), `transcription` (transcribe English audio on this device with consent), `pointerLock` (click to capture the mouse, Escape to release), `wasm` (WebAssembly) and `workers` (workers from blob: addresses). |
| `sources` | Outside data: `{ "weather": { "url": "https://api.open-meteo.com/v1/forecast?latitude=45.5&longitude=-122.7&current=temperature_2m", "every": "1h", "pick": "current" } }`. https JSON, GET only, no login (`key` for an API key, step 3), under 256 KiB; `every` is `15m`, `1h`, `6h`, `1d`; `pick` keeps a dotted path. Up to 5. |

**Field types:** `string`, `number`, `boolean`, `date`, `datetime`, `select`, `ref`, `file`, `list`, `url`, `member`, `members`. `date` is a day (`"2026-11-07"`); `datetime` an instant (`"2026-11-07T14:30:00Z"`); `select` takes `options`; `ref` takes `collection` and holds that record's id; `file` holds an id from `nerd.files`; `number` takes `min`, `max`, `step` (with a `min`, the form adds minus and plus) and `format`: `"money"` (with `currency`), `"percent"` (0.25 is 25%) or `"rating"` (1 to `max`, default 5, as stars); `list` is an array of strings (`max` items, `maxLength` each; tags), or with `options` a multiple choice; `url` is a web address (the form adds `https://`, checks it, and gives the right keyboard); `member` holds one member's id and `members` a list of them (`max`), and the form draws a people picker for both (an assignee, who is coming). Every field takes `"optional": true`; `string` takes `maxLength` (default 2000). Names are letters, digits and underscores; `id` and `meta` are reserved.

After the first publish, a new version may **add** collections, optional fields and select options. It may never remove or retype a field, make an optional field required, shrink a limit, narrow a number's `min` and `max`, give a free-text list `options`, drop an option, point a ref elsewhere, change a scope, or turn off documents, files or comments. Saved data depends on it.

### Looks: palette and style

A look has two independent halves. The **palette** (`theme`) sets the colors in a light and a dark variant; the frame follows the viewer's system preference. The **style** sets `corners` (`square`, `slight`, `rounded`, `pill`), `shadow` (`none`, `soft`, `hard`), `font` (`sans`, `serif`, `mono`, `rounded`), `borders` (`hairline`, `bold`), `density` (`compact`, `comfortable`, `roomy`). Every palette comes with its own style, so `theme` alone gives a finished look; `style` changes any part of it ("garden" colors with `"corners": "square"`). The look also colors an installed app's icon, launch screen and shell. Catalog: https://nerdout.com/workshop/sdk/themes.json.

- `harbor`: Nerd Out's own look: warm paper, ink, deep blue in the dark. Good default for tools and lists. Style: slight, hard, sans, hairline, comfortable.
- `paper`: Quiet, editorial, serif headings. Journals, reading lists, notes, anything word-heavy. Style: square, none, serif, hairline, roomy.
- `midnight`: Dark-first with an electric violet accent. Dashboards, trackers, timers, anything glanceable. Style: rounded, soft, sans, hairline, comfortable.
- `terminal`: Monospace everything, green on black in the dark, sharp corners. Developer tools, logs, calculators. Style: square, none, mono, hairline, compact.
- `garden`: Soft greens and cream, rounded corners. Habits, plants, wellness, family planning. Style: rounded, soft, rounded, hairline, comfortable.
- `sunset`: Warm coral and gold with big rounded buttons. Social, food, travel, playful personal apps. Style: pill, hard, rounded, hairline, roomy.
- `slate`: Neutral grays with a steady blue accent, compact and businesslike. Work tools, checklists for teams, forms. Style: slight, soft, sans, hairline, compact.
- `candy`: High-contrast pink and yellow, chunky outlines, hard shadows. Games, quizzes, kids, anything that should feel fun. Style: rounded, hard, rounded, bold, comfortable.
- `lagoon`: Teal and peach, with plain grays in the dark. Notes, journals, reading lists. Style: rounded, soft, sans, hairline, comfortable.

**Pick a palette that fits the domain** (`paper` notes/recipes, `garden` habits/plants, `sunset` family/events, `harbor`/`slate` work/budgets, `midnight`/`terminal` tools/ledgers, `candy`/`studio` social/clubs; full table in `design.md`).

**The owner can restyle the app** on its page, and their choice wins over the manifest. When the context's `app.look.ownerChosen` is true, keep `theme`, `style` and `accent` as they are in the active version and never ask about colors: the owner has decided. Otherwise pick the look that fits the brief.

Variables: `--nerd-bg`, `--nerd-surface`, `--nerd-surface-subtle`, `--nerd-fg`, `--nerd-muted`, `--nerd-line`, `--nerd-hairline`, `--nerd-edge` (card borders), `--nerd-accent`, `--nerd-accent-fg`, `--nerd-accent-text`, `--nerd-accent-soft`, `--nerd-success`, `--nerd-warning`, `--nerd-warning-text`, `--nerd-danger` (plus `-soft` washes), `--nerd-shadow`, `--nerd-radius`, `--nerd-radius-control`, `--nerd-border`, `--nerd-space`, `--nerd-font`, `--nerd-font-heading`, `--nerd-mono`. Use them for every color, corner, border and gap: never hard-code one.

### The app icon

It sits on a Home Screen beside every other app, and owners ask for icon changes on their own. A library name (`"LuTent"`) is the quick start. Better: color a library icon in, draw an SVG or generate a picture, upload it, and set `icon` to the `"custom:..."` it returns. Read https://nerdout.com/workshop/sdk/icons.md first; it also covers the optional picture for link previews (`shareImage`).

### Files

- `index.html` is a **body fragment**: no `<!doctype>`, `<html>`, `<head>`, `<body>`, `<script>`, `<link>`, `<meta>`, `<iframe>`, and no `on*=` attributes. It is placed inside `<div id="nerd-app">`. Up to 256 KiB.
- `app.js` is a **classic script**: no `import`/`export`. `window.nerd` (with `nerd.ui`) exists before it runs. Plain DOM code with the kit is ideal. If you want React or another library, bundle everything into this one file as an IIFE (`esbuild src/main.tsx --bundle --format=iife --minify --outfile=app.js`); CDN scripts cannot load. Up to 1024 KiB.
- `style.css`: your styles. No `@import`, no remote `url()`. Up to 256 KiB.
- The frame has **no network**: images are `nerd.files`, `data:` URLs or inline SVG; outside data is `sources`; links go through `nerd.openUrl`.

### Assets: a game's binary files

Map tiles, sounds and WebAssembly go in `"assets": { "world/0_0.bin": { "sha256": "...", "bytes": 123 } }`, not in the three files. Upload each first: `PUT /api/apps/v1/apps/{appId}/assets/{sha256}` with the raw bytes (4 MiB a file, 1000 files and 128 MiB a version); `POST .../assets/missing` with `{ "sha256": [...] }` says which to upload. Load a file when it is needed: `await nerd.assets.load(name)` (an ArrayBuffer) or `nerd.assets.url(name)`. Handle `unavailable`: the check and some views load no files. WebAssembly and workers: nerd.d.ts.

## 3. The SDK: `window.nerd`

Types and the app-header markup contract: https://nerdout.com/workshop/sdk/nerd.d.ts. Read it before you use a helper.

```js
const ctx = await nerd.ready();  // { app, viewer: { signedIn, id, name, readOnly }, data: { scope, readOnly, writable, status }, theme, route: { query, hash }, preview, mode }
nerd.data.observe(render);       // render(snapshot) now and after every change, from anyone, anywhere
const open = await nerd.data.query("cards", { where: { status: { ne: "Done" }, due: { lte: nerd.ui.today() } }, search: "launch", order: ["-due", "title"], limit: 20 });
nerd.data.observeQuery("cards", { where: { assignee: ctx.viewer.id } }, renderMine);
const card = await nerd.data.create("cards", { title: "Ship it", status: "To do" });
await nerd.data.update("cards", card.id, { status: "Done" });
await nerd.data.remove("cards", card.id);  await nerd.data.restore("cards", card.id);  // undo, for everyone
const project = nerd.data.resolve(card, "project");             // the record a ref points at
const pos = nerd.data.between(prev?.position, next?.position);  // manual ordering
const changes = await nerd.data.history("cards", card.id);      // [{ op, values, changed, by, at }]
nerd.activity.observe(renderFeed);  // recent changes across the app
await nerd.draft.set({ title: "unfinished" });  // one unsaved form per viewer
```

- **Records** are your fields plus `id` (a UUID) and read-only `meta` (`createdAt`, `updatedAt`, `createdBy`, `updatedBy`). Snapshots list each collection oldest first; a query's `order` is `"field"`, `"-field"` (descending) or several, and records with no value for the field come last either way. Render from `observe` or `observeQuery` and never keep a copy that can go stale. Limits: 1000 records per collection, 4096 bytes per record; group fine-grained data (a month of check-ins in one record) when it will pile up.
- **Writes return the saved record** and every listener gets the new snapshot. Pass `{ requestId: nerd.uuid() }` and reuse it to retry an uncertain save; the same request applies once.
- **Errors** are `Error`s with a `code`: `invalid_record`, `record_missing`, `storage_full`, `read_only` (this person may look but not change), `offline`, `unavailable`, `timeout`, `busy`, `too_large`, `permission_denied`, `invalid_url`, `invalid_argument`. Keep the person's input and say what happened in plain words: `nerd.ui.explain(error)` does it for you.
- **Data scopes.** "device": this browser. "account": private across signed-in devices, browser-only when signed out. "app": shared records. The host handles sign-in and invitations; never ask for names or emails.
- **Spaces** (workspaces, teams inside one app): a `"scope": "space"` collection keeps one set per space, readable only by its members, enforced by the server. `nerd.spaces.list/observe/create({ name, members, data })/update/leave/remove`; members come from `nerd.members`. Create records with `{ space }` (later writes find it in `meta.space`); `nerd.docs.open(id, { space })` or `{ scope: "account" }` for private text. Seed previews with `"$spaces": [{ id, name, members }]` and `meta.space` on records.
- **Groups.** Use the host switcher and a compact members button. See https://nerdout.com/workshop/sdk/groups.md for layout, roles and invites.
- **People and roles.** Owners invite an Admin, a Manager, a Viewer or a Participant, who adds records to `"contribute": true` collections and changes only their own (the `signup` template). `ctx.data.writable` lists the collections this person may change; `ctx.viewer.readOnly` is true when they may change none. Hide edits that would fail with `read_only`. `nerd.members.list()`/`.observe(fn)` give `[{ id, name, role }]`; store member ids in `string` or `list` fields and show names with `nerd.ui.memberName(id)`.
- **Live by default.** `observe` and `observeQuery` call back at once with what is there now, then after every change, so render from the callback and never wait for a first event. Keep half-typed input in local state or `nerd.draft` so a remote change never wipes it. `nerd.data.status()` (and `nerd.data.observeStatus(fn)`) is `live`, `connecting`, `offline` (writes fail with `offline`) or `local` (device scope and previews); `nerd.ui.liveStatus(el)` shows it only when it matters.
- **Presence.** `nerd.presence.observe(fn)` lists who has a shared app open (`[{ id, name, state, self }]`); `nerd.presence.set({ viewing: card.id })` shares what you are looking at. `nerd.ui.presence(el)` draws the avatars.
- **Comments** (`data.comments`): `nerd.comments.list/add/remove/observe(collection, id)`; `add` takes `{ mentions: [memberId] }` and mentioned people get an email. `nerd.ui.comments(el, { collection, id })` is a complete thread.
- **Files** (`data.files`): `f = await nerd.files.upload(file)` resizes images, returns `{ id, name, mime, width, height }`; keep `f.id` in a `file` field; `nerd.files.show(img, id)` shows it (grids: add `{ width: 320, lazy: true }`); `nerd.ui.zoomable(img)` opens it full screen to zoom on a tap; `nerd.files.remove(id)`. Images, PDF, text, CSV, JSON; 10 MB each.
- **Voice capture.** Declare `data.files` and `permissions.voice`. Call `await nerd.voice.record()` from a Record button. Workshop shows its recorder with a timer, a live level meter and a Done button. The result is `{ file, durationMs }`. Save `file.id` in a file field right away and use `await nerd.files.url(file.id)` for an audio player. Short recordings are limited to three minutes and 3 MiB. A phone leaving the foreground ends the take. A failed upload offers retry or download while the sheet is open.
- **Speech to text.** Declare `permissions.transcription` and file storage for any data scope. Use `nerd.voice.record({ transcribe: true })`, save the returned file id, then await `nerd.voice.transcribe(file.id)`. The first time, the Workshop offers a 66 MB English pack (Whisper Tiny). Later transcriptions reuse the browser’s saved pack. Only the person who saved a recording can transcribe it. The device does the work, with no account or provider key required for transcription. The recording and any transcript the app saves use the app’s usual storage and sharing rules. Keep the recording playable and offer retry or manual text if the user cancels, the device is unsupported, or the model misses words. Use sample transcripts in previews and hosted checks.
- **Shared text** (`data.documents`): for prose several people edit at once. `const note = await nerd.docs.open("note:" + card.id); note.bind(textarea);` merges character by character (Yjs), caret included; `note.append("\n...")` appends cleanly; `note.observe(fn)`, `note.get()`, `note.doc`, `note.text`, `nerd.docs.Y` are also available. Keep titles/status in records and copy a short `excerpt` for search. Up to 200 docs, 1024 KiB history each.
- **Reminders** (`permissions.notify`): `nerd.notify.schedule({ key: "daily", title: "Log today's run", at: tomorrowAt8, repeat: "daily", to: "me" })` emails `"me"`, `"everyone"` or member ids (same `key` reschedules; `cancel(key)`, `list()`). Shared apps share reminders across editors; `at` is a local-time instant. Offer device notifications via `nerd.notify.push` (`status()`, `ask()` from a tap). Per-record reminders: `nerd.notify.follow({ name, collection, date, to, daysBefore, at, unless, title })`. Instant mention: `at: new Date()` with `push`, `image` and `open` (`nerd.notify.opened(fn)`).
- **Outside data** (`sources`): `nerd.sources.observe("weather", (s) => ...)` gives `{ status, data, fetchedAt, error }`, fetched on publish and schedule. Show `fetchedAt` and a calm `pending`/`error` message; always seed `$sources` in `sampleData`. **Weather:** Open-Meteo needs no key (ask for units/timezone): `https://api.open-meteo.com/v1/forecast?latitude=45.52&longitude=-122.68&current=temperature_2m,weather_code&hourly=temperature_2m,precipitation_probability,weather_code&daily=temperature_2m_max,temperature_2m_min&forecast_days=2&temperature_unit=fahrenheit&timezone=America%2FLos_Angeles`, `every: "1h"`. Map `weather_code` with `nerd.ui.wmo(code)`; read local hour strings without UTC parsing.
- **Handing things to the person** (`permissions.share`): `nerd.copy(text)` (page shows "Copied", never toast it), `nerd.share({ title, text, url })`, `nerd.download(name, data, mime)` (CSV, ICS, vCard, JSON, Markdown, text). `nerd.locate()` (`permissions.location`) and `nerd.paste()` (`permissions.paste`) prompt on a tap. Camera photos: `photo({ capture: "environment" })`.
- **Deep links (`nerd.route`).** Apps run in a sandboxed frame, so never read `window.location`. `ctx.route` and `nerd.route.get()` return `{ query, hash }` from the app's `/a/[slug]` address (`?tab=notes#item-1` -> `{ query: { tab: "notes" }, hash: "item-1" }`, without the leading `#`). `nerd.route.observe(fn)` fires once on open and on browser Back/Forward or hash edits. `nerd.route.set({ query, hash }, { push? })` (or `"?tab=notes#item-1"`) updates the address bar in place (`push: true` adds a Back entry; does not re-fire `observe`). `nerd.route.url({ query, hash })` builds a full shareable link for `nerd.copy` or `nerd.share`. Top-level `nerd.ui.tabs` reads and syncs `?tab=<id>` and `#<id>` automatically (`route: false` opts out). Reserved query keys: `open`, `made`, `source`.
- **Also:** `nerd.theme.observe(fn)` (`light`/`dark`), `nerd.openUrl(href)` (`permissions.openUrl`), `nerd.uuid()`.
- **Previews** (`ctx.preview`) run in memory from `sampleData`, plus `"$docs"`, `"$comments"`, `"$sources"` (post-`pick` JSON from `sources/test`) and `"$files": { id: { name, dataUrl } }` (all `$files` under 64 KiB). Viewer is You `00000000-0000-4000-8000-000000000001`, members Sam `...0002` and Priya `...0003`; seed `meta: { createdBy, createdAt }` for realistic activity. `status` is `local`.

## 4. The UI kit: `nerd.ui`

Every frame has a themed, accessible component kit (44 px targets, labels, focus, light/dark, live updates). CSS classes (`.n-app`, `.n-header`, `.n-hero`, `.n-panel`, `.n-stack`, `.n-row`, `.n-spread`, `.n-grid`, `.n-pair`, `.n-card`, `.n-list`/`.n-item`, `.n-table-wrap`/`.n-table`, `details.n-details`, `.n-btn`, `.n-btn-quiet`, `.n-btn-danger`, `.n-pill-btn`, `.n-icon-btn`, `.n-check-btn`, `.n-row-btn`, `.n-field`, `.n-input`, `.n-select`, `.n-textarea`, `.n-check`, `.n-switch`, `.n-chip`, `.n-pill`, `.n-callout`, `.n-badge`, `.n-avatar`, `.n-stat`, `.n-meter`, `.n-progress`, `.n-thumb`, `.n-muted`, `.n-small`, `.n-sr-only`) style plain markup; the helpers build and bind.

**Six visual craft rules:** (1) Lead with `ui.hero()`, `ui.meter()` or `ui.stats(..., { variant: "cards" })`, never a bare list. (2) Group lists in `ui.panel()` with `ui.pill()` tones. (3) At most 1 to 2 primary `.n-btn` controls visible; use `.n-btn-quiet`, `.n-pill-btn` or `.n-icon-btn` + `ui.menu()` for the rest. (4) Use `ui.icon("Lu...")`, never raw Unicode (`✎`, `🗑`, `⚙`). (5) On phones use `.n-control-bar` + `.n-chip-rail`, `.n-row-btn`, `.n-check-btn` and `ui.recordSheet()`. (6) Only `--nerd-*` tokens and `.n-*` classes (never `.nerd-*` or inline colors). Details: https://nerdout.com/workshop/sdk/design.md.

**Page layout comes from the kit: write no width media queries of your own.** Each is one column on a phone and opens up when there is room:

| Class or helper | Layout |
| --- | --- |
| `.n-cols-2`, `.n-cols-3` | Equal columns: one on a phone, two from 640 px, three from 960 px. `.n-span` crosses all columns. |
| `.n-sidebar` | Narrow column beside main from 768 px. First child for left; `data-side="end"` second for right. |
| `.n-grid` | Cards filling the row (`style="--n-min: 260px"` sets minimum width). |
| `split(el, { collection, query, row, detail })` | List beside selected record on laptop; tap opens `detail` as a sheet on phones. |
| `panes(el, { panes: [{ id, label, sidebar? }], open })` | Full-height draggable columns; sidebar slides beneath when narrow, `open(id)` pushes with back button. |
| `.n-wide` on root `.n-app` | Uses 1280 px on laptops (not 960). Only with columns or `split` on every screen. |

Spacing and type scales: `var(--n-1)`..`var(--n-8)`, `.n-tight`/`.n-loose`, `.n-h2`..`.n-caption`. For polish rules: https://nerdout.com/workshop/sdk/design.md. The check warns on custom breakpoints or many font sizes.

Tabs retain scroll; re-tap the active mobile tab to go up. Custom scrollers: see check.md.

**Motion is built in** (respects reduced motion). Add `.n-enter` on new items or `.n-flash` on saved rows; animate `opacity`/`transform` with `var(--n-fast)`, `var(--n-med)`, `var(--n-ease)`. Nothing loops or blocks content.

| Helper | What it does |
| --- | --- |
| `h(tag, attrs, ...children)`, `clear(el)` | Builds an element; strings become text (never HTML), `on*` attrs are listeners. `clear` empties one. |
| `hero(opts, ...children)`, `panel(opts, ...children)`, `pill(text, opts)`, `callout(text, opts)`, `meter(opts)` | Focal top card, tinted-header panel with count badge, semantic status pills, callout banners and live-updating (`.update()`) progress meters. |
| `empty({ icon?, title, text, action: { label, run } })` | Empty state with optional icon badge. `list` draws one from its `empty` option. |
| `list(el, { collection, query, render, empty, pageSize? })` | Live list from `observeQuery` preserving focus and unchanged rows. Give it a `<div>`. Returns `.setQuery(query)`; `pageSize: 30` adds "Show more"; `swipe: { label, run }` adds swipe-left (keep a button too). |
| `reorder(el, { collection, field?, render, empty? })` | Drag-and-arrow reorderable live list saved into a `number` field (default `position`). |
| `menu(button, [{ label, run, danger? }])`, `segmented(el, { label, options, onChange })`, `search(el, { placeholder, onInput })` | Overflow "..." menu, 2 to 4 view switch, and search box (`list.setQuery({ search })`). |
| `board(el, { collection, field, order?, card })` | Kanban columns from a `select` field; drag between columns plus a compact "..." Move menu on every card. |
| `calendar(el, { collection, field, end?, weekStart?, label?, onDay, onItem })` | Month grid over a `date` or `datetime` field (`weekStart: 1` Mon default, `0` Sun). |
| `form(collection, { values?, only?, multiline?, labels?, onSubmit })` | Manifest-driven form (pickers, selects, refs, files, tag chips, star ratings, checkboxes, multiline, email/phone/URL keyboards, plain errors). |
| `editSheet(collection, record?, { title?, only?, labels?, multiline?, values?, submitLabel?, onSave? })`, `recordSheet(collection, recordOrId, opts)` | Create/edit form sheet, or live-updating detail sheet (photo, facts, optional `comments: true`, Edit/Delete). Throw `{ field, message }` in `onSubmit` for field errors. |
| `sheet({ title, content, initialFocus? })`, `confirm(msg, { danger })`, `toast(msg, { action, timeout })` | Focus-trapped dialog (bottom sheet on phones, centered on laptops; `sheet.setTitle(text)`), confirm dialog, and auto-hiding toast (3.5 s, 7 s with action). |
| `tabs(el, [{ id, label, render }], { placement?, route?, onChange? })`, `dock(el)` | Keyboard tabs (render once on first view; `tabs.selected()`; top-level tabs auto-sync `?tab=`/`#<id>`). `placement: "bottom"` pins tabs on phones; `dock` stacks controls above them. On a laptop the kit moves bottom tabs to the top and shrinks docked bars to a corner control. |
| `quickAdd(el, { collection, placeholder, parse?, extras?, dock? })` | Type-and-Enter add bar (clears immediately, restores on error, hidden when read-only). `parse(text)` maps fields; `dock: true` pins it. |
| `facts(rows)`, `recordFacts(collection, record, { only, labels })` | Label/value pairs; `recordFacts` formats dates, member names, refs and chip lists. |
| `stats(el, [{ label, value, tone? }], { variant? })`, `section(title, { action }, ...children)` | Figure row (`variant: "cards"` for stat cards; `.update(items)`) and titled screen section. |
| `photo(el, { collection, id, field, value })` | Record photo control (Add, Change, Remove). `form` already handles `file` fields. |
| `icon(name, { size, label })`, `<span data-icon="LuPlus">` | ~38,000 icons (Lucide `Lu`, Phosphor `Pi`, Tabler `Tb`, Material `Md`, Heroicons `Hi`); `GET https://nerdout.com/api/apps/v1/icons?q=plus`. Ship only names written literally or in `manifest.icons`. |
| `wmo(code)`, `removeWithUndo(collection, id, label)` | WMO weather code as `{ label, icon, wet }`. Delete with Undo toast for everyone. |
| `chart(el, { type: "bar"|"line"|"donut"|"spark", data, horizontal? })`, `groupCount(rows, keyFn)` | Auto-resizing themed SVG charts and grouping (`horizontal: true` for ranked lists on phones). |
| `comments(el, { collection, id })`, `activity(el)`, `presence(el)` | Comment thread with mentions, activity feed, and active-viewer avatars. |
| `liveStatus(el)`, `explain(error)`, `memberName(id)`, `avatar(id, opts?)`, `formatDate`, `relativeTime`, `relativeDay`, `today()`, `onDayChange`, `formatNumber`, `formatField`, `stars`, `markdown` | Everyday formatters and helpers. Use `formatNumber`/`formatField` for money, percents, compact figures and stars (never hand-build prices). |

A `<button class="n-chip" aria-pressed="true">` is a 44 px toggle chip. Use `.n-table-wrap > table.n-table` for tables and `<details class="n-details">` for disclosures. The kit already keeps `[hidden]` hidden, so do not redefine it.

## 5. Templates

Complete apps built with the kit that pass the hosted check with no errors. `records` and `overview` are the ones to copy for multi-column screens. Start from the closest one (https://nerdout.com/workshop/sdk/templates.json lists them; each URL returns `{ package, sampleData }`):

- `list` (A list the whole household keeps together: groceries, errands, things to pick up.): Several people add to and tick off one shared list of short items, grouped into a few fixed categories. Shows app scope: one live list for every member, nerd.ui.hero with nerd.ui.meter and category nerd.ui.panel cards, nerd.ui.list per group with a where/order query, nerd.ui.quickAdd with an extra control and a parse function, with nerd.draft for half-typed text, two columns on wide screens from .n-cols-2, with no media query of its own, tactile circular .n-check-btn rows with ui.pill quantities, bulk remove with a single Undo toast (nerd.data.restore), added by, from meta.createdBy and nerd.ui.memberName, nerd.ui.editSheet with only/labels, plus delete with Undo, nerd.ui.liveStatus, nerd.ui.presence, read-only viewers. https://nerdout.com/workshop/sdk/templates/list.json
- `board` (A shared board where a team moves cards from To do to Done, assigns them and talks about each one.): Several people track the same work in stages: tasks, a pipeline, a content calendar, a hiring board, chores. Change the select options to rename or add columns. Shows data.scope "app": one set of records shared live by every member, nerd.ui.stats card summary with semantic tones and nerd.ui.pill status badges, nerd.ui.board with drag between columns, a compact move menu and a position order, nerd.ui.form with only/labels; the assignee is a member field, so the form draws the people picker, nerd.ui.sheet for a card that follows its record live through observeQuery, nerd.ui.comments with mentions (data.comments), nerd.ui.removeWithUndo, nerd.ui.toast, nerd.ui.tabs with nerd.ui.activity and a custom describe(), nerd.ui.presence and nerd.ui.liveStatus in the header, read-only viewers (ctx.data.readOnly): no add, edit, delete or move, stopping a tab's live query before the next tab renders. https://nerdout.com/workshop/sdk/templates/board.json
- `tracker` (A personal tracker: a few things you want to do every day, a quick check-in, streaks and a two-week chart.): One person logs a number or a yes/no every day and wants to see how it is going: habits, water, reading, workouts, practice minutes, mood scores. Each person keeps their own. Shows data.scope "account": each person's own records, live on all their devices, a ref field (entries.habit -> habits) and a date field keyed on nerd.ui.today(), nerd.ui.hero with nerd.ui.meter, streak nerd.ui.pill badges, and nerd.ui.stats cards, numbers derived from the snapshot: totals, streaks, averages, keyed card rendering that keeps a half-typed number when data changes, nerd.ui.chart (bar) for the last 14 days with an accessible label, nerd.ui.form in nerd.ui.sheet with labels and a custom validation message, nerd.ui.list with edit and nerd.ui.removeWithUndo, permissions.notify: a daily reminder with .n-switch, nerd.notify.schedule/cancel/list and a stable key, nerd.ui.tabs that stop the previous tab's live query. https://nerdout.com/workshop/sdk/templates/tracker.json
- `journal` (A private journal: a few lines a day, with a mood and tags, found again by search or on a calendar.): One person writes longer text that belongs to a day or a thing: a diary, meeting notes, a reading log, a garden log, a gratitude journal. Each person keeps their own. Shows data.scope "account": each person's own records, live on all their devices, data.documents: long text as a document ("entry:" + id) bound to a textarea with .bind(), creating a record with a known id (nerd.uuid()) so its document can open before the first save, record fields that save on change and follow other devices without overwriting what you are typing, nerd.ui.list with an observeQuery search and two empty states, nerd.ui.calendar keyed on a date field with onItem and onDay, nerd.ui.sheet, nerd.ui.removeWithUndo, nerd.ui.tabs that stop the previous view, $docs in sampleData to seed document text. https://nerdout.com/workshop/sdk/templates/journal.json
- `calendar` (A calendar a club, team or family shares: who is playing where, and when.): People plan dated events together and want a month view, a what's-next list, reminders by email, or outside data like the weather beside each day. Shows app scope with datetime fields, nerd.ui.tabs between an Upcoming nerd.ui.list and a nerd.ui.calendar month grid, nerd.ui.panel for the 7-day forecast and nerd.ui.pill event kind tags, nerd.ui.editSheet with labels and pre-filled values, including a file field, nerd.files.show for photos (data.files), nerd.notify.schedule / cancel / list with a stable key (permissions.notify), manifest.sources + nerd.sources.observe for a server-fetched forecast, custom remove with Undo that also restores the reminder, read-only viewers. https://nerdout.com/workshop/sdk/templates/calendar.json
- `directory` (A directory of people: who they are, what team they're on, how to reach them.): The app is a searchable set of profiles or cards (people, places, suppliers) grouped by a second collection. Shows two collections linked with a ref field, read back with nerd.data.resolve, nerd.data.observeQuery with search and where, re-subscribed when filters change, a card grid built with nerd.ui.h, .n-grid and nerd.ui.empty for no results, photo upload in nerd.ui.editSheet and nerd.files.show, with initials as the fallback, list fields (skills) as chips, a detail sheet with nerd.ui.sheet and nerd.ui.facts, removal with nerd.ui.removeWithUndo, a second collection managed in a sheet with nerd.ui.list and nerd.ui.form, unsubscribed on close, read-only viewers. https://nerdout.com/workshop/sdk/templates/directory.json
- `records` (A list beside the selected record: pick one on the left, read and edit it on the right.): People look things up one at a time and each record has more detail than fits in a row (clients, properties, equipment, cases, recipes). Shows nerd.ui.split: a list beside its detail on a laptop, the same detail as a sheet on a phone, a record's details from nerd.ui.recordFacts (dates, lists and members formatted for you), search with split.setQuery and an empty state for no matches, deep links via nerd.route (?client=<id> and ?q=<search>), nerd.ui.section, nerd.ui.editSheet with multiline, removal with nerd.ui.removeWithUndo, .n-wide to use a laptop's width, read-only viewers. https://nerdout.com/workshop/sdk/templates/records.json
- `overview` (An overview: the numbers, what needs attention now, and what changed.): The owner wants one screen that sums up their records (jobs, orders, leads, requests): totals, what is late or due, a chart, recent changes. Shows a figures row with nerd.ui.stats, three responsive columns from .n-cols-3 and a main column with a sidebar from .n-sidebar, with no media query of its own, .n-wide to use a laptop's width, nerd.ui.section for each titled part, three nerd.ui.list views of one collection with where and order, a record's details from nerd.ui.recordFacts in a sheet, nerd.ui.chart with nerd.ui.groupCount, and nerd.ui.activity, a member field with nerd.ui.avatar. https://nerdout.com/workshop/sdk/templates/overview.json
- `signup` (A sign-up sheet: what is needed, and who has put their name down.): People put their own name on a shared sheet (a potluck, volunteer shifts) and nobody may change anyone else's line. Shows "contribute": true on one collection, so Participants add their own records there and change only those, ctx.data.writable and ctx.data.ownOnly to tell an organizer from a Participant, nerd.data.canChange before offering Change or Take it off, a live nerd.ui.list per slot, with a count and All taken worked out from the snapshot, one header button that changes with the person, checking it as "viewer": { "participant": true }. https://nerdout.com/workshop/sdk/templates/signup.json
- `connected` (A list from a service each person signs in to): The app shows or changes a person's own things at another service (their repositories, calendar, tasks, files). Read /workshop/sdk/integrations.md with it. Shows manifest.integrations, nerd.integrations.call, ui.connect, what was fetched kept in records, a confirmed write, sampleData.$integrations. https://nerdout.com/workshop/sdk/templates/connected.json

## 6. The quality bar

An app is done when all of these are true. Say in `verification` which you checked and how (the check endpoint covers most of them).

- **Works at a phone width first** (360 px), then uses the room at 768 and 1280 px. Nothing overflows sideways. Tap targets are at least 44 px in both directions.
- **Feels like an app, not a page.** The things people tap most sit at the bottom on a phone (`tabs` with `placement: "bottom"`, `dock`). Details open in sheets, which the back button closes. Your own header is the app's title: when someone installs the app there is nothing above it, so give it a real heading and put status in the subtitle, not a second title. Lists update in place; nothing reloads. Never use `env(safe-area-inset-*)`: the platform does that.
- **Starts useful.** With no records it shows a clear empty state that says what to do first. With `sampleData` it looks like a real, lived-in app. Never show "Loading..." text.
- **Saves correctly.** Every change goes through `nerd.data`, `nerd.docs` or `nerd.files`, never browser storage. Unfinished input lives in local state or `nerd.draft`. Save failures keep the input and explain in plain words: run a `fail` step on your main form and look.
- **Stays right when data changes under it**, and shows who did what where it helps (shared apps): run a `remote` step with a sheet open and look.
- **Respects roles.** Read-only people see the data without dead edit buttons.
- **Reads well in both themes.** Only the `--nerd-*` variables for color.
- **Keyboard and screen reader friendly.** Real buttons and labels, visible focus, `aria-live` for status.
- **Complete.** No placeholder copy, no "coming soon", no dead buttons, no console errors.
- **One page.** Switch views with state or `nerd.ui.tabs`, not page navigations; use `nerd.route` for query-string and hash deep links.
- **Realistic sample data**: enough records per collection to look lived in (four to eight for most apps, more for a catalog or a pantry; the cap is 200), showing the app at its best, with the owner's domain in mind, never real personal data. Anchor sample dates to today's date when you build the sample.
- **Honest text for the owner.** `summary`: what they will see and what changed. `verification`: the checks you ran and anything you could not; claim nothing you did not run. The owner reads both, so their notes apply there too.

## 7. When the API refuses

| Code | Meaning | What to do |
| --- | --- | --- |
| `invalid_claim`, `claim_expired` | The code is wrong, used, or older than 7 days. | Ask the owner for a new code from the app's page. |
| `token_invalid` (401) | The token expired (30 days), was revoked, or is for another app. | Ask the owner for a new code. |
| `invalid_package`, `invalid_sample` | Validation failed; `errors` lists each problem with a `fix`. | Fix them all and resubmit. |
| `check_failed` | The check found errors in the draft. | Fix each item in `errors` and resubmit. |
| `breaking_schema` | The manifest removes or changes saved data's shape. | Keep what exists; add only optional things. |
| `scope_mismatch` | `data.scope` differs from the app's fixed scope. | Use the scope from the context. |
| `app_archived` | The owner archived the app. | Stop; they can unarchive it. |
| `too_large` (413) | The body is over 3 MB. | Shrink it. |
| `rate_limited` (429) | Too many requests. Limits: `claim` 10 a minute per IP; `render` 60 and `validate` 120 a minute per IP; with a token, `check` 30 per 10 minutes, `preview` 12, `context` 30 and `progress` 60 a minute, `drafts` 20 an hour, draft status 30 a minute, asset uploads 120 a minute; and 300 requests a minute per IP across the API. | Wait the seconds in the `Retry-After` header (also `retryAfter` in the body), then retry. Run `check` after a round of fixes, not after every edit. |

## 8. Endpoints

| Method and path | Auth | Body | Returns |
| --- | --- | --- | --- |
| `POST /api/apps/v1/claim` | none | `{ code, agent? }` | `{ token, appId, expiresAt, contextUrl }` |
| `GET /api/apps/v1/apps/{appId}/context` | Bearer | | the authoring context |
| `POST /api/apps/v1/apps/{appId}/progress` | Bearer | any of `{ message, stage, steps: { done, total } }` | `{ ok }` |
| `POST`, `PUT`, `GET /api/apps/v1/apps/{appId}/notes` | Bearer | `{ note }` adds one, `{ notes: [...] }` (PUT) rewrites the list | `{ notes }` |
| `POST /api/apps/v1/apps/{appId}/preview` | Bearer | `{ package, sampleData?, note?, inProgress? }` (`inProgress: true` marks a rough work in progress) | `{ preview: { revision, digest, updatedAt, inProgress, ownerUrl }, check, published?: { version, liveUrl, manageUrl } }` |
| `GET /api/apps/v1/icons?q=…` | none | | `{ icons }` names; `?names=A,B` gives their SVG |
| `POST /api/apps/v1/apps/{appId}/icon` | Bearer | `{ svg }` or `{ image }` (base64) | `{ icon }` for `manifest.icon` |
| `PUT /api/apps/v1/apps/{appId}/assets/{sha256}` | Bearer | the file's raw bytes | `{ ok, sha256, bytes }` |
| `POST /api/apps/v1/apps/{appId}/assets/missing` | Bearer | `{ sha256: [...] }` | `{ ok, missing }` |
| `POST /api/apps/v1/validate` | none | `{ package, sampleData? }` | `{ ok, errors, warnings, digest?, access? }` |
| `POST /api/apps/v1/check` | Bearer | `{ package, sampleData?, viewer?: { readOnly }, screenshots?, steps?, at?: { width, scheme, data }, route?, now?, timezone? }` | `{ ok, browser, findings, screenshots, console, steps }` |
| `POST /api/apps/v1/render` | none | `{ package, sampleData?, theme?, route?, viewer?: { readOnly } }` | standalone HTML |
| `GET /workshop/sdk/{design,integrations,check,icons,links}.md` | none | | the longer guides |
| `POST /api/apps/v1/sources/test` | none | `{ url, pick?, name? }` | `{ ok, data, bytes, limitBytes, fetchedAt, sampleData }` |
| `POST /api/apps/v1/apps/{appId}/drafts` | Bearer | `{ package, summary, verification, sampleData?, requestId? }` or `{ fromPreview: true, summary, verification, requestId? }` | `{ draft: { id, status, digest, previewUrl, statusUrl }, created }` |
| `GET /api/apps/v1/drafts/{draftId}` | Bearer | | `{ id, status, feedback, summary, previewUrl, publishedVersion }` |
| `GET /workshop/sdk/templates.json`, `/workshop/sdk/templates/{id}.json` | none | | the templates |

All bodies and replies are JSON except `render`. Base: https://nerdout.com.
