Examples overview
Each example is a complete Mica document stored in the repository under
examples/documents/. The page renders it live through mica/runtime — the
same way a host application would — and shows its source.
examples/documents/documents.test.ts imports every one through Mica’s own
importer and checks it is stored exactly as the designer would export it, so an
example that stopped matching the code would fail the test suite.
You can also open any of them in the designer: copy the complete document from the bottom of its page, press Import and Replace document.
| Example | Pack | Shows |
|---|---|---|
| Support ticket intake | Signal | A form that creates a host record; input rules, conditional required, host field errors, stop-on-failure navigation |
| Customer profile editor | Signal | Fetch at startup, update through a draft, per-field writability, host errors, delete with confirmation |
| Purchase approval | Signal | A sign-off step: a segmented decision, a comment required only when rejecting, update then navigate |
| Order history | Signal | A read-only list: a host collection fetched at startup and refetched when an Input’s commit changes the customer, a row template, loading, error and empty states, a local list |
| Expense claims | Signal | Two host objects fetched at startup, a Withdraw button only on a pending row the host lets the person update, a per-row update with a reason and the host’s field error, the row merged in place; built by an agent |
| Ticket queue | Signal | A list filtered, searched and sorted by the host through typed fetch inputs, where the last press or commit wins; a lookup that chains two fetches in one event |
| Business loan application | Signal | A host-run workflow across two documents: host-seeded, personalised content, a page the host shows when its answer asks for more, questions the host picks from the declared set, field-level refusals, and a handoff to a separate decision document |
| Onboarding checklist | Signal | State-only interactivity: toggles, conditional sections, an all-done banner, two pages |
| Workshop sign-up | Signal | Choice controls: radio, select, checkboxes and toggles bound to state, a toggle in each row of a local list, conditions on the choices |
| Gym induction | Signal | Lesson pages and a quiz from document state alone: each Next appears only once its answer is right; built by an agent |
| Quarterly town hall | Nocturne | An editorial event page: the Nocturne vocabulary, a stateful call to action, page navigation |
The first micro-app tutorial’s finished document is
also stored there as first-app.json.
Built by the agent shows how an agent built the expense claims and gym induction examples, and other builds, step by step. Their documents are stored there too.
About the live previews
Section titled “About the live previews”The frame around each preview is host chrome, not part of the document:
- the page tabs play the role of a host’s router — the document’s own
buttons switch pages through
goToPage, and the tabs follow; - Reset starts a fresh session, as a host re-mount would;
- Actions lists the latest dispatched actions and how they settled
(
ok,failed,busy,cancelled,staleorsuperseded); - Session state shows the live store, including the
/objectsand/meta/objectsprojections the runtime maintains.
Examples with business objects run against small in-memory stand-in hosts
(site/src/components/exampleHosts.ts). Their records and rules are invented
for the example, and nothing leaves your browser.