The Open-Source, White-Label Diagramming Engine.
Built for technical teams who need to bridge the gap between code and high-fidelity design. 100% Free & MIT Licensed.
OpenFlowKit is a professional-grade White-Label Solution for developers. Whether you're embedding a canvas into your SaaS or building your own diagramming tool, OpenFlowKit provides the performance of React Flow with a billionaire-tier designer aesthetic.
- Why OpenFlowKit?
- Key Features
- Node Types
- Export Formats
- Architecture
- Getting Started
- Extensibility & Self-Hosting
- Contributing
- License
- MIT Licensed: 100% free to use, fork, and integrate into commercial products.
- Pure White-Label: The UI dynamically absorbs YOUR brand tokens. It looks like your product, not a third-party plugin.
- Diagram-as-Code Native: Full compatibility with Mermaid.js and the OpenFlow DSL V2.
- High-Fidelity UX: Glassmorphism, smooth animations, and CAD-inspired aesthetics out of the box.
- Privacy First: Local-first architecture with optional BYOK (Bring Your Own Key) for AI features.
- AI-Powered: Generate complete diagrams from natural language using Flowpilot (Gemini integration).
Don't just embed a toolโembed your brand. Our engine generates harmonious palettes from a single primary color:
- Brand Kits: Toggle between "Wireframe", "Executive", or "Dark Mode" identities.
- Dynamic Typography: Natively supports Google Fonts integration (Inter, Roboto, Outfit, Playfair, Fira, and system fonts).
- Design System Panel: Fine-tune glassmorphism, corner radii, border weights, node padding, and edge styles via a unified settings panel.
Generate entire diagrams from a text prompt using Gemini AI (BYOK โ Bring Your Own API Key):
- Natural Language โ Diagram: Describe a workflow in plain English and get a complete flowchart.
- Privacy First: Your API key stays on your device. No server-side storage.
- OpenFlow DSL V2: AI outputs the type-safe DSL, then auto-renders it on canvas.
Generate clean, structured SVGs that behave like native Figma layers.
- Vector Fidelity: Perfect rounded corners and gradients.
- Editable Text: Labels export as text blocks, not paths.
- One-Click Copy: Paste directly into Figma with standard Cmd+V.
First-class support for Mermaid.js and the OpenFlow DSL V2.
- Mermaid Support: Flowcharts, State Diagrams, and Subgraphs.
- Live Two-Way Sync: Tweak the visual graph and watch the code update in real-time.
- Auto-Layout: Industrial-grade layout algorithms powered by ELK.js.
- OpenFlow DSL V2: A type-safe DSL with explicit node IDs, styling attributes, groups, and edge customization.
A Spotlight-style command palette for power users:
- Quick Actions: Add nodes, run auto-layout, export, toggle panels โ all without leaving the keyboard.
- Fuzzy Search: Find commands, templates, and settings instantly.
- Keyboard First: Full keyboard shortcut support (Undo, Redo, Copy, Paste, Delete, Select All, Alt+Drag to duplicate).
Step through diagram construction like a slideshow:
- Build-Order Replay: Watch nodes and edges appear in the order they were created.
- Speed Controls: Adjust playback speed or step through manually.
- Presentation Ready: Perfect for walkthroughs, demos, and documentation.
Hit the ground running with 5 production-ready templates:
- SaaS Subscription Flow
- E-commerce Fulfillment Pipeline
- AI Content Moderation System
- Smart Support Triage
- CI/CD DevOps Pipeline
Save named snapshots of your diagram at any point:
- Manual Snapshots: Save and restore any version of your work.
- Local Storage: Everything stays on your device.
Precision layout tools for polishing diagrams:
- Align: Left, center, right, top, middle, bottom.
- Distribute: Even horizontal or vertical spacing across selected nodes.
- Smart Edge Routing: Automatic path optimization to avoid node overlaps.
Leveraging the industry standard for node-based UIs, OpenFlowKit is highly performant and infinitely extensible.
OpenFlowKit supports 10+ node types out of the box:
| Node Type | Description | Shapes Available |
|---|---|---|
| Process | Standard workflow step | Rounded, Rectangle, Capsule, Circle, Ellipse, Diamond, Hexagon, Parallelogram, Cylinder |
| Decision | Branching logic (if/else) | Diamond (default), all shapes |
| Start | Flow entry point | Capsule (default), all shapes |
| End | Flow termination | Capsule (default), all shapes |
| Custom | Freestyle node | All shapes |
| Section / Group | Container for grouping related nodes | Rounded rectangle with dashed border |
| Annotation | Sticky-note style comments | Folded corner card |
| Text | Standalone text labels | No border / transparent |
| Image | Embed images into diagrams | Rounded card |
| Swimlane | Lane-based process organization | Horizontal lanes |
| Browser | Browser mockup wireframe | Chrome-style frame |
| Mobile | Mobile device wireframe | Phone-style frame |
Every standard node supports:
- 9 color themes: Slate, Blue, Emerald, Red, Amber, Violet, Pink, Yellow, Cyan
- 120+ Lucide icons or custom icon URLs
- Markdown labels with bold, italic, links, and inline code
- Font customization: Family, size, weight, and style per node (or inherited from Design System)
| Format | Type | Description |
|---|---|---|
| SVG | File download | Scalable vector graphic |
| PNG | File download | Raster image |
| JPG | File download | Compressed image |
| Figma | Clipboard copy | Editable SVG layers (paste with Cmd+V) |
| Mermaid | Clipboard copy | Mermaid.js syntax |
| PlantUML | Clipboard copy | PlantUML syntax |
| OpenFlow DSL | Clipboard copy | Type-safe DSL V2 |
| JSON | File save | Full diagram state (nodes, edges, styles) |
Built for performance and extensibility using the best modern web tech:
- Core: React Flow 11 + Vite 6
- State: Zustand for high-performance persistence.
- Language: TypeScript 5.8 for robust type safety.
- Styling: Tailwind CSS 4 + CSS Design Tokens.
OpenFlowKit/
โโโ src/
โ โโโ components/
โ โ โโโ properties/ # Property panels for Nodes, Edges, Canvas
โ โ โโโ SettingsModal/ # Brand, Privacy, Shortcuts, General settings
โ โ โโโ custom-nodes/ # Browser, Mobile, Wireframe, Icon nodes
โ โ โโโ command-bar/ # Cmd+K command palette
โ โ โโโ ui/ # Branded design system primitives
โ โ โโโ landing/ # Landing page sections
โ โ โโโ docs/ # Built-in documentation pages
โ โ โโโ FlowEditor.tsx # Main diagram orchestrator
โ โ โโโ FlowCanvas.tsx # React Flow canvas wrapper
โ โ โโโ CustomNode.tsx # Universal node renderer
โ โ โโโ CustomEdge.tsx # Styled edge renderer
โ โ โโโ TopNav.tsx # Top navigation bar
โ โ โโโ Toolbar.tsx # Left sidebar toolbar
โ โ โโโ ExportMenu.tsx # Export format picker
โ โ โโโ CommandBar.tsx # Spotlight-style command palette
โ โ โโโ PlaybackControls.tsx # Presentation mode controls
โ โ โโโ HomePage.tsx # File management & Dashboard
โ โ โโโ WelcomeModal.tsx # User onboarding
โ โโโ hooks/
โ โ โโโ useAIGeneration.ts # Flowpilot AI integration
โ โ โโโ useBrandTheme.ts # Dynamic branding injection
โ โ โโโ useDesignSystem.ts # Design system token access
โ โ โโโ useFlowHistory.ts # Undo/Redo operations
โ โ โโโ useFlowExport.ts # SVG/PNG/JPG export
โ โ โโโ usePlayback.ts # Presentation mode logic
โ โ โโโ useKeyboardShortcuts.ts # Hotkey bindings
โ โ โโโ useAutoSave.ts # Persistence & LocalStorage
โ โ โโโ useSnapshots.ts # Version history management
โ โ โโโ useClipboardOperations.ts # Copy/Paste with offset
โ โโโ lib/ # Parsers & Brand Logic
โ โ โโโ mermaidParser.ts # Mermaid.js โ nodes/edges
โ โ โโโ flowmindDSLParserV2.ts # OpenFlow DSL V2 parser
โ โ โโโ brandService.ts # Palette generation
โ โ โโโ analytics.ts # PostHog integration
โ โ โโโ types.ts # Type definitions
โ โโโ services/ # Core engines
โ โ โโโ elkLayout.ts # ELK.js auto-layout engine
โ โ โโโ figmaExportService.ts # Vector SVG for Figma
โ โ โโโ exportService.ts # Image export (PNG, JPG, SVG)
โ โ โโโ smartEdgeRouting.ts # Automatic edge path optimization
โ โ โโโ AlignDistribute.ts # Node alignment & spacing
โ โ โโโ openFlowDSLExporter.ts # Nodes/edges โ DSL V2
โ โ โโโ geminiService.ts # Gemini API client
โ โ โโโ templates.ts # 5 starter templates
โ โโโ store.ts # Global Zustand state
โ โโโ theme.ts # Color palettes & design tokens
โโโ docs/ # Documentation source files
โโโ public/ # Static assets & brand icons
โโโ index.css # Tailwind & custom stylingOpenFlowKit is designed as a Local-First application for maximum privacy and simplicity. However, it is architected to be easily extended with a backend.
The entire storage logic is isolated in src/hooks/useSnapshots.ts.
To add a database (Supabase, Firebase, or your own API):
- Fork the repo.
- Modify
useSnapshots.tsto replacelocalStoragecalls with your APIfetchrequests. - The rest of the app (UI, Canvas, State) will work automatically.
The UI is prepared for auth integration.
- Header:
TopNav.tsxhas a dedicated slot for a "Sign In" button. - Dashboard:
HomePage.tsxcan strict-gate content based on auth state.
We use PostHog for privacy-friendly analytics.
- Safe Forking: The analytics key is loaded from
.env.local(which is gitignored). - No Pollution: If you fork this repo, analytics will not work until you add your own
VITE_POSTHOG_KEY. Your data is safe; our data is safe.
The AI generation hook (useAIGeneration.ts) and service (geminiService.ts) are isolated modules.
- BYOK Model: Users add their own Gemini API key via the Privacy Settings panel.
- Swap Models: Replace
geminiService.tswith any LLM API (OpenAI, Anthropic, local models).
-
Clone the repository
git clone https://github.com/Vrun-design/OpenFlowKit.git cd OpenFlowKit -
Install & Launch
npm install npm run dev
-
Optional: Add AI features
# Create .env.local and add your Gemini API key echo "VITE_GEMINI_API_KEY=your_key_here" > .env.local
We are building the open standard for diagramming. PRs for new Mermaid features, node types, or AI optimizations are highly encouraged!
- Found a bug? Open an issue.
- Want a feature? Start a discussion or open a PR.
- Love the tool? โญ Star this repo! It helps us reach more developers.
MIT ยฉ [Varun]





