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
Account holderWeb App[Next.js]Hide the 3 services only Web App usesAuth Service[Go]Hide the 2 services only Auth Service usesToken Store[Redis]Email Provider[Postmark]loop[until the link is used or expires]alt[token valid][token missing or expired]Same response whether or not the addressexists1. Requests a reset2. Ask for a reset link [HTTPS]3. SET token, ttl 15m [RESP]4. Send reset link [SMTP]5. 202 Accepted6. Opens the emailed link7. POST /reset-confirmations [HTTPS]8. GETDEL token [RESP]9. Hashes the new password10. Revoke every session11. 200 OK12. Signed in with the new password13. 410 Gone14. Asks for a fresh reset
  1. Account holder to Web App (sync): Requests a reset
  2. Web App to Auth Service (sync): Ask for a reset link [HTTPS]
  3. Auth Service to Token Store (sync): SET token, ttl 15m [RESP]
  4. Auth Service to Email Provider (async): Send reset link [SMTP]
  5. Auth Service to Web App (reply): 202 Accepted
  6. Account holder to Web App (sync): Opens the emailed link
  7. Web App to Auth Service (sync): POST /reset-confirmations [HTTPS]
  8. Auth Service to Token Store (sync): GETDEL token [RESP]
  9. Auth Service to Auth Service (sync, self-message): Hashes the new password
  10. Auth Service to Token Store (async): Revoke every session
  11. Auth Service to Web App (reply): 200 OK
  12. Web App to Account holder (sync): Signed in with the new password
  13. Auth Service to Web App (reply): 410 Gone
  14. Web App to Account holder (sync): Asks for a fresh reset