Status: Index / non-normative map.
AI Canvas Desktop is a local-first, scene-first mockup editor built as a standalone Electron app.
It is designed for fast visual authoring, design-system-driven editing, and local AI-assisted workflows. Projects live on your machine. Structured project state is persisted in SQLite, while assets and exported snapshots live on disk. The editor UI and the MCP bridge operate on the same document model, command system, and semantic query surface.
AI Canvas Desktop is built around a few strong ideas:
- local-first by default - projects, metadata, and assets stay on your machine
- scene-first authoring - scenes are the primary top-level content unit
- one shared document core - the UI and MCP use the same schema, commands, and semantic logic
- design-system-aware editing - variables, styles, bindings, and provenance are first-class
- desktop-native runtime - no mandatory backend, no required cloud service, no account setup
The goal is to make a powerful mockup and flow-design tool that feels strong both for direct human editing and for local AI-assisted authoring.
Experimental and actively under development.
The repository currently contains the current product and implementation documentation set that guides implementation. This README is a map, not a source-of-truth contract. See docs/README.md for the full index and the split between contract docs, guidance docs, validation policy, and release operations.
Planned and in-progress core capabilities:
- multi-scene authoring in a single project
- document-level variables and styles
- semantic bindings and resolved provenance
- deterministic, cacheable resolved render state
- local SQLite-backed project persistence
- disk-backed asset and snapshot storage
- shared command/query core
- local MCP bridge for AI-assisted inspection and mutation over localhost
- project snapshot import/export
- fixture-based validation for rendering and import/export behavior
A project is the top-level unit of storage, editing, and MCP targeting.
A project contains exactly one document in v1, local design-system data, local history metadata, and references to disk-backed assets and exported artifacts.
A document is the canvas/workspace inside a project.
When the editor window is open, opening a project opens its sole document workspace in v1.
There is no document switcher or multi-canvas project workflow in v1.
The workspace is spatial, scene-first, and document-scoped. It owns:
- scenes
- variables
- styles
- assets
- semantic authoring fields
- authored document state
- resolved render state
A scene is the primary top-level content unit.
Scenes are used for:
- mockup flows
- grouped screens
- structured design work
The design system is project-local and document-scoped.
It includes:
- variables
- styles
- semantic bindings
- provenance and usage relationships
- document-level propagation through explicit bindings
Resolved render state is split into two persisted layers:
render_style, the authoritative CSS-like render-input bag- optional
computed_layout, the last measured layout box produced by the browser-backed renderer when that cache is available
After normalization, the semantic-mapped subset of render_style is semantic-owned and recomputed from authoring state. Only non-mapped render_style properties remain raw-only. computed_layout is deterministic derived/cacheable state that can be refreshed after render and rebuilt when needed.
Editor overlays and inspector panels may also show live DOM measurement from the current renderer session. That live measurement is transient runtime state, separate from the persisted computed_layout snapshot.
The two are refreshed through separate contracts: structural normalization repairs canonical document shape for use, while commit/autosave may run a browser-backed computed-layout refresh pass before persistence.
AI Canvas Desktop includes a first-class local MCP bridge.
The MCP bridge is built on the same document schema, command system, and semantic query logic as the UI. It is not a separate model or adapter-only layer. MCP is enabled by default, runs only on localhost on a configurable port, and stays available when the editor window closes because the app remains resident in the tray.
At the product surface, MCP targets projects. In v1, each project contains exactly one document, so the active project also implies the active document.
In v1, a window-close request is intercepted before renderer teardown. If the project is dirty or an autosave is already in flight, the window stays open until a final autosave attempt succeeds or fails. A failed or timed-out final save keeps the window open and shows blocking error UI; only a successful save or an explicit discard may continue close into tray. Once the window actually closes, the renderer and its browser-backed measurement surface are torn down. MCP inspection remains available against the active project session, but mutation or browser-capture workflows require the editor window to be reopened.
- Electron for the desktop shell
- React for the editor UI
- TypeScript across the stack
- SQLite for project metadata and document persistence
- disk-backed asset storage for binary assets and exported snapshots
AI Canvas Desktop is:
- local-first
- single-user for v1
- single-window for v1
- one document per project in v1
- offline-capable for core editing
- project-library-driven
- scene-first
- design-system-aware
- autosaved by default
- MCP-capable through an optional localhost bridge
The active project is the most recently opened project and the default MCP target when a request does not explicitly identify a project.
apps/desktop
Electron app entrypoint:
main process, preload bridge, renderer bootstrap, tray lifecycle
packages/document-core
Shared document schema, structural normalization/repair,
read helpers, and the foundations future command and
semantic layers build on
packages/editor-ui
React editor surface and UI components
packages/ipc-contract
Typed IPC contracts between main, preload, and renderer
packages/mcp-bridge
Local MCP integration built on document-core
docs
Product, architecture, storage, and MCP documentation
fixtures
Renderer and import/export fixtures
This workspace is an active pnpm monorepo.
- Node.js 24+
- pnpm 10+
- a recent macOS, Windows, or Linux environment capable of running Electron
pnpm installpnpm devpnpm testpnpm lintLint a single workspace package:
pnpm --filter @ai-canvas/editor-ui lintpnpm formatCheck formatting without writing changes:
pnpm format:checkEnable the repository pre-commit hook (runs Prettier on staged files):
pnpm hooks:installpnpm buildBuild only the desktop production bundle:
pnpm build:desktopPackage unsigned macOS release artifacts locally:
pnpm dist:mac:unsignedPackage signed macOS release artifacts locally on a machine with valid Apple signing credentials available to Electron Builder:
pnpm dist:macPackage Linux release artifacts locally on a Linux machine for the current architecture:
pnpm dist:linuxPackage Linux release artifacts for a specific architecture:
pnpm dist:linux:x64
pnpm dist:linux:arm64Package Windows release artifacts locally on Windows for x64:
pnpm dist:win:x64Package signed Windows release artifacts locally on Windows after configuring Azure Artifact Signing environment variables:
$env:DESKTOP_WINDOWS_SIGN='true'
pnpm dist:win:x64Install the generated Debian package on Ubuntu or Debian:
sudo apt install ./apps/desktop/dist-electron/AI-Canvas-<version>-<arch>.debRun the AppImage directly on Linux after marking it executable:
chmod +x ./apps/desktop/dist-electron/AI-Canvas-<version>-<arch>.AppImage
./apps/desktop/dist-electron/AI-Canvas-<version>-<arch>.AppImageRun the desktop app and keep it open, then run:
pnpm --filter @ai-canvas/desktop mcp:demo-sliceExpected result:
- JSON output with
"status": "ok" - an
endpointlikehttp://127.0.0.1:9311/mcp - a
project_idanddocument_id
If that command succeeds, the local MCP bridge is reachable.
- In AI Canvas Desktop, confirm MCP status is running and note the endpoint (include
/mcp). - In Codex MCP/connectors settings, add a server using that exact endpoint.
- Verify connection in one of these ways:
- run
pnpm --filter @ai-canvas/desktop mcp:demo-sliceand confirm"status": "ok" - or, from a shell, confirm the listener exists:
lsof -nP -iTCP:9311 -sTCP:LISTENIf nothing is listening on port 9311, MCP is not running in the desktop app.
Once connected, use the live MCP docs as the operator guide: docs://overview, docs://examples/quickstart, docs://tools, and docs://troubleshooting.
Cannot find package '@tailwindcss/vite'Install dependencies:pnpm installNo electron app entry file found: .../out/main/index.jsBuild workspace packages first:pnpm build:packages, then start app again- Codex cannot connect but app appears open
Verify endpoint includes
/mcpand the app reports MCP as running
AI Canvas Desktop stores local data in an application data directory on your machine.
Typical structure:
<AppData>/AI Canvas Desktop/
app.db
assets/
exports/
imports/
logs/
recovery/
app.dbstores project records, each project's solecurrent_document_jsonin v1, asset catalog metadata, preferences, recent projects, and local history metadataassets/stores content-addressed binary asset payloadsexports/stores exported project snapshotsimports/optionally stages imported project snapshots or other source bundlesrecovery/stores recovery artifacts for crash or autosave flows
Current implementation priorities are:
- stable Electron shell and tray lifecycle
- shared document core
- local project create/open/autosave flows
- editor UI
- design-system workflows
- project snapshot import/export
- local MCP workflows
- packaging and release hardening
CIruns fast Linux validation on pull requests.CIalso runs a Windows desktop build-and-test lane.Packaging Smokeruns unsigned packaging verification on pull requests for macOS, Linux, and Windows.Release Desktoppublishes the signed macOS release stream, the Linux.deband AppImage release artifacts, and a signed Windows NSIS installer when the Windows Azure signing configuration is present in GitHub Actions.- Release versioning, artifacts, signing prerequisites, publication flow, and updater behavior are documented in docs/release-strategy.md.
This README is a map, not a source-of-truth contract. See docs/README.md for the full classification.
Contract docs:
- docs/product-stance.md
- docs/document-schema.md
- docs/document-normalization.md
- docs/command-semantics.md
- docs/command-payloads.md
- docs/rendering-behavior.md
- docs/computed-layout-refresh.md
- docs/project-snapshot-format.md
Guidance docs:
- docs/desktop-architecture.md
- docs/editor-surface-architecture.md
- docs/local-mcp.md
- docs/storage-model.md
Policy docs:
This project is not currently accepting Pull Requests from anyone who hasn't met Nick Chadwick in-person.
If you'd like to contribute to this project, come find me at a meetup in San Francisco sometime and buy me a beer!
Near-term goals:
- strong local project workflow
- scene-first editing
- stable design-system editing
- explicit semantic styling workflows
- local MCP authoring support
- reliable packaging for the first target platform
Longer-term areas of interest:
- richer import/export
- stronger recovery/versioning
- broader platform support
- better AI-assisted design workflows
Released under the terms of the GNU Affero General Public License v3.0 See LICENSE.md