ArchFlow DSL is a declarative language for describing system architecture and animated data flow. Write plain-text diagrams that compile in real time to interactive visualizations.
Nodes are the fundamental building blocks of a diagram. Each node represents a service, component, or system entity. Declare a node with the node keyword followed by a unique identifier.
| Parameter | Type | Required | Description |
|---|---|---|---|
| identifier | string | Required | Unique name for the node. Used in connect and flow declarations. |
| at (x, y) | number pair | Optional | Explicit canvas position in a 800×600 coordinate space. Scaled to viewport automatically. |
Connections define structural relationships between nodes. They render as static dashed lines with arrowheads and represent the topology of your system — not data movement (use flows for that).
connect and flow declarations influence the automatic layout engine — connected nodes are pulled into proximity across the same DAG level.Flows define animated data movement between nodes. Each flow renders as a moving particle along a bezier path. Multiple options can be chained in any order after the node pair.
| Option | Values | Default | Description |
|---|---|---|---|
| speed | 0.1 – 5.0 | 1.0 | Particle velocity. Values above 2.0 spawn multiple particles to maintain visual density. |
| color | named color | blue | Particle color. See Color Reference (§06) for all supported names. |
| loop | flag | true | Particles restart from the source node after reaching the target. |
Groups logically cluster related nodes. States define alternative animation configurations — for example, an idle state vs. a high-load state. Both accept nested statements.
The layout engine runs automatically when coordinates are omitted. It uses a topological sort to determine node levels, then distributes nodes evenly across the canvas.
| Mode | Trigger | Behavior |
|---|---|---|
| Explicit | at (x, y) provided | Coordinates scaled from 800×600 space to current viewport size. |
| DAG Auto | No coordinates | Topological sort assigns column depth; nodes distributed vertically within each column. |
| Mixed | Some nodes positioned | Positioned nodes are fixed; unpositioned nodes use DAG layout in remaining space. |
Use these named colors in flow … color <name> declarations.
| Name | Hex | Preview |
|---|
| Format | Animated | Best for | Player required |
|---|---|---|---|
| Lottie JSON | ✓ | Web, iOS, Android embeds | Yes — lottie-web, react-lottie |
| SVG | ✗ | Figma, Illustrator, Markdown | No |
| Animated GIF | ✓ | GitHub README, Notion, Slack | No |
Click any example to load it into the editor. Each one demonstrates a different architectural pattern — from simple pipelines to complex microservice meshes.