Event types belong on the edge
Record them on the edge, as in events: ["OrderCreated"]. An event name is a string, not a reference id, and one edge can carry several types.
Applications, message channels and data stores are recorded as nodes, and the message flows, writes and reads, requests and influences between them as edges.
A document is built around two arrays, nodes and edges. This page explains the core syntax of a document and how to read and use the canvas.
Publish → route between channels → subscribe. The order service publishes to an SNS topic, the message is routed to an SQS queue, and the notification service consumes it. A route step is used only when it is needed.
A node is an independent component of the system. topic and queue together are called channels.
appA service or application. It publishes or subscribes to messages and writes or reads data, in any combination.
topicA channel that many publishers and subscribers can share, such as a Kafka topic or an SNS topic.
queueA queue or competing-consumer channel, such as SQS or a RabbitMQ queue.
storeA place that keeps data, such as a database, a cache, a storage bucket or a search index: PostgreSQL, Redis, S3 or Elasticsearch.
Shape and platform are separate. type: "topic" is the shape of the channel and platform: "kafka" is its implementation; a data store names its product the same way, as in platform: "postgresql". A new platform never needs a new node type.
Components outside the document are marked external. Set external: true on a partner system or SaaS that is outside your ownership and control. It does not mean omitted or unverified.
Applications and data stores can be grouped into boundaries. List the units you want to tell apart, such as a payment system or a production environment, in the document's boundaries, and give an application or a data store the boundary's ID in boundary. Each belongs to one boundary at most, and topics and queues belong to none. An edge that crosses a boundary reads as flow into or out of that unit, such as another system reading a data store directly.
Channels can be grouped into clusters. List the units you want to tell channels apart by, such as the topics of one broker cluster or the queues of one account and region, in the document's clusters, and give a topic or queue the cluster's ID in cluster. A channel belongs to one cluster at most, and applications and data stores belong to none. Boundaries and clusters pick their color from the same palette.
An edge points from from to to. For a message, a write or a read, the arrow is the way the data flows; for a request, it runs from the application that sends it to the one that answers it; for influence, from what affects to what is affected.
| Relationship | Direction | Meaning | Example |
|---|---|---|---|
publish | app → channel | Publishes messages | Order service → Kafka topic |
subscribe | channel → app | Subscribes to and consumes messages | Kafka topic → billing service |
route | between channels and data stores | Forwards messages or data to another channel or data store | SNS topic → SQS queue |
write | app → data store | Writes data to a data store | Order service → orders DB |
read | data store → app | Reads data from a data store | Orders DB → report service |
request | app → app | Sends a synchronous request to another application | Order service → payment service |
influence | any node → any node | State or changes affect the target | Order service → billing service |
So that even a small graph reads the same way, components and relationships have distinct roles.
Record them on the edge, as in events: ["OrderCreated"]. An event name is a string, not a reference id, and one edge can carry several types.
It does not mean all events or no events. When the list is present it needs at least one non-empty string, and only publish, subscribe and route edges carry it.
One app can receive a message and publish another. Even when a Kafka consumer pulls, the subscription runs topic → app, as a read runs store → app.
Use it when the forwarding party, such as an SNS subscription, a Kafka Connect connector or a database's change data capture, is not modeled on its own. If that party matters, make it an app and connect it to both sides.
Position, color and shape are presentation. position and the color of a boundary or a cluster are optional, and a document without coordinates or colors is complete. The canvas and the code show the same graph.
Add evidence, code and operational details with notes, snippets and metadata. They never change the node type, the direction, the relationship type or the events. Values in metadata are text or lists of text.
The order service publishes OrderCreated to a Kafka topic and the billing service subscribes to it. The example below is a complete Flowbraid document on its own.
{
"format": "flowbraid",
"version": 1,
"name": "Order event flow",
"nodes": [
{
"id": "order-service",
"type": "app",
"name": "Order Service"
},
{
"id": "orders-created",
"type": "topic",
"name": "orders.created.v1",
"platform": "kafka"
},
{
"id": "billing-service",
"type": "app",
"name": "Billing Service"
}
],
"edges": [
{
"id": "publish-order-created",
"from": "order-service",
"to": "orders-created",
"type": "publish",
"events": [
"OrderCreated"
]
},
{
"id": "subscribe-billing",
"from": "orders-created",
"to": "billing-service",
"type": "subscribe",
"events": [
"OrderCreated"
]
}
]
}flowbraid and the supported version is 1.id, a type and a name.id, a from, a to and a type.from and to refer to node ids in the same document.production and 2026-10-14 or v4.2. Besides its name and description, a document can carry notes, links and metadata too.planned for a plan not applied to the system yet (see planned documents). Without it, or with applied, the document draws the system as it is.A document draws one system at one point in time. Its status says whether that system is in place yet; a document without a status is applied.
asOf is when the plan should land. The document list, the bar in a narrow window and the document panel mark it “Planned”.A plan in several steps is several planned documents. Write why and how the change happens, and what is still open, in the notes of the document or of its elements.
Validation runs in three steps: structure, references, then semantics. Errors make the document invalid; semantic warnings do not change its validity.
influence may point back to the same node.events on relationships other than publish, subscribe and route, topics or queues in a boundary, applications or data stores in a cluster, and colors outside the palette.A document records the connection structure of a system and what it means.
A connected line does not prove that a particular message traveled that path, or that a given input produced a given output. The same event name does not guarantee the same message or schema.
A relationship missing from the document is not proof that it does not exist, and passing validation does not guarantee a match with the running system. Record the environment and the point in time the document describes in environment and asOf, and what it covers and on what basis in its notes.
The workspace and the samples page draw a document as a graph. Positions and zoom never change what the document means. Zoom and positions moved in reading mode are screen state; editing mode records node positions in the document. For multiple relationships between the same nodes, chips from top to bottom correspond to lines from top to bottom (left to right for vertical lines). This order is preserved when you move nodes. For self-loops, the upper chip corresponds to the upper curve.
position in the document in whole pixels. One drag, or a run of arrow-key moves on the same node, is one undo step. The first edit also records the positions of the nodes laid out automatically, so the layout stays as it was. The trash button above a selected node, or Delete or Backspace, deletes the selected node together with its connections, or the selected connection, and a notice offers to undo it. Ctrl+Z (Cmd+Z on a Mac) undoes and Ctrl+Shift+Z redoes. Edits are saved right away. Their undo history stays while you switch documents, but a reload clears it.The canvas shows only what it takes to recognize an element. Resting the pointer on it shows more in the peek, and selecting it shows everything the document records in the details panel. Each level includes everything the one before it shows. The numbers on the drawings match the numbers in the lists.
Example: Payment Gateway, an external payment processor
Always visible on the graph.
external, the word External runs down a spine along the right edge.The id, description, tags and notes are not on the card.
Rest the pointer on the node or focus it with the keyboard, and it appears above the node, or below when there is no room above.
The peek is read-only and keeps its size whatever the zoom. Nothing is available only there.
Click, or press Enter, to select the node: unrelated elements fade and the document panel on the right of the canvas switches to the node's details. Double-click, or press Enter again on the selected node, to open the panel.
Empty sections are left out. The panel's “Back to the document” button, Escape on the canvas, or a click on empty canvas clears the selection.
Example: Order Service publishing to orders.created.v1
The line and its chip are always visible. The chip sits in the middle of the line.
Rest the pointer on the chip or focus the connection with the keyboard, and it appears next to the chip. Resting on the line only highlights it.
When there is no room around the chip, the peek stays hidden; read the details panel instead.
Click the chip or the line, or press Enter on the focused connection, to select the relationship; the document panel switches to its details. The panel opens the same way as for nodes.
Example: Ordering, the boundary Order Service belongs to
Always visible on the graph while it has at least one member.
The color is one of six in the palette; the name on the tab says which boundary it is.
Rest the pointer on the tab or focus it with the keyboard, and it appears next to the tab. The members and their relationships are highlighted at once.
Click the tab, or press Enter on it, to select the boundary: everything but its members and their neighbors fades, and the document panel switches to the boundary's details. A boundary without members is selected from the boundaries in the document's summary.
A member's peek and details name its boundary too, and in the panel that name selects the boundary.
Example: kafka-orders, the cluster orders.created.v1 belongs to
On the card of each channel in the cluster.
A cluster draws no region: channels sit between applications, so a region would cut across the boundaries. The square and the name under a channel's name look different from a boundary member's band even in the same color.
Rest the pointer on a channel in the cluster or focus it with the keyboard.
Nothing on the canvas is the cluster itself, so a cluster has no peek of its own.
Select the cluster from the clusters in the document's summary, or from the “Cluster” line in a channel's details: everything but its channels and their neighbors fades, and the document panel switches to the cluster's details.
In editing mode, the pencil and the trash at the top of the panel change the cluster and delete it.
An AI model can write a document for you once it has the rules of the format. The site gives them as a specification written for models, in English, which asks the model to write names, descriptions and notes in your language.
.json file, it can be imported instead, which always adds a new document. One code fence around all of it, as an answer copied whole has, is read past. Saving checks it as it checks your own edits, with errors and warnings by line.Validation checks the format, not what you asked for: a request relationship drawn the wrong way round, or a node left outside its boundary, still passes. Check the directions and the memberships before you keep the document.