documentation

Mermaid GitGraph, C4, Mindmap, and Timeline Examples

Site Owner: Michael Baggett

This page contains six examples each of GitGraph, C4, mindmap, and timeline diagrams.

GitGraph diagrams

1. Feature branch

gitGraph
    commit id: "start"
    branch feature
    commit id: "feature-1"
    checkout main
    commit id: "main-1"
    merge feature

2. Release branch

gitGraph
    commit
    branch release
    commit tag: "rc1"
    checkout main
    commit
    merge release
    commit tag: "v1.0"

3. Hotfix

gitGraph
    commit id: "stable"
    branch hotfix
    commit id: "fix" type: HIGHLIGHT
    checkout main
    merge hotfix

4. Parallel work

gitGraph
    commit
    branch api
    commit
    checkout main
    branch ui
    commit
    checkout api
    commit
    checkout main
    merge api
    merge ui

5. Reverted change

gitGraph
    commit id: "A"
    commit id: "B"
    commit id: "bad" type: REVERSE
    commit id: "restore"

6. Tagged delivery

gitGraph
    commit id: "build"
    commit id: "test"
    branch deploy
    commit tag: "staging"
    checkout main
    merge deploy
    commit tag: "production"

C4 diagrams

1. System context

C4Context
    Person(user, "Customer")
    System(store, "Online Store")
    System_Ext(payment, "Payment Provider")
    Rel(user, store, "Places orders")
    Rel(store, payment, "Charges card")

2. Container diagram

C4Container
    Person(user, "Customer")
    System_Boundary(shop, "Store") {
        Container(web, "Web App", "Hugo", "Serves pages")
        Container(api, "API", "Go", "Provides data")
        ContainerDb(db, "Database", "PostgreSQL", "Stores records")
    }
    Rel(user, web, "Browses")
    Rel(web, api, "Requests data")
    Rel(api, db, "Reads and writes")

3. Component diagram

C4Component
    Container_Boundary(api, "Catalog API") {
        Component(search, "Search", "Go", "Finds products")
        Component(pricing, "Pricing", "Go", "Calculates prices")
        Component(catalog, "Catalog", "Go", "Loads products")
    }
    Rel(search, catalog, "Queries")
    Rel(search, pricing, "Prices results")

4. External systems

C4Context
    Person(staff, "Staff member")
    System(portal, "Staff Portal")
    System_Ext(identity, "Identity Provider")
    System_Ext(mail, "Mail Service")
    Rel(staff, portal, "Uses")
    Rel(portal, identity, "Authenticates")
    Rel(portal, mail, "Sends notices")

5. Data boundary

C4Container
    System_Boundary(app, "Application") {
        Container(frontend, "Frontend", "TypeScript")
        Container(service, "Service", "Node.js")
        ContainerDb(data, "Data Store", "SQLite")
    }
    Rel(frontend, service, "Calls")
    Rel(service, data, "Persists")

6. Deployment view

C4Deployment
    Deployment_Node(browser, "User Device", "Browser") {
        Container(frontend, "Web UI")
    }
    Deployment_Node(host, "Application Host", "Linux") {
        Container(api, "Application API")
    }
    Rel(frontend, api, "HTTPS")

Mindmaps

1. Documentation

mindmap
  root((Documentation))
    Guides
      Tutorials
      How-to
    Reference
      APIs
      Configuration

2. Release planning

mindmap
  root((Release))
    Plan
      Scope
      Owners
    Build
      Code
      Tests
    Ship
      Notes
      Monitoring

3. Incident response

mindmap
  root((Incident))
    Detect
      Alert
      Confirm
    Respond
      Contain
      Communicate
    Recover
      Repair
      Review

4. Product discovery

mindmap
  root((Product))
    Users
      Needs
      Pain points
    Options
      Ideas
      Experiments
    Evidence
      Interviews
      Metrics

5. Security review

mindmap
  root((Security))
    Identity
      Authentication
      Authorization
    Data
      Encryption
      Retention
    Operations
      Logging
      Response

6. Learning plan

mindmap
  root((Learning))
    Concepts
      Syntax
      Patterns
    Practice
      Exercises
      Projects
    Feedback
      Review
      Iteration

Timelines

1. Project delivery

timeline
    title Project delivery
    Q1 : Discovery
    Q2 : Design
    Q3 : Build
    Q4 : Release

2. Website history

timeline
    title Website history
    2022 : First prototype
    2023 : Public launch
    2024 : Search added
    2025 : Theme refresh

3. Incident timeline

timeline
    title Incident response
    09-00 : Alert received
    09-15 : Impact confirmed
    10-00 : Mitigation applied
    11-30 : Service restored

4. Training plan

timeline
    title Training plan
    section Foundations
      Week 1 : Orientation
      Week 2 : Core concepts
    section Practice
      Week 3 : Guided exercise
      Week 4 : Capstone

5. Product lifecycle

timeline
    title Product lifecycle
    Idea : Problem identified
    Pilot : Early users
    Growth : Wider adoption
    Mature : Continuous improvement

6. Service milestones

timeline
    title Service milestones
    Alpha : Internal testing
    Beta : Partner testing
    Launch : General availability
    Next : New capabilities

Posted: