2026-05-09_01-00-37.mp4
A live design & prototyping desktop tool. Every design is a real React app running in a sandboxed Vite dev server — not a simulation, the actual app. The design artifact and the shipped artifact are the same thing.
Plane is an Electron app that turns design into code-as-canvas. Designers manipulate components on an infinite canvas through a transparent edit overlay; every change writes back to disk as Tailwind classes via AST-aware source edits. Developers can open the same project in any editor at any time — the files are just files.
- Visual first, code always. The visual editor is primary; source is real, accessible, and never hidden.
- Disk-native. Each project is a standard React + TypeScript + Tailwind app — no proprietary format.
- Non-destructive. Every visual edit has a representation on disk.
- Speed is a feature. Sub-frame visual edits, ~300ms server respawn, 60fps canvas.
- Canvas — infinite, pannable, zoomable surface; each frame is a live iframe.
- Project — a real directory backed by a Vite dev server with HMR.
- Frame — a viewport onto a project (route + size). One project, many frames, one server.
- Edit layer — transparent overlay for select / drag / resize / inline text / gap+padding adjustment.
- Layer tree & property panel — DOM-sourced tree with reorder + reparent DnD; properties expressed as design language (color, size, spacing, weight) rather than raw classes.
- AI agent (planned) — context-aware prompt bar producing surgical diffs over component source.
- Snapshots (planned) — timeline / branching of canvas state.
plane/
├── apps/
│ └── native/ # Electron app (main + preload + renderer)
│ ├── src/main.ts # IPC, workspace persistence, source writes
│ ├── src/canvas/ # Canvas + edit overlay + frame interactions
│ ├── src/panels/ # Layer tree + property panel
│ └── resources/project-template/
│ └── src/plane-bridge.ts # In-iframe postMessage bridge
└── packages/
├── bridge/ # Typed IPC contracts + wrappers
├── logger/ # Pino-based structured logging
├── project-core/ # Shared domain types + project creation
├── server-manager/ # Vite lifecycle + compile-time Plane ID plugin
└── ui/ # Shared shadcn (base-nova) components- Project lifecycle — renderer calls
project:createover typed IPC; main copies the template, installs deps, returnsProjectMeta. Workspace state persists to~/.plane/workspaces/default/workspace.json. - Server manager + Vite plugin —
@plane/server-managerallocates ports (5200–5300) and starts a Vite server per project. The injectedplaneSourceIds()plugin rewrites JSX/TSX under/srcto add stable IDs:data-plane-id(p_*) — intrinsic DOM elementsdata-plane-cid(c_*) — component instance usagesdata-plane-tid(t_*) — template elements inside component definitions- Composite
c_xxxx.t_yyyyresolves instance-scoped template targets viaGET /__plane/resolve-id.
- Iframe bridge — every project imports
src/plane-bridge.ts, which answerspostMessagecommands for selection, tree extraction, class reads/writes, inline text editing, and rect observation, and emitsplane:hmr-updateafter Vite HMR. - Edit pipeline — overlay does immediate in-iframe preview, then commits via typed IPC (
source:update-text,source:update-class,source:reorder-children,source:move-element). Main applies AST edits withoxc-parser; HMR propagates to all frames.
- Desktop shell — Electron 41 + Electron Forge + Vite
- Renderer — React 19, TypeScript, Tailwind CSS 4
- UI — shadcn (base-nova) via
@plane/ui - State — Zustand
- Drag & drop —
@atlaskit/pragmatic-drag-and-drop - AST —
oxc-parser - Monorepo — pnpm (hoisted, required by Electron Forge) + Turborepo
- Formatting — oxfmt
pnpm install # install dependencies
pnpm run dev # start all apps via turbo
pnpm run build # build all packages
pnpm run typecheck # typecheck everything
pnpm run fmt # format with oxfmtThe dev script passes --ozone-platform=wayland to Electron for crisp rendering on Wayland. turbo.json forwards WAYLAND_DISPLAY, XDG_RUNTIME_DIR, XDG_SESSION_TYPE, and DISPLAY through globalPassThroughEnv.
The core interactive editor loop is implemented:
- multi-project canvas with pan / zoom
- frame creation, presets, route editing
- per-project Vite server orchestration
- visual element selection + inline text edit
- element resize + flex gap manipulation
- layer tree DnD reorder / reparent
- source-of-truth write-back to TSX via AST-aware utilities
- workspace persistence + restore
Planned: AI prompt bar integration, snapshot timeline / branching UX, viewport virtualization and server suspension.
- Conventional commits (
feat:,fix:,chore:,docs:,refactor:). No co-author trailers. - Use
@plane/logger— neverconsole.*. - Prefer
typeoverinterface; avoidany, non-null assertions, and nested ternaries. - See
AGENTS.mdfor the full coding-practices and architecture brief.