LeanUI Docs
← Open LeanUI Studio GitHub

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/


How Everything in LeanUI Connects#

Think of LeanUI as one connected workspace where every view looks at the same single source of truth:

text
  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 state or action node immediately updates Live Preview, inline canvas app_preview cards, 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 λ Prove runs the real Lean 4 kernel directly in your browser.
  • Export publication-ready diagrams: Click Export ▾ → 🖼 Export Diagram (SVG / PNG / PDF)… (or ⤓ Export in 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.
LIVE GENERATED SVG · AUTO-UPDATED ON BUILD
Open SVG ↗
Entire LeanUI Studio IDE Workspace — All 4 Dock Zones, Top Toolbar, Live Stage & Core 6-Step Interactions (auto-generated on every build) Entire LeanUI Studio IDE Workspace — All 4 Dock Zones, Top Toolbar, Live Stage & Core 6-Step Interactions (auto-generated on every build)
Entire LeanUI Studio IDE Workspace — All 4 Dock Zones, Top Toolbar, Live Stage & Core 6-Step Interactions (auto-generated on every build)
LIVE GENERATED SVG · AUTO-UPDATED ON BUILD
Open SVG ↗
Live Annotated BoundedCounter Graph — State, Action Reducer, Computed Guard, Lean 4 Invariant & Reactive View Live Annotated BoundedCounter Graph — State, Action Reducer, Computed Guard, Lean 4 Invariant & Reactive View
Live Annotated BoundedCounter Graph — State, Action Reducer, Computed Guard, Lean 4 Invariant & Reactive View

What Would You Like to Do?#

1. Start Here (New Users)#

2. Step-by-Step Usage Guides (How to Build)#

GuideWhat 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 StepGranular 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 TablesWire Hacker News / REST APIs, Firebase realtime sync, MS Access / SQL Foreign Keys & JOINs, and CSV files.
Control Templates & Design SystemCreate reusable multi-root Control Templates, Light/Dark & i18n Resource Dictionaries, and WCAG AA/AAA styles.
Multi-Screen Apps, App Flow & PrototypesConnect multiple Views & ViewModels (⬡ Flow), run ⊞ Multi side-by-side, and export clickable Prototypes (▶ Proto).
Live Preview Nodes, CAD Explode & 3D OrbitEmbed 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 AppRecord traces, scrub/fork history (⏱ Timeline), set conditional breakpoints, pick live UI elements, and export tests.

3. Advanced Topics (Deep Dives)#

GuideWhat You Will Master
Formal Verification & Lean 4 ProofsBrowser 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 v2Build with Studio's AI Agent panel, / commands, @ mentions, Gemini/Codex/Claude/CLI/ACP v2 providers, and all 16 interactive GenUI cards.
Docking Workspace, Themes & ShortcutsCustomize all 12 dockable/floatable panels, High-Contrast WCAG AAA mode, density presets, mobile mode, and keyboard shortcuts.

4. Reference & Architecture (Lookup & Scale)#

ReferenceContents
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 ReferenceMulti-target emitters, @leanui/cli flags, all 54 MCP tools, 7 resources, 6 prompts, and external IDE configs.
Architecture & Large-Scale GuidelinesCanonical multi-project Solution layering, ViewModel/View hygiene, Lean 4 proof practices, and team/agent workflows.
Diagram Preview
Enlarged diagram