Use Cases

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:

SectionContentMacro
OverviewWhat and why - 2–3 sentencesNone (text)
System DiagramHow it fits into the broader systemUML Diagrams (flowchart or sequence)
Data ModelEntities and relationshipsUML Diagrams (ERD)
Key Formulas / CalculationsAny math requiredLaTeX Block Equations
API EndpointsRequest/response flowsUML Diagrams (sequence)
Open QuestionsUnresolved itemsNone (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:

SectionContentMacro
Model OverviewType, task, input/outputNone (text)
ArchitectureLayer structure or pipelineUML Diagrams (flowchart)
Loss FunctionMathematical definitionLaTeX Block Equations
Evaluation MetricsMetric definitionsLaTeX Block Equations
Results SummaryTable of metric valuesNone (Confluence table)
Inference FlowHow the model is called at runtimeUML 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:

SectionContentMacro
System OverviewWhat the system doesNone (text)
Component DiagramHigh-level architectureUML Diagrams (flowchart)
Request FlowEnd-to-end request lifecycleUML Diagrams (sequence)
Data SchemaCore entitiesUML Diagrams (ERD)
SLA / Performance TargetsNumeric targets with formulas if neededLaTeX Inline Equations
Deployment TimelineWhen components go liveUML 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