
What changed (Nov 14, 2026): Rewrote the guide around five original example diagrams (online store, mobile banking app, hospital system, SaaS integrations and an ATM Level 0 DFD), added a symbols image and table for C4 and DFD notation, a C4 system context section, a comparison with DFD, container, use case and sequence diagrams, tool-neutral drawing steps with Mermaid code, common mistakes, FAQs and sources. Removed the concept map sections, the AFFiNE-vs-competitors table and unsourced statistics, and replaced the shared cover.
A system context diagram shows one system as a single box in the middle of the page, the people and other systems that use it or that it depends on around the edge, and a labeled arrow for every interaction between them. It answers one question: where does our system stop, and what does it talk to? Because it hides everything inside the box, both developers and non-technical stakeholders can read it, which is why teams draw it first, before any detailed design.
This guide gives you five worked context diagram examples (an online store, a mobile banking app, a hospital system, a SaaS app with integrations and an ATM), the symbols and rules for both the C4 model and the classic data flow (Level 0 DFD) style, and a step-by-step method for drawing your own.
Disclosure: AFFiNE publishes this guide and makes a whiteboard app. All five examples are fictional and were drawn for this article. The method works in any diagramming tool, and we show AFFiNE as one way to do it, next to other options.
Update note (November 14, 2026): We rewrote this guide around real example diagrams, added the C4 system context notation, and removed claims we could not source.
A system context diagram (also called a context diagram, a context data flow diagram or a Level 0 DFD) is a high-level picture that draws the boundary between a system and its environment. Wikipedia's system context diagram entry describes it as a diagram that "defines the boundary between the system, or part of a system, and its environment, showing the entities that interact with it." The requirements glossary from Karl Wiegers and Joy Beatty's Software Requirements puts it more bluntly: a context diagram "identifies objects outside the system that exchange data with the system, but it shows nothing about the system's internal structure or behavior."
Every context diagram has the same three building blocks:
Teams use context diagrams early in a project to agree on scope. Drawing the outside systems forces questions that text requirements often skip: does login use our own accounts or a company identity provider? Who owns the payment integration? Which data comes from a system we do not control? Once everyone agrees on the picture, you can zoom in, either into a Level 1 data flow diagram or into a C4 container diagram.
The first four examples use the C4 model notation, which is what most software teams mean by "system context diagram" today. The fifth uses classic data flow notation, which is what many business analysis and systems analysis courses mean by "context diagram". Each one is a simplified, fictional system: copy the structure, not the details.

An online store is the most common context diagram example because almost everyone understands it. The store is the system in scope. Shoppers and store staff are the two people who use it, and three outside services do work the store does not do itself.
What to notice:

In this example the system in scope is the banking app together with the back end the app team owns. The bank's core banking system is drawn outside the box because a different team owns it, even though it belongs to the same bank. C4 defines a software system as something a single team builds, owns and can see inside; systems you depend on but do not own sit outside the boundary (c4model.com).
What to notice:

Healthcare systems are a good test of a context diagram because there are many people and many neighboring systems. Here the system in scope handles registration, scheduling, admissions and billing. Clinical records, lab work and insurance claims live in other systems.
What to notice:

For a SaaS product, the context diagram is mostly a map of integrations. This project management app depends on a customer's identity provider for single sign-on, a billing provider for subscriptions, and two tools it integrates with.
What to notice:

The ATM is the classic textbook example, and here it is drawn in Yourdon-DeMarco data flow notation: the system is one circle (process 0), external entities are rectangles, and each arrow is labeled with the data that moves, written as a noun.
What to notice:
If you start from this style, the next step is to break the circle into processes and data stores. Our data flow diagram guide shows the same move from Level 0 to Level 1 with a worked example.

The two styles use different shapes for the same four things. Pick one style for a set of diagrams and stay with it.
| Element | C4 system context | Context DFD (Level 0) |
|---|---|---|
| System in scope | One box, usually highlighted | One circle or rounded rectangle, numbered 0 |
| People | Person shape | Rectangle (external entity) |
| Other systems | Box in a neutral color, marked external | Rectangle (external entity) |
| Relationships | One-way arrow labeled with what it does ("Sends card payments to") | Arrow labeled with the data that moves ("Payment request") |
| Not shown | Containers, databases, technologies | Data stores, sub-processes |
Rules that apply to both:
The C4 model, created by Simon Brown, describes software architecture as four levels of zoom: system context, containers, components and code. The system context diagram is level 1, the most zoomed-out view. According to c4model.com:
The C4 site also says the focus should be on people and software systems "rather than technologies, protocols and other low-level details." That is the main difference from a Level 0 DFD in practice: C4 labels describe relationships, while DFD labels describe data.
Two related C4 diagrams are worth knowing:
| Diagram | What it shows | Shows the inside of the system? | Best for |
|---|---|---|---|
| Context diagram / C4 system context | The system as one box, its users and neighboring systems | No | Agreeing on scope with everyone |
| Level 1 data flow diagram | Main processes, data stores and data flows inside the system | Yes, at process level | Analysing how data moves |
| C4 container diagram | Applications and data stores inside the system, with technologies | Yes, at deployable-unit level | Developers and operations |
| Use case diagram | Actors and the goals they achieve with the system | No, but lists functions | Capturing functional requirements |
| Sequence diagram | Messages between parts over time for one scenario | Often | Designing one interaction in detail |
For the deeper levels, see our guides to data flow diagrams, UML sequence diagrams, pipeline diagrams and ER diagram tools for database design.
These steps work on paper, on a whiteboard or in any diagramming tool.
You can also write the diagram as code. Mermaid and C4-PlantUML both have C4 syntax. This is the online store example in Mermaid's C4Context syntax:
C4Context
title System Context diagram for an online store
Person(shopper, "Shopper", "Buys products online")
Person(staff, "Store staff", "Manages catalog, orders and refunds")
System(store, "Online store", "Product catalog, cart, checkout and order tracking")
System_Ext(pay, "Payment provider", "Authorizes and captures card payments")
System_Ext(ship, "Shipping carrier", "Creates labels and tracking numbers")
System_Ext(mail, "Email service", "Sends transactional email")
Rel(shopper, store, "Browses products and places orders using")
Rel(staff, store, "Manages products, stock and refunds using")
Rel(store, pay, "Sends card payments to")
Rel(pay, store, "Returns payment results to")
Rel(store, ship, "Books shipments and gets tracking from")
Rel(store, mail, "Sends order emails using")
Rel(mail, shopper, "Delivers order confirmations to")
In AFFiNE, you draw a context diagram in Edgeless mode, the whiteboard view of a doc:
AFFiNE AI can generate a mind map from a prompt, which is a quick way to brainstorm the list of actors, but it does not draw a context diagram for you; the layout and labels are manual. Other good options are draw.io, which has C4 shapes, Lucidchart and Miro for drag-and-drop diagrams, and Structurizr, C4-PlantUML or Mermaid if you want diagrams as code. The C4 site keeps a longer tooling list.
AFFiNE does not have a dedicated context diagram template yet. These free templates are the closest starting points:
A context diagram is a high-level diagram that shows a system as a single shape, the people and external systems that interact with it, and the information or relationships between them. It defines the system's boundary and shows nothing about how the system works inside.
Usually. Most sources treat the context diagram as Level 0, the top of a set of data flow diagrams where the whole system is one process. A few textbooks call the first breakdown into processes Level 0 and put the context diagram above it, so check which convention your team or course uses. In the C4 model, the system context diagram plays the same role but uses boxes and person shapes and labels relationships rather than data.
A context diagram shows the system as one process with external entities. A Level 1 DFD opens that process up into its main sub-processes and adds data stores, while keeping the same external entities and flows.
No. Databases and other data stores are inside the system, so they belong on a Level 1 DFD or a C4 container diagram. The exception is a database owned by another team or vendor that your system reads from directly; treat it as an external system.
It is level 1 of the C4 model: one software system in the center, surrounded by its users and the other software systems it interacts with. It leaves out technologies and protocols and is meant to be readable by technical and non-technical people.
Each context diagram has one system in scope. If you want to show several systems and how they connect, draw a system landscape diagram instead. You can also draw a separate context diagram for each major system.
Any tool with shapes and labeled connectors works: whiteboards such as AFFiNE or Miro, diagram tools such as draw.io or Lucidchart, or diagrams-as-code tools such as Structurizr, C4-PlantUML and Mermaid.
Checked on November 14, 2026: