OpenFlowKit Documentation

repository·main·Indexed 20 days ago

https://github.com/vrun-design/openflowkit

An open-source, local-first diagramming studio bridging code-based diagramming (DSL/Mermaid) and visual canvas editors. Features include automatic icon assignment for AWS, Azure, GCP, and CNCF, AI-driven generation via Flowpilot, and a dedicated MCP server (@vrun-design/openflowkit-mcp) for integration with AI agents like Claude Desktop, Cursor, and Windsurf.

Tokens
42K
Snippets
90
Records
241
Agent score
69%

What's inside OpenFlowKit

  1. Overview of OpenFlowKit Studio

    main

    Studio is the right-side workspace in OpenFlowKit designed for structured workflows that go beyond simple drag-and-drop visual editing. It is used for AI-assisted generation, code-backed editing (OpenFlow DSL and Mermaid), structured imports (Infrastructure Sync), and rule-driven architecture validation (Linting).

    Use the Canvas for spatial editing and visual cleanup, and use the Properties Panel for exact tuning of elements. Use Studio when you need to move between visual editing and structured inputs like code, prompts, or infrastructure files.

  2. Overview of OpenFlowKit

    main
    OpenFlowKit is a local-first diagramming workspace designed for developers. It allows you to transform existing technical inputs—such as code, Mermaid, SQL, OpenAPI, Terraform, or infrastructure files—into editable technical diagrams. Instead of treating generation as a one-shot output, OpenFlowKit provides a workflow where you start from a truthful source, convert it into an editable first draft, and then refine the result visually on a canvas.
  3. Overview of OpenFlowKit

    main

    OpenFlowKit is an open-source (MIT licensed) diagramming studio designed for builders. It allows users to create technical flows using templates, code (DSL), structured imports, or AI generation.

    Key capabilities include:

    • Visual Canvas Editor: A professional workspace for refining diagrams.
    • Bidirectional Diagram-as-Code: Live synchronization between a visual canvas and a Git-friendly DSL.
    • Automatic Icon Assignment: Automatically matches over 1,600 technology icons (AWS, Azure, GCP, CNCF, etc.) to nodes based on labels.
    • AI Generation: Supports 10 different providers (including local Ollama) to generate diagrams from plain English prompts.
    • Cinematic MP4 Export: Uses WebCodecs H.264 for faster-than-realtime walkthrough exports.
    • MCP Server Support: Allows AI agents like Claude Desktop, Cursor, and Windsurf to drive the diagramming process directly.
  4. Understand the OpenFlowKit project structure

    main

    OpenFlowKit is a local-first diagram editor built with React 19, TypeScript 5, React Flow/XYFlow, Zustand, and ELK.js. The repository is organized into three main runtime surfaces:

    • Main App (src/): The browser-based editor and in-app experiences.
    • Docs Site (docs-site/): Public documentation built with Astro/Starlight.
    • Marketing Site (web/): The public landing page.

    Internal repository notes and operational markdown are located in docs/.

  5. Choosing between Structured Import, Manual Editing, and Infrastructure Sync

    main

    Decide which workflow to use based on your starting point and requirements:

    WorkflowWhen to use
    Structured ImportWhen a source artifact (SQL, OpenAPI, Code) already exists and you want a fast, editable draft.
    Manual EditingWhen the diagram is primarily conceptual and does not correspond to existing code/data.
    Infrastructure SyncWhen determinism is critical and you want to avoid AI interpretation for infrastructure parsing.
  6. Infrastructure Sync vs. AI Import

    main

    Choosing between Infrastructure Sync and AI Import depends on your source material and requirements for trust:

    FeatureInfrastructure SyncAI Import
    Primary Use CaseReal infrastructure files (state, manifests)Messy or conceptual input
    MethodDeterministic parsingLLM interpretation
    ReliabilityHigh (stays close to source structure)Variable (subject to model interpretation)
    ConnectivityWorks offlineRequires AI provider

    Use Infrastructure Sync when you want to ensure the diagram accurately reflects the underlying infrastructure source without reinterpretation.

  7. Understand the OpenFlowKit theming model

    main
    Theming in OpenFlowKit is implemented as a design-system layer rather than a per-diagram rendering mode. Instead of applying ad hoc styles to individual canvases, you use reusable design systems to control visual consistency across sessions and teams. This approach allows you to maintain branded variants, avoid manual color tuning for every new flow, and move styling definitions between different environments.
  8. Select the appropriate Node Family for your workflow

    main

    OpenFlowKit provides specialized node families designed for specific diagramming semantics. Instead of choosing nodes based on visual shape, choose them based on the underlying data model and workflow requirements.

    • Flow nodes: Best for generic procedural logic and standard flowcharts.
    • Mind map nodes: Best for hierarchical ideation and branching structures where parent-child relationships and depth are important.
    • Architecture and asset-backed nodes: Best for system topology and infrastructure modeling, utilizing provider-backed icons and visual boundaries.
    • Journey and experience nodes: Best for mapping user or process stages, focusing on actors, stages, and scoring.
    • Media and wireframe nodes: Best for UX, product, and annotated architecture workflows using images or browser/mobile wireframe styles.
  9. Understand the EdgeCurve and EdgeRouting model

    main

    OpenFlowKit separates how an edge is routed (the path it takes) from how it is visually smoothed (the look of the line). These are orthogonal axes.

    EdgeCurve (Visual Smoothing)

    Controls the visual interpolation of the path:

    • basis: Smooth B-spline through waypoints (Mermaid default).
    • linear: Straight polyline.
    • step: Orthogonal, sharp corners.
    • smoothstep: Orthogonal, rounded corners.
    • monotoneX: Monotone in X (ideal for Left-to-Right flows).
    • monotoneY: Monotone in Y (ideal for Top-to-Bottom flows).
    • cardinal: Cardinal spline.
    • catmullRom: Catmull-Rom spline.
    • bumpY: Pure cubic bezier between endpoints.

    EdgeRouting (Path Calculation)

    Controls how the layout engine (ELK) calculates the waypoints:

    • orthogonal: Uses ELK's orthogonal routing to create a corridor (prevents edge-edge overlaps).
    • polyline: Uses ELK's polyline routing for minimal waypoints.
    • direct: Ignores the layout engine and draws a straight line from source to target.
  10. Use collaboration sharing vs exporting

    main

    Decide between using room-based sharing or file exporting based on your workflow requirements:

    Use Collaboration Sharing when:

    • The diagram should remain interactive.
    • Other people need to join the current working canvas.
    • You require presence indicators and room-based workflows.

    Use Exporting when:

    • You need a static artifact rather than a live session.
    • The destination is documentation, slides, or a design tool.
    • You need a durable handoff file for someone who will not use the live room.
  11. Supported structured diagram families

    main

    OpenFlowKit provides structured diagram types with opinionated defaults and correct relationship semantics rather than a freeform whiteboard. Supported families include:

    • Flowcharts: Processes, decision trees, and system flows.
    • Architecture: Built-in icons for AWS, Azure, GCP, and CNCF cloud providers.
    • Entity-Relationship: Typed fields, FK edges, and one-to-many/many-to-many notation.
    • Class diagrams: UML with inheritance, composition, and interface relationships.
    • Sequence diagrams: Async messages, actors, and lifelines.
    • Mind maps: Collapsible radial trees with auto-layout.
    • User journeys: Steps, phases, and sentiment scoring.
    • State machines: Transitions, guards, entry, and exit actions.