Skip to content

What is Mica?

Mica is a local-first visual designer for micro-apps: small, focused, multi-page applications such as an intake form, a profile editor, an approval step or a checklist. You compose a micro-app on a canvas, and Mica saves it as a plain JSON document built on the json-render spec. A host application then renders that document with mica/runtime and supplies whatever the document needs from the outside world — its routing, its signed-in user, its services and its data.

The Mica designer: component palette on the left, live canvas in the middle, generated property inspector on the right.

What it is Where it lives
The designer A browser app with three panes: a draggable component palette, a live canvas, and an inspector whose controls are generated from each component’s schema. It edits one document at a time, with undo/redo, a disposable preview, and JSON import/export. Hosted with this site. In the repository: the root (npm run dev).
The runtime mica/runtime, a React entry point that renders a document with no editor code, plus the host business-object contract. mica/runtime.css is its stylesheet. In the repository: src/runtime.ts, built into dist-lib/ by npm run build:lib. examples/mock-host is the reference consumer.

A Mica document is a versioned JSON envelope:

{
"envelopeVersion": 1,
"ui": { "root": "app", "elements": { "…": "…" }, "state": { "…": "…" } },
"meta": { "pack": { "id": "mica.core", "version": "1.0.0" } },
"objects": { "…": "…" },
"lifecycle": { "startup": [] }
}
  • ui is an ordinary json-render spec: a flat map of elements, each with a type, props and children, plus the document state the app starts with. Elements may also carry on (what a Button does when pressed, or an Input when a person finishes editing it) and visible (when an element shows).
  • meta.pack names the component pack the document is built with.
  • objects optionally declares the business objects the document expects a host to provide, and lifecycle.startup lists what to load when the app starts.

The document format reference covers every field. The designer never exports anything else: the page you are looking at, the selected component and drag state are editor state, not document data.

Mica is deliberately bounded. These are not available in the current version, and import refuses documents that try to use them:

  • Nested and reorderable lists: a list generated with repeat can act on a row, edit, add and remove a local list’s rows, and create, update or delete a host collection’s rows through the host, but one repeat cannot sit inside another’s template, and rows cannot be moved.
  • State watchers (watch) and slots. To act when a person changes a field, use the Input’s commit event.
  • Authentication, persistence and URL routing inside Mica. The host owns all of them; Mica is handed a page key and a set of handlers.
  • Responsive breakpoint authoring, free x/y placement, converting a document between packs, and loading third-party packs.

The limits reference lists the exact numeric limits and the messages you get when a document goes past them.