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
takesis taken asruns inrequiresStudent — Anyone who has ever enrolled, including alumni.StudentPostgreSQLidPKuuidemailUKstringfull_namestringCourseidPKuuidcode — The printed code, e.g. CS101 — unique, but never the primary key, because codes get reused across faculties.codeUKstringtitlestringprerequisite_idFKuuidTermidPKuuidnamestringstarts_ondateEnrolment — A join table: its primary key is the three foreign keys together, so a student can take a course once per term and no more.Enrolmentstudent_idPK FKuuidcourse_idPK FKuuidterm_idPK FKuuidgradestring