User Guide
How to: Document a System Architecture
A workflow for documenting a software system using three diagram types on a single Confluence page - flowchart for the high-level overview, sequence diagram for interactions, and ERD for the data model.
Page Structure
Architecture Page
├── Section 1: System Overview (Flowchart)
├── Section 2: Request Flow (Sequence Diagram)
└── Section 3: Data Model (ERD)
Step 1 - System Overview Flowchart
-
Edit the Confluence page, type
/→ UML Diagrams → insert -
In the Source panel, write a top-down flowchart:
flowchart TD Client([Web / Mobile Client]) API[API Gateway] Auth[Auth Service] DB[(Primary Database)] Cache[(Redis Cache)] Client --> API API --> Auth Auth -->|valid| API API --> Cache Cache -->|miss| DB DB --> Cache Cache --> API API --> Client -
Verify preview, click Save, then add a heading above it: "System Overview"
Step 2 - Request Sequence Diagram
-
Below the flowchart section, insert another UML Diagrams macro
-
Write the sequence diagram:
sequenceDiagram participant Client participant Gateway as API Gateway participant Auth as Auth Service participant DB as Database Client->>Gateway: POST /api/resource activate Gateway Gateway->>Auth: Validate token Auth-->>Gateway: 200 OK Gateway->>DB: INSERT resource DB-->>Gateway: resource_id Gateway-->>Client: 201 Created {id} deactivate Gateway -
Save, add heading: "Request Flow"
Step 3 - Data Model ERD
-
Insert another UML Diagrams macro
-
Write the ERD:
erDiagram USER { int id PK string email string name datetime created_at } PROJECT { int id PK string name int owner_id FK } RESOURCE { int id PK string title int project_id FK int created_by FK } USER ||--o{ PROJECT : "owns" PROJECT ||--o{ RESOURCE : "contains" USER ||--o{ RESOURCE : "creates" -
Save, add heading: "Data Model"
Step 4 - Publish and Maintain
- Publish the page
- To update a diagram: hover over it in view mode → click Edit in the hover toolbar
- Source is preserved - edit and re-save