LeanUI Docs
← Open LeanUI Studio GitHub

Quick Start & Studio Tour#

Get up and running with LeanUI Studio in under 2 minutes — either directly in your browser with zero installation, or locally with full MCP, ACP v2, and optional native Lean 4 support.


Option A: Open Immediately in Your Browser (Zero Install)#

Visit https://wieslawsoltes.github.io/LeanUI/ in Chrome, Edge, Safari, or Firefox.

  • Real Lean 4 formal verification runs 100% client-side inside your browser via WebAssembly (coi-serviceworker.js enables SharedArrayBuffer automatically).
  • All 13 verified presets, 2D Graph Editor, 3D CAD Explode, 3D Isometric Orbit, Time-Travel Debugger, and HTML/React/Lean exports work out of the box.

Option B: Run Locally (Full Dev + MCP / ACP v2 / Native Lean 4)#

Requirements: Node.js 20+ and npm 10+ (native Lean 4 v4.14.0 is optional).

bash
# 1. Install workspace dependencies
npm install

# 2. Fetch client-side Lean 4 WASM Init assets (~47 MiB compressed)
npm run fetch:lean-wasm

# 3. Build all 9 packages, Studio & local Docs portal
npm run build

# 4. Start LeanUI Studio at http://localhost:5173 (with /docs, /mcp, /acp & /agent)
npm run dev

Your First 2 Minutes in LeanUI Studio#

LIVE GENERATED SVG · AUTO-UPDATED ON BUILD
Open SVG ↗
Entire LeanUI Studio Workspace — Annotated Tour of All 4 Dock Zones, Top Toolbar & Core Interactions Entire LeanUI Studio Workspace — Annotated Tour of All 4 Dock Zones, Top Toolbar & Core Interactions
Entire LeanUI Studio Workspace — Annotated Tour of All 4 Dock Zones, Top Toolbar & Core Interactions
LIVE GENERATED SVG · AUTO-UPDATED ON BUILD
Open SVG ↗
Studio Top Command Bar & 7-Mode Stage Switcher with Click & Shortcut Annotations Studio Top Command Bar & 7-Mode Stage Switcher with Click & Shortcut Annotations
Studio Top Command Bar & 7-Mode Stage Switcher with Click & Shortcut Annotations

When Studio opens, you will see three clean areas:

  1. Top Command Bar:
    • Left: Active module name (LeanUI / MetricsOverview or BoundedCounter).
    • Center: Preset selector (13 ready-made apps), + Node (all 69 node kinds), Templates, ⌘K Quick Search, Undo/Redo, Layout (5 automatic layouts), Docking Preset, Panels ▾, and Export ▾.
    • Right: λ Prove (runs real Lean 4 proofs), ● Verified (0 err) live badge, Docs (opens this guide), AAA High-Contrast toggle, Density (Normal / Compact / Touch), and Light/Dark toggle.
  2. Center Workspace & 7-Mode Stage Switcher: Switch how you view your active module or Solution at any time:
    • ◈ Graph — Visual node-and-wire editor (supports inline live app_preview & template_preview nodes).
    • ⬡ Flow — Macro architecture view wiring Views & ViewModels across your whole Solution.
    • ❖ Explode — 4-layer 3D CAD exploded model with live UI cards, BOM & AutoCAD ViewCube.
    • 🧊 3D Orbit — 3D stacked timeline of recorded state transitions with animated flow arcs.
    • ⊞ Multi — Side-by-side live Views & ViewModels running together.
    • ▶ Proto — Clickable multi-screen interactive Prototype Runner.
    • ⇄ Stages — Architectural Kanban board & workflow graph.
  3. 12 Dockable Side & Bottom Panels:
    • Left dock: Solution Explorer, Palette (drag nodes onto canvas), Inspector (edit selected node).
    • Right dock: UI Live Preview, AI/M… Agent & MCP Mission Control, Trace Timeline, Proof Visualizer, Lean / HTML / TSX live code tabs.
    • Bottom dock: Console (verification diagnostics) & Debug (breakpoints & watches).

Try this right now:

  1. Click a button inside the ▶ UI Live Preview panel on the right and watch the state update live.
  2. Click λ Prove in the topbar to mathematically prove your app's invariants in Lean 4.
  3. Click ❖ Explode in the center stage bar to inspect your app in 3D, then click the ViewCube faces (FRONT, RIGHT, TOP) to snap angles!

Explore the 15 Built-In Verified Presets#

Switch presets anytime using the Preset dropdown in the topbar or browse them in the ⊞ Solution Explorer:

PresetCategoryWhat It Demonstrates
Bounded CounterStarterBounded Nat state (0 ≤ count ≤ maxLimit), safe actions, disabled guard & Lean 4 invariant proof.
Docking IDE & Tabbed WorkbenchNavigation, Docking & Tabscommand_bar, 4-zone dock_layout, collapsible/floatable dock_panes, closable/addable tab_view (cards) & named tab_pages with formal Lean 4 bounds proofs.
Navigation Rail & Tabbed Analytics PortalNavigation & Tabbed ViewsCollapsible nav_rail sidebar, command_bar, pills tab_view + 3 tab_page views, live slider, WCAG AAA style & formal SLA invariants.
Verified Design PortalDesign & i18nWCAG AA style tokens, EN/DE/PL resource dictionary, bounded slider, accordion, and custom proof_rule.
Lean 4 Proof WorkbenchFormal MethodsCustom lean_type, lean_def, lean_tactic, and lean_theorem nodes called directly inside live UI expressions.
Templated Controls KitDesign SystemReusable control_template blueprints with Light/Dark tokens and ContentPresenter slots.
Verified Control TemplatesDesign SystemMulti-root control_templates (card, grid, semantic <button>) verified with Lean 4 control_templates_valid.
Custom Logic & FSM EngineLogic & FSMPure Lean 4 pricing functions, 3-rule validator pipeline, and 4-state state_machine stepper.
Task ManagerCollectionsTyped collection lists, filter predicates, List.length_filter_le invariant & cross-module module_ref.
Inventory & Sub-ProgramModularitySortable Data Table paired with an encapsulated nested Sub-Program module.
Cart CalculatorCommerceReactive price/quantity computeds and non-negative total invariants.
Validated FormFormsBoolean validation predicates gating form submission cleanly.
Hacker News ReaderLive APIReal Hacker News Firebase API datasource + reactive data_query search & score filter.
MS Access Orders DBRelational DBRelational customers + orders tables with Autonumber PK, verified Foreign Key, INNER JOIN & Auto-Form.
Firebase Live & Local CSVRealtime & FilesMulti-tab synced Firestore emulator (BroadcastChannel) paired with drag-and-drop CSV/JSON upload.
LIVE GENERATED SVG · AUTO-UPDATED ON BUILD
Open SVG ↗
Showcase Preset — Docking IDE & Tabbed Workbench (command_bar, dock_layout, 4 dock_panes, tab_view & tab_pages) Showcase Preset — Docking IDE & Tabbed Workbench (command_bar, dock_layout, 4 dock_panes, tab_view & tab_pages)
Showcase Preset — Docking IDE & Tabbed Workbench (command_bar, dock_layout, 4 dock_panes, tab_view & tab_pages)
LIVE GENERATED SVG · AUTO-UPDATED ON BUILD
Open SVG ↗
Showcase Preset — Navigation Rail & Tabbed Analytics Portal (collapsible nav_rail, command_bar & pill tab_view) Showcase Preset — Navigation Rail & Tabbed Analytics Portal (collapsible nav_rail, command_bar & pill tab_view)
Showcase Preset — Navigation Rail & Tabbed Analytics Portal (collapsible nav_rail, command_bar & pill tab_view)

Next Step#

Ready to build your own app from scratch? Follow our 5-minute walkthrough: Build Your First Verified App →.

Diagram Preview
Enlarged diagram