C4 Model

C4 model diagrams

Generate C4 model diagrams with AI. System Context, Container, Component, and Code views — in Mermaid C4 or PlantUML C4 syntax.

The four levels of C4

L1

System Context

Big picture. Your system as a box, showing users and external systems it interacts with. For stakeholders and new team members.

L2

Container

Zoom in. Applications, services, databases, and message brokers. How the system is deployed and what tech stack is used.

L3

Component

Inside a container. Major modules, packages, and their relationships. For developers working on a specific service.

L4

Code

Class-level detail. UML class diagrams or entity-relationship diagrams. For detailed design of a specific component.

C4 in Mermaid syntax

C4Context
  title System Context — E-Commerce Platform

  Person(customer, "Customer", "Browses and buys products")
  System(ecommerce, "E-Commerce Platform", "Handles orders, payments, inventory")
  System_Ext(payment, "Payment Gateway", "Processes credit card payments")
  System_Ext(shipping, "Shipping Provider", "Delivers orders")

  Rel(customer, ecommerce, "Places orders")
  Rel(ecommerce, payment, "Sends payment requests")
  Rel(ecommerce, shipping, "Creates shipments")

Paste this into Cybewave or let AI generate it from a description.

Start building C4 diagrams

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

Get started for free →