Types - your own kinds of box, at the top. A box of a type starts with the type's name, which shows in its header; dashed for a thing outside:
Type SERVER [color: #c0562b]
Type EXTERNAL [color: #5b6b82, dashed]
Area 1 "Hetzner - Helsinki - Edge" [color: #c0562b]
SERVER edge [area: 1, note: "the only public machine"] {
gist-edge-proxy "HTTPS, main first" "443"
status "watched" "every minute"
}
EXTERNAL customers { }
Ref: customers > edge.gist-edge-proxy [label: "HTTPS"]
↶ Undo (⌘Z; ⇧⌘Z does it again) takes back a change: typing, a move, a delete, an add, a layout, an import. Export gives the flow as a text to copy (base64), with or without the places of its boxes; Import reads such a text in place of the flow. The top bar's Lane adds a swimlane: a box dropped on it is in it.
The text has four parts, one open at a time: Types (the Type lines), Areas (the Area and Lane lines), Boxes and Connections (the Ref lines). Click a part's name to open it. Grouped off: one editor with the whole text.
A row: name description value - the name in bold, the description lighter, the value in orange at the right (a port, a size, a time). A part with spaces goes in quotes: proxy "HTTPS, main first" "port 443". In quotes, \" is a " and \\ a \. The description and the value are optional. The top bar has Area and a button for each type: drag one onto the canvas. Click a box, a line or an area, then press Delete to take it out; a double click shows its text.
Servers - one box each; a line per service, with a port and a note if you like:
Server sthlm-apps [area: 2, note: "main"] {
wieoapps-gist "the console" "1340"
gist-pagila "" "1347"
}
External runpod [area: Cloud] { // a service you don't run
gpu-pod
}
Lines - between servers, or between their services:
Ref: edge.wireguard > sthlm-apps.edge-private [label: "WireGuard"] Ref: sthlm-db > ams-db [label: "replication", dashed, color: #b4364f] Ref: a - b // no arrow a < b // arrow to a a <> b // both ways
Or draw a line in the diagram: drag from a service (or a box) to another server. The left button makes a solid line, the right button a dashed one; the Ref: line is added to the text. On a touch screen, long-press a row, then drag: a solid line (add [dashed] in the text for a dashed one).
Areas - a frame around the boxes of one place: an id (a whole number), a name, a colour if you like. A box names its area by the id, or by the name:
Area 2 Stockholm [color: #2f8f5b]
Server sthlm-db [area: 2] { postgres :5432 }
Steps and lanes - for a flow: a lane is a band across the drawing (an actor, a machine), a step a box in it. A step's title can have spaces; its tag is the word at the right of its header:
Lane 1 Customer [color: #a8742b, note: "in a browser"]
Lane 2 Console [color: #0f6e63]
Step start [lane: 1, title: "Start a training", tag: "01"] {
time "a click"
}
Step queued [lane: 2, title: "Job queued"] { }
Ref: start > queued
A box moves only along its lane; dragged past the lane's edge, the lane grows. Drag a lane by its name to put it in another place. 🔒 Locked keeps everything where it is (pan and zoom still work).
Options: area, lane, title, tag, note, color on a box; color, note on an area or lane (dashed on an area: a dashed border; an area's fill is its colour, see-through like a lane's - #rrggbbaa gives your own alpha); label, color (else the colour of the box it comes from), dashed on a line. // starts a comment.