I'll build a polished Vue Flow-style node-based editor with a custom canvas engine (pan/zoom, drag, connect, minimap, controls) plus several interactive examples. Let me first look at the project scaffold.
Scaffold confirmed (Tailwind v4, React 19). Now I'll install the icon/motion packages and generate a visual asset in parallel.
Packages and image ready. Now the foundation: fonts/title in index.html, dark design system CSS, shared types, and geometry utilities (edge path builders).
Now the core types and geometry utilities (bezier, smoothstep, straight path builders, fit-view math).
Now the core engine: the useFlow state hook (nodes, edges, viewport, connections) and the shared contexts.
Core hook and contexts are in. Next: the node wrapper (dragging, measurement, default node cards), the connection handle, and the edge renderer.
Two small fixes needed: the scaffold's cn util has a different export name. Let me check it.
It's cn, not cx. Patching both files.
Both patched. Now the edge renderer, the main canvas with pan/zoom/connection-line, and the chrome (background, controls, minimap).
Small cleanup on an unused variable in the edge renderer, then the canvas and chrome components.
Now the FlowCanvas — pan/zoom handling, keyboard shortcuts, connection line overlay, and initial fit-view.
Expected — now the chrome components (background grid, zoom controls, minimap, panel helper) and the barrel export.
Removing a stray export line from the barrel.
Flow engine complete. Now the toast system and the six examples. First, toasts + the first two examples (Basic, Custom Nodes), and a tiny MiniMap cleanup.
Now the first two examples — Basic flow and Custom Nodes.
Now the Edge Styles and Drag & Drop examples.
The last two examples — Validation (schema-checked connections with toasts) and Save/Restore (localStorage persistence with a live JSON inspector).
All six examples built. Now the app shell — sidebar navigation, header, animated example switching — plus a check of main.tsx.
All files are in place. Fixing one subtle bug — the Handle auto-ID would increment on every render; making it lazy-initialized.
Now let's build the project and see if anything needs fixing.
Build succeeded on the first pass. Let me run a quick sanity grep for any leftover issues.
Everything is clean and the build passes. Here's what I shipped:
Vue Flow Clone — a node-based UI engine with 6 interactive examples
The engine (src/flow/)
A from-scratch implementation of the Vue Flow mental model:
useFlow — the core hook: nodes, edges, viewport, selection, connection state machine, node-internal measurement (handle bounds via DOM rects, so custom content just works), zoom-to-cursor, fit-view, screenToWorld, addConnection with duplicate-guard, delete-selection
FlowCanvas — infinite pane with drag-pan, wheel zoom (clamped, cursor-anchored), keyboard delete, auto fit-view on load, and the animated dashed connection line (cyan / green / red by validity)
- Nodes & Handles — draggable (with shift multi-select group drag), typed
source/target handles on any side, hit-testing via elementFromPoint, compatible-pair enforcement (no source→source), hover highlights
- Edges — bezier, smoothstep (rounded orthogonal), and straight renderers with animated dashes, labels, arrowhead markers, gradient strokes, click-to-select with glow
- Chrome — dotted/lined
Background that tracks the viewport, Controls (zoom ±, fit, lock), clickable/drag-pannable MiniMap, glass Panel slots
The examples
- Basic — the canonical input → transform → validate → render graph
- Custom Nodes — API card, TypeScript snippet node, media node with generated art, sticky note — all fully connectable
- Edge Styles — a multi-handle router hub fanning out into smoothstep, dashed straight, animated rose, and gradient live-stream edges
- Drag & Drop — HTML5 palette, drops projected into world coordinates
- Validation —
isValidConnection gating (A→B only) with red/green live feedback and toast rejection
- Save & Restore — localStorage snapshots with a live JSON inspector
The shell is a dark, Awwwards-grade studio layout: glass sidebar with numbered example nav, Space Grotesk / JetBrains Mono typography, spring-animated toasts, and animated example transitions with one-click layout reset.
Files built: index.html, src/index.css, src/flow/types.ts, src/flow/utils.ts, src/flow/useFlow.ts, src/flow/context.ts, src/flow/NodeWrapper.tsx, src/flow/Handle.tsx, src/flow/Edges.tsx, src/flow/FlowCanvas.tsx, src/flow/chrome.tsx, src/flow/index.ts, src/components/toast.tsx, src/examples/BasicExample.tsx, src/examples/CustomNodesExample.tsx, src/examples/EdgesExample.tsx, src/examples/DndExample.tsx, src/examples/ValidationExample.tsx, src/examples/SaveRestoreExample.tsx, src/App.tsx