Each section appears once, at heading level 2. A CommonMark closing sequence (## Edges ##) is allowed.
Rejected headings:
# Title: the title goes in the frontmatter title
a known section at another level, e.g. ### Edges
an unknown ## Name, or any heading of level 3 or more
A section holds bullet lists only. A description block goes indented under an item.
An item’s first line is read verbatim: *, _ and backticks are plain characters. An empty item is an error.
Only ## Components items nest.
HTML comments <!-- … --> and blank lines are ignored anywhere, including at the end of an item’s line. Inside a description block they are part of its text.
A comment between nested items must be indented like the item after it. A shallower comment ends the list in CommonMark, which would silently make the next item top-level; svugy reports that item as “indented but not nested”.
## Components
- billing
- api
<!-- the ledger keeps every charge -->
- ledger
```description
Every request starts in the browser and ends in the database.
```
## Components
- browser
- backend: Backend (caption=your servers)
```description
Every browser request lands here.
- the API answers synchronously
- anything slower than 100 ms goes to the queue
```
- api: API
- queue
## Edges
- browser -> api
- api -> queue: schedules a receipt (traveler=parcel)
```description
One job per order, retried 3 times with backoff.
```
A description is a fenced code block whose info string is description. The fence is backticks or tildes, three or more.
Before ## Components, it describes the diagram. Indented to the content column of a component or an edge item, it describes that item, either on the line right under the item’s line or after a blank line.
Its content is stored as written, any Markdown included, bullet lists too, except link targets, stored in their whole form. The fence’s indentation is removed and line breaks are stored as \n.
Under a component, the description goes before the children.
Rejected:
text outside a description block, under an item or before ## Components: wrap it in a ```description block
a code block with another info string, or an indented code block
a second description block on one item or on the diagram
a description block with no closing fence
a description on a legend item, since the legend holds one line of text per item, and on a chain a -> b -> c
top-left corner, relative to the parent’s interior; unpinned components are placed automatically
layout
layered (default), grid, row, column
how a container places its children
columns
integer > 0
column count; required by layout=grid, rejected without it
link
component REF or URL
a click goes to that component, or opens the URL
meta.NAME
text
a NAME: value line in the detail panel
Colour: #rgb, #rgba, #rrggbb, #rrggbbaa, a CSS colour name, or transparent.
link: a value containing :, /, ? or # is a URL; anything else is a REF, resolved like an edge’s. Write a relative page with a slash: link=./guide.html.
Warning: shape or height on a container is ignored; containers are always slabs.
Warning: layout on a leaf is ignored.
grid, row and column place at most 32,766 columns and 32,766 rows, so a row holds at most 32,766 children.
## Legend: How to read it
- arrows point where a request goes
- (line=dashed): leaves your servers
- (line=dotted): embedded at build time
- (line=badge, target=cache): looks up the cache
Items are drawn in order under the title.
An item starting with ( then KEY= is a key row, (PROPERTIES): DESCRIPTION, drawn next to a sample of what it describes. Any other item is free text, even one starting with (.
A key row takes only line and target, directly or through a style:
Key row
Describes
(line=dashed): …
edges with the default dash
(line=dotted): …
dotted edges
(line=badge, target=REF): …
the badges of REF
Rejected: target without line=badge, line=badge without target, and a key row with neither dashed, dotted nor badge.
Warning: a key row describing something the diagram never draws.