Welcome to LeanUI Documentation#
LeanUI is a visual IDE and formal verification framework for building reliable, accessible web applications. Design your app's data, state, logic, and UI visually — prove it mathematically with Lean 4, inspect it in 3D CAD Explode & 3D Orbit, debug it with time-travel replay, and export clean HTML, React TSX, and Lean 4 code.
Try it right now in your browser (zero install): https://wieslawsoltes.github.io/LeanUI/
5-Min Tutorial
Build Your First Verified App
Create state, actions, Lean 4 invariants, live UI, and export HTML & React step by step.
2D & 3D Visuals
Live Previews, CAD Explode & 3D Orbit
Embed live previews on canvas, explode layers in 3D, and navigate with the ViewCube & 3DFORBIT ring.
AI & GenUI
Build Faster with AI Agents & ACP v2
Use /commands, @mentions, 16 interactive GenUI widgets, and Gemini, Codex, Claude or ACP v2.
Reference
Browse All 75 Typed Node Kinds
Complete port-by-port reference for Lean 4 proofs, ViewModels, Data Sources, Templates & 36 UI controls.
How Everything in LeanUI Connects#
Think of LeanUI as one connected workspace where every view looks at the same single source of truth:
1. DATA & STATE 2. LOGIC & PROOFS 3. DESIGN & UI
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────────┐
│ Data Sources │────────▶│ Computed & FSM │────────▶│ Style & Resource i18n│
│ (API, DB, Files) │ │ Actions & Rules │ │ Control Templates │
│ State & Lists │◀────────│ Lean 4 Theorems │ │ 36 UI View Controls │
└──────────────────┘ └──────────────────┘ └──────────────────────┘
│ │ │
└────────────────────────────┼──────────────────────────────┘
▼
4. INSPECT, DEBUG & SHIP
┌────────────────────────────────────────────────────────────────────────────────┐
│ Live Preview Nodes · ⬡ App Flow · ❖ 3D CAD Explode · 🧊 3D Orbit Timeline │
│ ⊞ Multi-View · ▶ Clickable Prototype · ⏱ Time-Travel Debug · 🤖 AI & GenUI │
│ ⬇ Export: Standalone HTML · Connected Prototype · React TSX · Lean 4 (.lean) │
└────────────────────────────────────────────────────────────────────────────────┘- Edit once, see everywhere: Changing a
stateoractionnode immediately updates Live Preview, inline canvasapp_previewcards, 3D CAD Explode layers, 3D Orbit frames, formal proofs, and generated code. - Safety built in: Every wire is type-checked, every style is checked for WCAG contrast, every data Foreign Key is validated, and
λ Proveruns the real Lean 4 kernel directly in your browser. - Export publication-ready diagrams: Click
Export ▾ → 🖼 Export Diagram (SVG / PNG / PDF)…(or⤓ Exportin the Canvas HUD) to export Clean State, Live Current State, Timeline History, CAD Explode, 3D Orbit, or Complete Multi-Page PDF Architecture Decks with optional numbered Help Callouts.
What Would You Like to Do?#
1. Start Here (New Users)#
- Quick Start & Studio Tour — Open LeanUI Studio, learn the workspace with annotated full-app snapshots, and explore all 13 built-in verified presets.
- Every Studio Panel & Interactions (All 12 Panels) — Dedicated live annotated snapshot + exact click, drag, and keyboard shortcut playbook for every dockable panel, topbar, and export dialog.
- All 7 Stage Modes — Step-by-Step Guide — Granular visual walkthrough of
◈ Graph,⬡ Flow,❖ Explode,🧊 3D Orbit,⊞ Multi,▶ Proto,◫ Stages, and⊞ Split.
2. Step-by-Step Usage Guides (How to Build)#
| Guide | What You Will Build & Learn |
|---|---|
| Every Studio Panel & Interactions (12) | Dedicated snapshot & interaction guide for Solution, Palette, Inspector, Preview, Timeline, Debug, Proofs, Lean 4, HTML, React, Console, Agent & MCP, and Export. |
| All 7 Stage Modes — Step by Step | Granular interaction guide for every visual stage mode (Graph, Flow, Explode, 3D Orbit, Multi, Proto, Stages & Split). |
| Tutorial 1 · Server Load Monitor (Granular) | 11 progressive full-app, panel & graph snapshots from blank workspace to proved, debugged, 3D-exploded, exported app. |
| Tutorial 2 · Styled Task Tracker (Granular) | 7 progressive snapshots covering Collection, ListView/Table, WCAG AAA StyleToken Inspector, full-app Live Testing, and 3D Orbit time-travel. |
| Connect Real Data & Relational Tables | Wire Hacker News / REST APIs, Firebase realtime sync, MS Access / SQL Foreign Keys & JOINs, and CSV files. |
| Control Templates & Design System | Create reusable multi-root Control Templates, Light/Dark & i18n Resource Dictionaries, and WCAG AA/AAA styles. |
| Multi-Screen Apps, App Flow & Prototypes | Connect multiple Views & ViewModels (⬡ Flow), run ⊞ Multi side-by-side, and export clickable Prototypes (▶ Proto). |
| Live Preview Nodes, CAD Explode & 3D Orbit | Embed live app/template previews on canvas, explode layers in 3D CAD (❖ Explode), scrub 3D state stacks (🧊 3D Orbit), and master the ViewCube & 3DFORBIT ring. |
| Debug & Time-Travel Your App | Record traces, scrub/fork history (⏱ Timeline), set conditional breakpoints, pick live UI elements, and export tests. |
3. Advanced Topics (Deep Dives)#
| Guide | What You Will Master |
|---|---|
| Formal Verification & Lean 4 Proofs | Browser WASM vs Native Lake, all 14 built-in theorems, custom Lean 4 inductive/def/theorem/macro, Visual Tactic Proof Builder, and 5-mode Proof Visualizer. |
| AI Agents, 16-Widget GenUI & ACP v2 | Build with Studio's AI Agent panel, / commands, @ mentions, Gemini/Codex/Claude/CLI/ACP v2 providers, and all 16 interactive GenUI cards. |
| Docking Workspace, Themes & Shortcuts | Customize all 12 dockable/floatable panels, High-Contrast WCAG AAA mode, density presets, mobile mode, and keyboard shortcuts. |
4. Reference & Architecture (Lookup & Scale)#
| Reference | Contents |
|---|---|
| Node Catalog Reference (All 69 Node Kinds) | Complete port-by-port reference for every node kind, Visual Logic Editor (ƒ), smart wiring, and 5 auto-layouts. |
| CodeGen, CLI, 54-Tool MCP & ACP v2 Reference | Multi-target emitters, @leanui/cli flags, all 54 MCP tools, 7 resources, 6 prompts, and external IDE configs. |
| Architecture & Large-Scale Guidelines | Canonical multi-project Solution layering, ViewModel/View hygiene, Lean 4 proof practices, and team/agent workflows. |