Use Case Templates
Ready-to-use Confluence page templates for common technical documentation scenarios. Each template includes the recommended page structure, which macros to use, and example content to get started.
Template 1: Technical Spec Page
Purpose: Document a new feature or system component with context, design, and implementation details.
Suggested page structure:
| Section | Content | Macro |
|---|---|---|
| Overview | What and why - 2–3 sentences | None (text) |
| System Diagram | How it fits into the broader system | UML Diagrams (flowchart or sequence) |
| Data Model | Entities and relationships | UML Diagrams (ERD) |
| Key Formulas / Calculations | Any math required | LaTeX Block Equations |
| API Endpoints | Request/response flows | UML Diagrams (sequence) |
| Open Questions | Unresolved items | None (text or table) |
Example - System Diagram for a Technical Spec:
flowchart TD
Client[/API Client/] --> Gateway[API Gateway]
Gateway --> AuthService[Auth Service]
Gateway --> FeatureService[New Feature Service]
FeatureService --> Cache[(Redis Cache)]
FeatureService --> DB[(PostgreSQL)]
FeatureService --> Queue[/Message Queue/]
Queue --> Worker[Background Worker]
Worker --> DB
style FeatureService fill:#DEEBFF,stroke:#0052CC
style DB fill:#E3FCEF,stroke:#00875A
Example - Key Formula (LaTeX Block):
\text{Score} = w_1 \cdot \text{Relevance} + w_2 \cdot \text{Recency} + w_3 \cdot \text{Popularity}
Template 2: ML Model Documentation Page
Purpose: Document a machine learning model for team review, handoff, or audit - including architecture, training setup, and evaluation results.
Suggested page structure:
| Section | Content | Macro |
|---|---|---|
| Model Overview | Type, task, input/output | None (text) |
| Architecture | Layer structure or pipeline | UML Diagrams (flowchart) |
| Loss Function | Mathematical definition | LaTeX Block Equations |
| Evaluation Metrics | Metric definitions | LaTeX Block Equations |
| Results Summary | Table of metric values | None (Confluence table) |
| Inference Flow | How the model is called at runtime | UML Diagrams (sequence) |
Example - Training Pipeline Diagram:
flowchart LR
RawData[/Raw Data/] --> Preprocess[Preprocessing]
Preprocess --> FeatureEng[Feature Engineering]
FeatureEng --> Split{Train / Val Split}
Split -->|80%| Train[Model Training]
Split -->|20%| Validate[Validation]
Train --> Evaluate[Evaluate on Val Set]
Evaluate --> Threshold{Metrics Pass?}
Threshold -->|Yes| Register[Register Model]
Threshold -->|No| Tune[Hyperparameter Tuning]
Tune --> Train
Register --> Deploy[/Deploy to Production/]
Example - Loss Function (LaTeX Block):
\mathcal{L} = -\frac{1}{N} \sum_{i=1}^{N} \left[ y_i \log(\hat{y}_i) + (1 - y_i) \log(1 - \hat{y}_i) \right]
Example - Metrics (LaTeX Block):
\begin{aligned}
\text{AUC-ROC} &= \int_0^1 \text{TPR}(\text{FPR}^{-1}(t))\, dt \\[6pt]
\text{Log Loss} &= -\frac{1}{N}\sum_{i=1}^{N}\left[y_i \log(p_i) + (1-y_i)\log(1-p_i)\right]
\end{aligned}
Template 3: System Architecture Page
Purpose: Provide a high-level overview of a system's components, data flows, and integrations for engineering onboarding and architecture review.
Suggested page structure:
| Section | Content | Macro |
|---|---|---|
| System Overview | What the system does | None (text) |
| Component Diagram | High-level architecture | UML Diagrams (flowchart) |
| Request Flow | End-to-end request lifecycle | UML Diagrams (sequence) |
| Data Schema | Core entities | UML Diagrams (ERD) |
| SLA / Performance Targets | Numeric targets with formulas if needed | LaTeX Inline Equations |
| Deployment Timeline | When components go live | UML Diagrams (Gantt) |
Example - High-Level Architecture Diagram:
flowchart TB
subgraph Frontend
Web[Web App]
Mobile[Mobile App]
end
subgraph Backend
GW[API Gateway]
Auth[Auth Service]
UserSvc[User Service]
NotifSvc[Notification Service]
end
subgraph Data
PG[(PostgreSQL)]
Redis[(Redis Cache)]
S3[(S3 Storage)]
end
subgraph Infra
CDN[CDN]
LB[Load Balancer]
end
Web --> CDN --> LB --> GW
Mobile --> CDN
GW --> Auth
GW --> UserSvc
GW --> NotifSvc
UserSvc --> PG
UserSvc --> Redis
NotifSvc --> PG
UserSvc --> S3
style Frontend fill:#DEEBFF
style Backend fill:#E3FCEF
style Data fill:#FFF0B3
style Infra fill:#FFEBE6
Example - SLA targets in inline math (LaTeX Inline):
The API must maintain p_{99} \leq 200\text{ ms} latency and \text{Availability} \geq 99.9\% measured over a rolling 30-day window.
Example - Deployment Timeline (Diagrams macro):
gantt
title System Rollout Timeline
dateFormat YYYY-MM-DD
section Infrastructure
Provision Cloud Resources :done, infra, 2024-05-01, 2024-05-07
section Backend Services
Deploy Auth Service :done, auth, 2024-05-07, 2024-05-10
Deploy User Service :active, user, 2024-05-10, 2024-05-17
Deploy Notification Service :notif, 2024-05-17, 2024-05-22
section Frontend
Deploy Web App :web, 2024-05-20, 2024-05-24
Deploy Mobile Release :mobile, 2024-05-24, 2024-05-28
section Go Live
Production Cutover :milestone, golive, 2024-05-28, 1d