Skip to main content

Architecture

Where Strategic Design answers what are our bounded contexts and how do they relate, this section answers what actually runs, what shape the code is in, and what happens in what order.

Every diagram here is Mermaid source inside the Markdown page, reviewed as text in pull requests, and generated from the real code, migrations and Helm values on each repository's origin/develop. Start with Diagram Notation if you want the legend before the content.

The views, and the question each answers​

PageNotationThe question it answers
Diagram Notation—How do I read the diagrams on this site, and what do they deliberately omit?
1. System ContextC4 Level 1What is this platform, who uses it, and what external systems does it touch?
2. ContainersC4 Level 2What are the separately deployable pieces — every process, database, the broker, the edge?
3. ComponentsC4 Level 3What is inside one service, and what rule keeps the hexagon honest?
Domain ModelUML classWhat are the aggregates, and what invariant does each one protect?
Data ModelsEntity-relationshipWhat is the real Postgres schema behind each context?
Runtime FlowsUML sequenceIn what order do messages travel for the key scenarios, including failure branches?
IQVO Assets Control—Where is the fleet's design-time registry, what does it read, and what are its own surfaces?

How the views fit together​

A single bounded context appears in all of them, at different zoom levels. For fulfillment-execution:

  • In System Context it is invisible — one part of a single box.
  • In Containers it is four long-running Go processes (cmd/execution, cmd/mcp, cmd/fulfillment-projector, cmd/fulfillment-reports), a cmd/sweep CronJob entrypoint and two Postgres databases.
  • In Components it is a hexagon: three inbound adapters, a use-case layer, a pure domain, and outbound adapters implementing ports.
  • In Domain Model it is four aggregate roots — Task, Station, Package, OrderConsolidation — and the capability and lease rules they enforce.
  • In Data Models it is ten OLTP tables (four aggregate tables plus local copies and infrastructure) with no foreign keys at all, which is the previous point expressed in SQL. A further four tables sit in its analytical database.
  • In Runtime Flows it is a participant in the claim, completion and release sequences.

Reading them in that order is the fastest way to understand any one context.

Three things worth knowing up front​

The fleet is bigger than "twenty services". Eighteen of the nineteen domain contexts on this site ship four binaries (OLTP, MCP, projector, reports) and two databases each, because the analytical read side is a separate process family from the operational one; fulfillment-execution adds a fifth, cmd/sweep, the entrypoint of its two sweep CronJobs. warehouse-ops-agent is one binary with no database. The nineteenth domain context, outbound-shipping, is released as v0.1.0 with two binaries and one database and is registered in warehouse-infra develop (PR 205) but not applied. All twenty are registered in warehouse-infra develop, returns-processing and exception-management since 2026-10-22 and outbound-shipping since 2026-11-11. That is Containers.

The domain layer depends on nothing, and CI proves it. Every context has an arch-go fitness test that fails the build if an adapter type reaches into the domain, or if the OLTP layers import the analytics region. That is Components.

Tables and aggregates are deliberately not one-to-one. Where you see two tables with no foreign key between them, that is usually an aggregate boundary being honoured rather than a missing constraint. Compare Domain Model against Data Models to see it.