Skip to content
arch-lab

Opening the shared document

Write your own diagram

C4, sequence, flowchart, use case, ER or dictionary — .alab, arch-lab JSON, or Mermaid, auto-detected and rendered live. C4 nodes can be dragged on the canvas, and sequence messages and lifelines added, edited, repointed, reordered, numbered and removed on it; the other kinds lay themselves out from the text. Nothing leaves your browser. Syntax reference

How .alab, JSON and Mermaid relate

.alab is the format to write: it is what the syntax reference documents, what share links carry, and what reads cleanly in a code review. .archlab.json is the same C4 model on disk — the interchange form any other tool can read without implementing a grammar; the two are lossless twins in both directions (proved on every build), so you never have to write the JSON by hand. Mermaid is read and written too, lossily — the format toggle above the pane converts in place and states what each direction drops. Nothing you type is uploaded or stored.

switches by rewriting the text

Tab indents · Esc then Tab leaves the editor · syntax reference

Read-only
Export
Order API[Go]Hide the 3 services only Order API usesLedger[PostgreSQL]Card Processor[Stripe]Hide the 1 service only Card Processor usesFraud Scoringrectcritical[Capture within 7 days][processor unreachable][already captured]break[card declined]The authorisation holds; only the captureis late1. Authorise the card [REST]2. Score the attempt3. requires_capture4. Capture the intent [REST]5. succeeded6. Post the entry [SQL]7. Schedules a retry with backoff8. Reconciles against the existing entry [SQL]9. Void the authorisation [REST]10. Posts nothing — there is no money to record [SQL]
  1. Order API to Card Processor (sync): Authorise the card [REST]
  2. Card Processor to Fraud Scoring (async): Score the attempt
  3. Card Processor to Order API (reply): requires_capture
  4. Order API to Card Processor (sync): Capture the intent [REST]
  5. Card Processor to Order API (reply): succeeded
  6. Order API to Ledger (sync): Post the entry [SQL]
  7. Order API to Order API (sync, self-message): Schedules a retry with backoff
  8. Order API to Ledger (sync): Reconciles against the existing entry [SQL]
  9. Order API to Card Processor (reply): Void the authorisation [REST]
  10. Order API to Ledger (sync): Posts nothing — there is no money to record [SQL]