v1.0.0stable

C4 Model Software Architecture Projection

How EdgeNode compiles digital twin semantic hierarchies, structural boundaries, and component definitions into standardized C4 software architecture diagrams.

EdgeNode projects digital twin structural ontologies into Simon Brown's C4 model for software architecture. By translating root structural units into system boundaries, hierarchical child nodes into encapsulated components, and relationship types into labeled dependency arrows, the compiler generates clear, scope-driven architectural views.

High-Level C4 Mapping Overview

While ArchiMate answers which enterprise layer an entity inhabits, C4 models how software building blocks are scoped, contained, and connected.

Domain Concept C4 Element Visual Notation
Root Structural Unit System Boundary Dashed, rounded grouping container
Node Tree Hierarchy Structural Containment Child elements nested inside parent box
Dominant Definition Type C4 Element Kind Color-coded rectangle with [Kind] badge
Accountable Role Element Description Resp: <role> governance line
Dominant Relation Type Dependency Arrow Solid arrow labeled <verb> [<latency>s]

Core Design Principles Behind the Mapping

  1. Hierarchy is Structural Containment: The twin's node tree directly determines C4 nesting. Child nodes are rendered inside the boundary box of their parent node.
  2. Type-Driven Kinds: The C4 element classification is strictly determined by Definition type rather than name heuristics.
  3. Canonical C4 Visual Syntax: Renders using official C4 color schemes, standardized element text stacks (Name, [Kind], [Technology], Description), dashed boundaries, and plain solid arrows.
  4. Scope Over Metrics: Unlike ArchiMate, C4 diagrams omit labor costs and processing durations. C4 communicates architectural scope, preserving operational metrics solely as latency suffixes on dependency connectors.

1. System Boundaries and Structural Containment

The layout engine partitions nodes into Boundaries (Groups) and Leaf Elements:

C4 system boundary enclosing nested container and component elements
Figure 1.0: Root structural units compiled into C4 system boundaries enclosing child elements.
Boundary Groups
Rendered as dashed, grey-stroked, rounded boundary containers displaying the structural unit's name. Group nodes are never rendered as standalone boxes; they act as the bounding context. Edges terminating directly on group nodes are omitted because containment expresses the relationship.
Leaf Elements
All child nodes and non-boundary root entities are rendered as concrete C4 blocks positioned inside their respective parent boundaries.

2. Element Classification & Palette

Leaf nodes are classified into standardized C4 kinds based on their Definition type in the active semantic twin:

Definition Type C4 Element Kind Technology Annotation
structural_unit (nested) Software System
process Container [Microservice]
concept Component [Policy Engine]
artifact Database [Relational Store]
location (Unmapped)
💡 Element Anatomy Stack
Each rendered C4 box displays four structured text lines:
  1. Element Name: Primary identifier in bold text.
  2. Kind Badge: [Container], [Component], or [Database].
  3. Technology Line: Architectural descriptor (e.g., [Microservice]).
  4. Governance / Description: Resp: <accountable role> sourced from definitions.accountable_id.

3. Dependency Connectors & Latency Labels

Unlike ArchiMate, which uses multiple distinct arrowheads (diamonds, triangles, open arrows) to distinguish relationship verbs, C4 standardizes on plain solid arrows:

  • Connector Semantics: All relationships render as solid directional arrows.
  • Label Syntax: The connector label explicitly states the domain verb and cumulative latency: <verb> [<cumulative latency>s] (e.g., requires [0.010s]).
Domain Relation ArchiMate Notation C4 Model Notation
requires, couples Serving (Solid + Standard Arrow) Solid Arrow (requires [Xs])
composes Composition (Solid + Filled Diamond ◆) Visual Containment inside Boundary
constraints, influences Influence (Dashed + Standard Arrow) Solid Arrow (constraints [Xs])
aligns, extends Realization / Specialization (Hollow △) Solid Arrow (aligns [Xs])

4. Layered Layout Algorithm

The C4 rendering engine structures elements using longest-path topological layering:

  • Columns (Stage Rank): Calculated via longest-path dependency depth over all relationships except composes. Composition is treated as structural containment rather than directional flow.
  • Rows (Tracks): Within each boundary and column intersection, elements stack vertically. Unparented elements occupy a shared baseline track.
  • Boundary Wrapping: Dashed bounding boxes expand dynamically to encompass all internal child components.

Worked Example: Trading Platform Architecture

Consider an enterprise digital twin modeling an electronic trading environment:

Data Model

  • Root Boundary: Trading Platform (Definition type = 'structural_unit', parent_id = NULL).
  • Child Nodes:
    • Order Service (Definition type = 'process', parent = Trading Platform) \rightarrow Container.
    • Ledger (Definition type = 'artifact', parent = Trading Platform) \rightarrow Database.
    • Risk Rules (Definition type = 'concept', parent = Trading Platform) \rightarrow Component.
  • Relationships:
    • Order Service requires [0.010s]\xrightarrow{\text{requires [0.010s]}} Ledger.
    • Order Service couples [0.005s]\xrightarrow{\text{couples [0.005s]}} Risk Rules.

Comparison Across Modeling Standards

Dimension BPMN 2.0 VSM (Lean) ArchiMate 3.x C4 Model
Core Lens Process choreography Flow economics Layered enterprise structure Software scope & boundaries
Grouping Role Swimlanes None Architectural Layers Structural Boundaries
Signature Element Gateways & Events Triangles & Sawtooth Ladder Stereotyped Layer Blocks Dashed Boundaries & Kind Tags
Metrics Shown Latency annotations VAT, PLT, PCE % Labor & Asset Costs, Times Latency on arrows only