Skip to content
arch-lab

Opening the shared document

Write your own diagram

live editor

C4 or sequence — .alab, arch-lab JSON, or Mermaid, auto-detected and rendered live. 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

Diagram
Export

A still of the diagram exactly as it is on screen, folds included.

alt[card accepted][card declined]par[receipt][audit]opt[first purchase]CustomerStorefront[Next.js]Order API[Go]Hide the 2 services only Order API usesPayments[Stripe]Orders DB[PostgreSQL]Price and stock re-checked server-sideOrder flow complete1. Clicks Place order2. Place the order [HTTPS]3. Validates the cart4. Create charge [REST]5. charge.succeeded6. INSERT order [SQL]7. Emails the receipt8. Writes audit row9. 201 Created10. 402 Payment Required11. Shows onboarding tips
  1. Customer to Storefront (sync): Clicks Place order
  2. Storefront to Order API (sync): Place the order [HTTPS]
  3. Order API to Order API (sync, self-message): Validates the cart
  4. Order API to Payments (sync): Create charge [REST]
  5. Payments to Order API (reply): charge.succeeded
  6. Order API to Orders DB (sync): INSERT order [SQL]
  7. Order API to Customer (async): Emails the receipt
  8. Order API to Orders DB (async): Writes audit row
  9. Order API to Storefront (reply): 201 Created
  10. Order API to Storefront (reply): 402 Payment Required
  11. Storefront to Customer (sync): Shows onboarding tips