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
order.placed eventEnvelopeKafkaFIELDTYPERULESMEANINGSOURCEevent_iduuidrequireduniqueDeduplication key. A consumer that hasseen this id has already processed theevent.Values: RFC 4122occurred_attimestamptzrequiredWhen the thing happened, not when themessage was produced. Producers retry;this does not change.versionintegerrequiredSchema version of the payload below. Aconsumer must ignore an envelope whoseversion it does not know.e.g. 3PayloadFIELDTYPERULESMEANINGSOURCEorder_iduuidrequiredThe order this event is about.orders.order.idcustomer_emailstringrequiredpiiDenormalised onto the event so consumersneed no lookup. Personal data — it leavesthe boundary with the event.accounts.customer.emailtotal_minorintegerrequiredThe order total in MINOR units, to avoid afloat. Divide by 100 for a display value.e.g. 128450currencystringrequiredValues: ISO 4217e.g. THBcoupon_codestringdeprecatedNever populated since v2. Read thediscounts array instead; this stays forconsumers not yet migrated.