How vrun-design/openflowkit works
OpenFlowKit is a local-first visual diagramming studio, with an MCP server that exposes diagram-related capabilities to AI clients. The main user journey runs from the workspace into a canvas, where users create diagrams from templates, imports, code, or AI, refine them visually, and export them. The graph also preserves documented layout, asset, collaboration, linting, and MCP capabilities. Some subsystems are represented from README claims and the source index rather than inspected implementation; those links are documented relationships, not source-level call traces.
Main entry points: FlowEditor.tsx Visual canvas · server.ts MCP tools · useFlowEditorController.ts Editor controller · useStudioCodePanelController.ts Diagram code
Components 22
Workspace and editing
- Application routes
src/App.tsx - Workspace home
src/components/HomePage.tsx - Editor controller
src/components/flow-editor/useFlowEditorController.ts - Visual canvas
src/components/FlowEditor.tsx
Diagram creation
- Diagram types
src/diagram-types/builtInPlugins.ts - Diagram imports
src/components/command-bar/importNativeParsers.ts - Diagram code
src/components/studio-code-panel/useStudioCodePanelController.ts - AI generation
src/services/aiService.ts
Refinement and output
- Graph layout
src/services/elkLayout.ts - Icon matching
src/lib/iconMatcher.ts - Architecture rules
src/services/architectureLint/ruleEngine.ts - Live collaboration
src/services/collaboration/runtimeController.ts - Diagram export
src/services/exportService.ts - Cinematic video
src/services/export/cinematicExport.ts
Local-first state
- Workspace state
src/store/workspaceDocumentModel.ts - Local persistence
src/services/storage/flowPersistStorage.ts
MCP integration
- MCP tools
mcp-server/src/server.ts - Codebase analysis
mcp-server/src/tools/analyzeCodebase.ts - Template catalog
mcp-server/src/lib/starterTemplates.ts - Icon catalog
mcp-server/src/lib/iconCatalog.ts - Viewer links
mcp-server/src/lib/viewerUrl.ts
Other components
- Diagram author
Connections 24
- Diagram author → Workspace home: starts at
README.md - Workspace home → Application routes: launches editor
src/App.tsx - Application routes → Editor controller: routes to
src/App.tsx - Editor controller → Visual canvas: composes editor
src/components/flow-editor/useFlowEditorController.ts - Visual canvas → Diagram types: supports types
README.md - Diagram author → Diagram imports: imports diagrams
README.md - Diagram author → Diagram code: edits diagram code
README.md - Diagram code → Diagram imports: parses Mermaid
src/components/studio-code-panel/useStudioCodePanelController.ts - Diagram code → Visual canvas: applies changes
src/components/studio-code-panel/useStudioCodePanelController.ts - Diagram author → AI generation: requests generation
README.md - AI generation → Visual canvas: generates diagrams
README.md - Visual canvas → Graph layout: auto-layouts
README.md - Diagram imports → Icon matching: matches technology icons
README.md - Visual canvas → Architecture rules: checks architecture
README.md - Visual canvas → Live collaboration: shares edits
README.md - Visual canvas → Diagram export: exports diagrams
README.md - Visual canvas → Cinematic video: renders walkthrough
README.md - Editor controller → Workspace state: manages workspace
- Workspace state → Local persistence: persists state
src/services/storage/flowPersistStorage.ts - Diagram author → MCP tools: drives via AI client
README.md - MCP tools → Codebase analysis: registers analysis
mcp-server/src/server.ts - MCP tools → Template catalog: registers templates
mcp-server/src/server.ts - MCP tools → Icon catalog: registers icon search
mcp-server/src/server.ts - MCP tools → Viewer links: registers viewer links
mcp-server/src/server.ts