Template

C4 Diagram Example

A complete C4 Context diagram using Mermaid syntax. Person, System, System_Ext, and Rel elements — the industry standard for architecture documentation.

Template preview

Copy this Mermaid C4 code into Cybewave Studio or any Mermaid-compatible editor.

c4-context-diagram.mmd
C4Context
    title System Context Diagram - Online Banking

    Person(customer, "Banking Customer", "A customer of the bank with personal accounts.")
    Person(admin, "Bank Admin", "Internal staff managing customer accounts.")

    System(bankingSystem, "Online Banking System", "Allows customers to view balances, make transfers, and pay bills.")

    System_Ext(emailSystem, "Email System", "SendGrid - sends transactional emails.")
    System_Ext(paymentGateway, "Payment Gateway", "Stripe - processes card payments.")
    System_Ext(creditBureau, "Credit Bureau", "Provides credit score checks.")

    Rel(customer, bankingSystem, "Views balances, transfers money")
    Rel(admin, bankingSystem, "Manages accounts, reviews transactions")
    Rel(bankingSystem, emailSystem, "Sends emails using")
    Rel(bankingSystem, paymentGateway, "Processes payments via")
    Rel(bankingSystem, creditBureau, "Checks credit scores")

Why use this template?

The C4 model is the standard for architecture documentation.

Standard C4 Notation

Uses official C4 model elements: Person, System, System_Ext, and Rel for standardized architecture docs.

Context Level View

Shows the big picture — who uses the system and what external systems it depends on.

Easy to Extend

Drill down from Context to Container and Component diagrams using the same C4 syntax.

Documentation Ready

C4 diagrams are the industry standard for software architecture documentation and ADRs.

Frequently asked questions

What is a C4 diagram?

C4 is a model for visualizing software architecture at four levels: Context (who uses the system), Container (high-level tech choices), Component (internal structure), and Code (class-level). This template starts at the Context level.

Can I create Container and Component diagrams too?

Yes. Open this template in Cybewave Studio and ask the AI to generate a Container diagram for the Banking System, or a Component diagram for any specific container. The AI uses Mermaid C4 syntax.

Is C4 compatible with Mermaid?

Yes. Mermaid supports C4Context, C4Container, C4Component, and C4Deployment diagram types natively. Cybewave Studio renders them with proper C4 styling.

Create your C4 diagrams

Free to start. 50 AI credits/month. No credit card required.

Get started for free →

Or explore pricing plans for teams.