paperchart — sequence
Classic request-flow sequence diagram. Actors across the top, time flowing
downward. Good for HTTP request flows, RPC traces, event interchanges.
When to use
- API request / response flows across services.
- RPC traces with returns.
- Explaining ordering guarantees between concurrent actors.
Input shape
{
"data": {
"actors": [
{ "id": "client", "label": "browser", "caption": "web app" },
{ "id": "edge", "label": "edge", "caption": "CDN + runtime" },
{ "id": "origin", "label": "origin", "caption": "API server" }
],
"steps": [
{ "kind": "msg", "from": "client", "to": "edge", "label": "GET /api/search" },
{ "kind": "note", "over": "edge", "text": "parse and normalize query" },
{ "kind": "msg", "from": "edge", "to": "origin", "label": "lookup(q)", "accent": true },
{ "kind": "msg", "from": "origin", "to": "edge", "label": "18 hits", "reply": true },
{ "kind": "msg", "from": "edge", "to": "client", "label": "200 OK", "reply": true }
]
}
}
Step kinds
{ "kind": "msg", "from", "to", "label?", "reply?", "async?", "accent?" } —
horizontal arrow. reply: true draws a dashed line with open arrowhead;
async: true draws a solid line with open arrowhead; accent: true uses
the theme accent color.
{ "kind": "note", "over": "actorId" | [idA, idB], "text": "..." } — a note
box over one actor, or spanning two.
Self-calls
from === to draws a short loop to the right of the actor's lifeline, useful
for "validate" / "score" / "retry internally" steps.
CLI
paperchart sequence -i data.json -o seq.png
paperchart sequence --defaults -o seq.png
1---2name: paperchart-sequence3description: Render a sequence diagram (Mermaid `sequenceDiagram` equivalent). Actor boxes along the top, dashed lifelines descending, messages drawn as horizontal arrows in time order. Supports notes spanning one or more actors, reply arrows (dashed + open head), async arrows (open head, solid line), self-calls (right-hand loop), and an accent color for a single emphasized message.4license: MIT5---67# paperchart — sequence89Classic request-flow sequence diagram. Actors across the top, time flowing10downward. Good for HTTP request flows, RPC traces, event interchanges.1112## When to use1314- API request / response flows across services.15- RPC traces with returns.16- Explaining ordering guarantees between concurrent actors.1718## Input shape1920```json21{22 "data": {23 "actors": [24 { "id": "client", "label": "browser", "caption": "web app" },25 { "id": "edge", "label": "edge", "caption": "CDN + runtime" },26 { "id": "origin", "label": "origin", "caption": "API server" }27 ],28 "steps": [29 { "kind": "msg", "from": "client", "to": "edge", "label": "GET /api/search" },30 { "kind": "note", "over": "edge", "text": "parse and normalize query" },31 { "kind": "msg", "from": "edge", "to": "origin", "label": "lookup(q)", "accent": true },32 { "kind": "msg", "from": "origin", "to": "edge", "label": "18 hits", "reply": true },33 { "kind": "msg", "from": "edge", "to": "client", "label": "200 OK", "reply": true }34 ]35 }36}37```3839## Step kinds4041- `{ "kind": "msg", "from", "to", "label?", "reply?", "async?", "accent?" }` —42 horizontal arrow. `reply: true` draws a dashed line with open arrowhead;43 `async: true` draws a solid line with open arrowhead; `accent: true` uses44 the theme accent color.45- `{ "kind": "note", "over": "actorId" | [idA, idB], "text": "..." }` — a note46 box over one actor, or spanning two.4748## Self-calls4950`from === to` draws a short loop to the right of the actor's lifeline, useful51for "validate" / "score" / "retry internally" steps.5253## CLI5455```bash56paperchart sequence -i data.json -o seq.png57paperchart sequence --defaults -o seq.png58```