Skip to main content

r/uxxu


Vive With Architecture!

Making Infrastructure a First-Class Citizen in the C4 Model
Making Infrastructure a First-Class Citizen in the C4 Model
Making Infrastructure a First-Class Citizen in the C4 Model

Making Infrastructure a First-Class Citizen in the C4 Model

The C4 Model is one of my preferred architecture modeling frameworks.

It is hierarchical, readable, audience-aware, and pragmatic. It works extremely well with development teams because it optimizes for communication instead of formalism.

I use it regularly at work.

But over time I’ve started feeling that one part of the model no longer scales well with modern cloud-native systems:

Infrastructure architecture.

This post is not a critique of C4. Quite the opposite. C4 solved a major problem in software architecture documentation.

But infrastructure has changed dramatically since the model was introduced.

And I think modern systems now need infrastructure to become a first-class architectural concern instead of remaining mostly attached to Deployment Diagrams.

The Problem

In many modern systems, infrastructure is no longer an implementation detail.

It directly shapes:

  • security

  • reliability

  • scalability

  • compliance

  • cost

  • blast radius

  • operational ownership

  • incident response

Today, infrastructure decisions include things like:

  • Kubernetes topology

  • VPC segmentation

  • cloud accounts and organizational boundaries

  • private networking

  • managed services

  • service mesh policies

  • autoscaling behavior

  • multi-region strategies

  • compliance zones

  • workload isolation

  • IAM and trust boundaries

These are not merely “operations concerns.”

They are architectural concerns.

Yet in the current C4 model, most of this information ends up squeezed into a Deployment Diagram.

The result is usually one of the following:

  • overloaded diagrams

  • mixed audiences

  • unclear ownership

  • poor navigability

  • diagrams that become obsolete quickly

  • infrastructure and software concerns blended together

The Deployment Diagram becomes a catch-all view for everything runtime-related.

And in large cloud-native systems, that simply does not scale well.

The Core Observation

The original C4 hierarchy models software extremely well:

Level Purpose
C1 — System Context What does the system do?
C2 — Containers What applications/services exist?
C3 — Components What are the internal building blocks?
C4 — Code How is the code structured?

But modern architecture also needs to answer another set of questions:

  • Where does the software run?

  • Which infrastructure boundaries constrain it?

  • Which managed services does it depend on?

  • Which runtime actually executes it?

  • Which compliance zone contains it?

  • What is the failure blast radius?

  • Which networking boundaries isolate it?

  • Which operational platform owns it?

These are architectural questions too.

But currently they do not have their own dedicated modeling hierarchy.

Proposal: A Parallel Infrastructure Axis

Instead of endlessly expanding Deployment Diagrams, I think infrastructure should have its own parallel architectural axis.

Something like this:

Level Purpose
I1 — Infrastructure Context Accounts, regions, trust boundaries, environments
I2 — Infrastructure Landscape VPCs, clusters, gateways, managed services
I3 — Infrastructure Runtime Namespaces, deployments, policies, autoscaling, runtime config

The important idea is this:

So instead of mixing both into one canvas:

  • software diagrams model software

  • infrastructure diagrams model infrastructure

  • explicit relationships connect them

Why This Helps

1. Clearer Separation of Concerns

Today many deployment diagrams mix:

  • software structure

  • cloud topology

  • networking

  • runtime behavior

  • deployment details

  • security boundaries

into one giant diagram.

Separating concerns makes each diagram easier to understand.

A software architect may care about service boundaries.

A platform engineer may care about cluster topology and networking.

A security team may care about trust zones and IAM domains.

These are different views.

2. Infrastructure Has Its Own Hierarchy

Infrastructure itself now has architectural structure.

For example:

AWS Organization
 └── Production Account
      └── eu-west-1
           └── Payments VPC
                └── EKS Cluster
                     └── Payments Namespace

That is a real architecture hierarchy.

And it affects the system as much as the software decomposition does.

3. Better Cloud-Native Modeling

Modern systems rely heavily on managed infrastructure:

  • Kubernetes

  • service meshes

  • managed databases

  • queues

  • cloud IAM

  • API gateways

  • observability platforms

These are not passive deployment targets anymore.

They actively influence runtime behavior.

For example:

  • retry semantics

  • scaling behavior

  • network isolation

  • resiliency patterns

  • security posture

  • data residency

  • failover boundaries

All of these are architectural characteristics.

4. Better Mapping Between Software and Runtime

Instead of relying on spatial placement inside a Deployment Diagram, relationships become explicit.

Examples:

Payment API       runs_on              EKS Cluster
Payment API       exposed_through      API Gateway
Fraud Worker      consumes_from        Kafka
Payment System    constrained_by       PCI Zone

This creates a much more navigable architecture model.

A Missing Piece: Mapping Views

One thing I realized while thinking about this:

If software and infrastructure become separate axes, we still need a way to connect them cleanly.

So I think a third category is needed:

Mapping Views

Examples:

View Purpose
M1 Systems → environments/accounts
M2 Containers → runtime platforms
M3 Components → runtime/runtime policies

This avoids overloading either side.

Important Constraint: Keep It Lightweight

I do not think this should become another heavyweight enterprise architecture framework.

One of the biggest strengths of C4 is simplicity.

So the infrastructure axis should remain pragmatic and selective.

A good rule might be:

Meaning:

  • security

  • reliability

  • scalability

  • operability

  • compliance

  • cost

  • failure isolation

Not every Terraform resource deserves to appear in architecture diagrams.

This Is Not a Replacement for C4

I see this as an extension of the model, not a replacement.

Traditional Deployment Diagrams are still perfectly fine for:

  • smaller systems

  • monoliths

  • simple deployments

  • low operational complexity

But for modern cloud-native platforms, infrastructure has become too important to remain a secondary deployment concern.

Tentative Name

A few names I’ve been considering:

  • C4+I

  • Infrastructure Axis for C4

  • C4 Infrastructure Extension

  • Runtime Architecture Axis

Still undecided.

Open Questions

I’d love feedback from others working on large-scale distributed systems.

Some questions I’m still thinking about:

  • Does infrastructure deserve its own hierarchy?

  • Should runtime/platform architecture be modeled separately from software architecture?

  • Would this improve clarity or just introduce more diagrams?

  • How would you define the abstraction boundaries?

  • Would this overlap too much with ArchiMate or other EA frameworks?

  • What would be the minimal useful version of this idea?

Curious to hear what others think.


UxxU C4 model
UxxU C4 model
media poster

codeToC4
codeToC4
r/uxxu - codeToC4

LLMs like C4 Diagrams
LLMs like C4 Diagrams

I've been experimenting with feeding architecture context to LLMs for the past few months and stumbled onto something that actually works well — structured C4 diagrams are dramatically better than README files, wiki pages, or ad-hoc descriptions for getting a model to reason about your system.

Here's why I think it works:

C4 maps perfectly to how LLMs need to think at different tasks

The C4 model has four levels — System Context, Container, Component, and Code. Each one happens to correspond to the kind of reasoning you want from a model at different stages:

  • System Context → "who are the users, what are the boundaries, what external systems are we touching?" Great for product questions, incident triage, onboarding prompts

  • Container → "what services exist, what technologies, how do they communicate?" Great for architecture reviews, choosing where to add a new feature, understanding blast radius

  • Component → "what's inside this service, what are the internal moving parts?" Great for code generation within a bounded context

  • Code → usually just the actual files, which the LLM already has access to via tools

So instead of dumping a 4000-word Confluence page, you give the model exactly the level of abstraction the task needs.

The problem with how most people give LLMs architecture context

Most people do one of three things:

  1. Paste a README that mixes high-level intent with implementation details at random

  2. Point the LLM at the codebase directly and hope it figures out the structure

  3. Write a prompt like "we have a microservices backend with Postgres" and expect precision

None of these tell the model where the boundaries are, who the actors are, or which systems are internal vs external. C4 diagrams encode all of that explicitly.

What this looks like in practice

I compile the C4 diagrams into a structured prompt block that gets prepended to every conversation about the system. It looks roughly like:

## System Context
Users: [list of actors with descriptions]
Internal systems: [...]
External dependencies: [Stripe, SendGrid, etc.]

## Container Level
Service: API Gateway — Node.js, handles auth and routing
Service: Order Service — Python, owns the order lifecycle
Store: PostgreSQL — source of truth for orders and users
...

## Key Integration Points
API Gateway → Order Service: REST, internal VPC
Order Service → Stripe: webhook-driven payment confirmation
...

The model stops hallucinating services that don't exist. It stops suggesting you "just add a field to the database" when the database is a third-party system. It routes questions to the right service.

The thing nobody talks about: external systems change model behavior more than anything

When you mark a system as external in C4, you're telling the model "we don't own this, we can't change it, we have to work around it." That distinction — internal vs external — has a huge effect on the quality of suggestions. Without it, the model treats Stripe like it's your own service and suggests changing its behavior.

What I'm building on top of this

I'm working on a tool that compiles C4 diagrams into structured LLM prompts automatically, with format options for different use cases (narrative for general context, compact for tight token budgets, CLAUDE.md format for persistent project memory). Happy to share more if there's interest.

Has anyone else experimented with structured architecture context for LLMs? Curious whether people have found other formats that work — ADRs, OpenAPI specs, ERDs. What actually sticks vs what the model ignores.

This is exactly why I built this into uxxu.io

I got tired of manually copy-pasting diagram context into every LLM conversation. So I built this directly into uxxu — the C4 diagramming tool I've been working on.

The MCP server for uxxu now exposes your diagrams as structured context that any LLM-powered tool (Claude, Cursor, Copilot Chat, anything MCP-compatible) can pull automatically. You draw your architecture in C4, and the model gets the right level of abstraction for whatever task it's doing — system context for high-level questions, container level for service decisions, component level for code generation.

No more pasting docs. No more hoping the model figures out your system from the codebase. The diagram is the prompt.

If you're already using C4 to document your architecture, this is the missing piece — your diagrams stop being something you maintain for other humans and start being something that actively improves every AI-assisted task on your codebase.

Would love to hear if others have tried feeding structured architecture context to LLMs and what format worked for you.


👋 Welcome to r/uxxu - Introduce Yourself and Read First!
👋 Welcome to r/uxxu - Introduce Yourself and Read First!

🚀 Welcome to r/Uxxu — Design. Understand. Evolve Your Architecture

Hey everyone 👋

Welcome to r/Uxxu, the community for people who care about how software systems are actually designed.

Uxxu is a collaborative platform built around the C4 model that helps teams move beyond static diagrams into living architecture — where systems are connected, navigable, and continuously evolving.

💡 What this community is for

This is a space to:

  • Share your architecture diagrams and get feedback

  • Discuss C4 model best practices (context, container, component, deployment)

  • Explore system design patterns and tradeoffs

  • Talk about dependencies, scalability, and real-world architecture challenges

  • Learn how to better document and evolve complex systems

🧠 Why this matters

Most teams still rely on:

  • disconnected diagrams

  • outdated documentation

  • scattered knowledge across tools

We’re here to change that.

This community is about building a better way to design, understand, and communicate architecture.

📌 Getting started

If you're new, feel free to:

  • Introduce yourself

  • Share what you're building

  • Post a diagram or idea you'd like feedback on

⚙️ A few simple guidelines

  • Keep discussions constructive and thoughtful

  • No spam or self-promo without context

  • Focus on learning, sharing, and improving

If you're working on systems, thinking about architecture, or just trying to make sense of complex software — you're in the right place.

Let’s build better systems together.

— The Uxxu Team