Opening the shared document…
Diagram playground
Write a diagram as text and it renders here as you type. Canvas editing for six of ten notations. Nothing leaves your browser. Syntax reference ·
1
archlab 1.0 dict
2
title "Customer API"
3
description "Every field the customer endpoints return, what it means, and where it comes from"
4
5
@dict
6
section "Customer" [REST payload] #api
7
desc "Returned by GET /customers/:id and embedded in every order"
8
field id uuid required unique
9
desc "Stable identifier. Never reused, so a deleted customer's id stays dead."
10
source "accounts.customer.id"
11
values "RFC 4122"
12
example "9f2a1c3e-1c2f-4b6a-9c1e-0f2a1c3e4b5a"
13
field email string required unique pii
14
desc "Lowercased on write, which is what lets it be a unique key. Verified before an order may be placed."
15
source "accounts.customer.email"
16
values "RFC 5322"
17
field display_name string
18
desc "What the customer asked to be called. Free text — do not parse it into first and last."
19
source "accounts.customer.display_name"
20
field lifetime_value decimal(10,2) derived
21
desc "Sum of settled orders. Recomputed nightly, so it lags a same-day order by up to 24 hours."
22
source "warehouse.customer_ltv"
23
example "1284.50"
24
field legacy_crm_ref string deprecated
25
desc "The pre-2024 identifier. Still written for the reporting export; read nothing new from it."
26
source "crm.contact_ref"
27
section "Order summary" [REST payload]
28
desc "The abbreviated order embedded in a customer response"
29
field id uuid required unique
30
desc "The order's own identifier."
31
source "orders.order.id"
32
field status string required
33
desc "Where the order is in its lifecycle."
34
values "one of draft | sent | paid | refunded"
35
example "paid"
36
field placed_at timestamptz required
37
desc "When the customer confirmed, not when the payment settled."
38
source "orders.order.placed_at"
Tab indents · Esc then Tab leaves the editor · worked examples
Read-only