Skip to content
arch-lab

Opening the shared document

Write your own diagram

live editor

C4, sequence, flowchart, use case, ER or dictionary — .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
Customer APICustomerREST payloadFIELDTYPERULESMEANINGSOURCEiduuidrequireduniqueStable identifier. Neverreused, so a deletedcustomer's id stays dead.accounts.customer.idValues: RFC 4122e.g. 9f2a1c3e-1c2f-4b6a-9c1e-0f2a1c3e4b5aemailstringrequireduniquepiiLowercased on write, whichis what lets it be a uniquekey. Verified before anorder may be placed.accounts.customer.emailValues: RFC 5322display_namestringWhat the customer asked tobe called. Free text — donot parse it into first andlast.accounts.customer.display_namelifetime_valuedecimal(10,2)derivedSum of settled orders.Recomputed nightly, so itlags a same-day order by upto 24 hours.warehouse.customer_ltve.g. 1284.50legacy_crm_refstringdeprecatedThe pre-2024 identifier.Still written for thereporting export; readnothing new from it.crm.contact_refOrder summaryREST payloadFIELDTYPERULESMEANINGSOURCEiduuidrequireduniqueThe order's own identifier.orders.order.idstatusstringrequiredWhere the order is in itslifecycle.Values: one of draft | sent | paid | refundede.g. paidplaced_attimestamptzrequiredWhen the customer confirmed,not when the paymentsettled.orders.order.placed_at