
☁️ SaaS & Cloud · C4 Architecture · Pro
Services that talk through events instead of direct calls: an order service publishes events that inventory, payments, notifications and analytics react to.
C4 Architecture diagrams are part of Pro. Anyone can view this one; generating and editing it needs Pro.
Drawing diagram…
Event-driven architecture: the order service writes an order and publishes OrderPlaced to Kafka using the outbox pattern. Inventory, payment, notification and analytics services consume the topic independently; payment publishes PaymentCompleted or PaymentFailed which the order service consumes to update status. A schema registry manages Avro event schemas, and a dead-letter topic holds events that fail processing.
C4Container
title Event-Driven Order Processing
Person(customer, "Customer", "Places orders")
System_Boundary(eda, "Event-Driven Platform") {
Container(order, "Order Service", "Java", "Writes order and outbox")
ContainerQueue(kafka, "Kafka", "Topics: orders, payments", "Event backbone")
Container(schema, "Schema Registry", "Avro", "Event contracts")
Container(inv, "Inventory Service", "Go", "Reserves stock")
Container(pay, "Payment Service", "Java", "Charges customer")
Container(notify, "Notification Service", "Node.js", "Email and SMS")
Container(analytics, "Analytics Sink", "Kafka Connect", "Streams to warehouse")
ContainerQueue(dlq, "Dead-letter Topic", "Kafka", "Failed events")
}
Rel(customer, order, "Places order")
Rel(order, kafka, "OrderPlaced")
Rel(kafka, inv, "Consumes")
Rel(kafka, pay, "Consumes")
Rel(kafka, notify, "Consumes")
Rel(kafka, analytics, "Consumes")
Rel(pay, kafka, "PaymentCompleted")
Rel(kafka, order, "Updates status")
Rel(order, schema, "Validates schema")
Rel(notify, dlq, "On failure")How a microservices app runs on Kubernetes in the cloud: ingress, namespaces, services with multiple replicas, managed databases and monitoring.
A typical CI/CD pipeline from a pull request to production: build, tests, security scans, staging deploy, approval and a canary release.
The authorization code flow with PKCE used by most modern web and mobile apps to log users in through an identity provider.
A B2B SaaS product serving many customer organisations from one platform: tenant-aware services, per-tenant data isolation, billing and admin.
The classic three-tier web app on AWS: CloudFront and a load balancer, an autoscaling app tier in private subnets, and a Multi-AZ database.
The states of a SaaS customer's subscription: trial, active, past due with retries, paused, cancelled and expired.