Quick Start
- Open the app at
/app/. - Keep
Codetab active and start from Example or a Template. - Edit lanes, nodes, and arrows in the editor.
- Click
Renderto rebuild diagram from code. - Use
Saveto store a local draft and export when ready.
Interface Overview
The app is split into 3 areas:
- Left code editor, syntax reference, shape palette, properties, lint panel.
- Center diagram canvas with drag/select/connect tools.
- Top command toolbar with primary actions and support actions.
Top Toolbar
Primary row (always visible)
- View tabs:
Code,Ref,Shapes,Props,Lint - Main actions:
Render,Save,Sync - Diagram export:
SVG,PNG,Copy PNG - Search: node id/label input +
Go
Support row (mode controlled)
Support actions include Example, Layout, Help, panel toggle, Templates, Snapshots, code import/export, JSON export, and share link.
| Mode | Behavior |
|---|---|
Auto | Support row appears on top-bar hover/focus. |
Show | Support row is always visible. |
Hide | Support row stays hidden. |
Mode is persisted in local storage per browser.
Syntax Core
SwimFlow syntax is line-based and human readable.
diagram "Order Flow"
direction LR
theme dark
config {
laneWidth: 195
rowHeight: 96
radius: 8
fontSize: 10.5
}
lane "Customer" blue
start s1
process p1 "Checkout"
endlane
| Token | Description |
|---|---|
diagram "Title" | Diagram title. |
direction LR|TB | Layout direction (left-right or top-bottom). |
theme dark|light|blue|sepia | Color theme. |
config { ... } | Global sizing and rendering options. |
lane ... / endlane | Swimlane block. |
// comment | Comment line. |
## Heading | Visual section marker in code. |
Node Types
Supported node types:
start,endprocess,decision,note,io,subactor,db,cloud,queue
Node options
Append inline options to any node:
process p2 "Validate" x:120 y:240 w:220 h:70 color:#ff7a5a
Arrows and Ports
Use arrow to connect nodes with style and routing control.
arrow a -> b arrow a --> b "Async" arrow d1 -> p2 YES from:right to:left arrow d1 -> p3 NO style:dashed color:red arrow x <-> y
Arrow operators
->solid-->dashed-xblocked<->bidirectional
Arrow options
from:andto:portsstyle:dashed, dotted, thick, double, blockedcolor:,width:,end:,radius:,flip
Code Tools
- Syntax highlighting with autocomplete suggestions.
- Snippet insertion buttons for common commands.
- Live preview render (debounced) + explicit Render.
Syncto generate code from canvas state.- Draft autosave + manual Save button.
Lint and Quality
The Lint panel reports structural and quality signals:
- Parser errors
- Duplicate node ids
- Arrows targeting missing nodes
- Lane block mismatch
- Missing start/end nodes
- Isolated nodes and very long labels
Templates and Snapshots
Templates
Use ready-made flows (for example onboarding, incident response, release pipeline) and adapt quickly.
Snapshots
Create named checkpoints of your code locally.
- Save current draft as snapshot
- Load any previous snapshot
- Rename or delete snapshots
Import, Share, Export
Import and code file export
Import Codeaccepts plain text or.sf.Export Codesaves current DSL as.sf.
Share
Sharecopies URL with encoded code hash.- Opening that URL restores the shared code.
Diagram export
SVG: best for docs and print.PNG: best for chat, slides, and quick sharing.Copy PNG: sends image directly to clipboard.JSON: full project state export (diagram + code + config).
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Ctrl/Cmd + Enter | Render from code |
| Ctrl/Cmd + S | Export SVG |
| Ctrl/Cmd + Z | Undo |
| Ctrl/Cmd + Y | Redo |
| Ctrl/Cmd + D | Duplicate selection |
| Ctrl/Cmd + A | Select all |
| Ctrl/Cmd + K | Focus search box |
| Ctrl/Cmd + Shift + L | Open Lint tab |
| V, A, Space | Select, Arrow, Pan tool |
| F | Fit canvas |
| Delete | Delete selection |
Troubleshooting
Nothing renders
- Confirm at least one
laneand one node exist. - Open Lint panel and resolve parser errors first.
Arrow does not connect as expected
- Verify both node ids exist and are unique.
- Try explicit ports:
from:right to:left. - Use arrow properties to clear waypoints or flip route.
Lost work
- Use
Saveoften and keep snapshots for milestones. - Draft restore runs automatically on reload in same browser.