Model integration
Say how systems reach each other: which interface a call lands on, which channel a message travels through, and what it carries. The guide grows one small model, a shop, a step at a time, and every step is a whole model that builds with no error or lint: type it into model/ in a repository kq init made, and check it with kq validate or in VS Code as you type. Every statement used here is described in full in Integration.
Draw the calls
A connection is written from the caller to what it calls, and always names its target: the interface it lands on, after the component's Code, and the protocol after over. The interface is created if it isn't declared: http lands on an http-api, grpc on a grpc-api, and so on for each protocol. How the caller authenticates follows, after auth. The web shop calls the order service, which calls the payment provider:
orders-api and payments-api exist because the two connections name them. a -> b with b a component is an error: say which interface. The last line says the storefront realizes Selling, as in Model the applications. See Connections.
Send messages through a broker
A broker is messaging infrastructure, and its channels are where publishers and receivers meet. A connection over a channel says the caller publishes to it and the other end receives from it. A path through a broker is two arrows, so it states two schemes: sender-auth for the sender's, then receiver-auth for the receiver's. Add a warehouse, and a Kafka broker the order service tells it through:
The broker's kind decides what its channels are: topics on kafka, queues on azure.storage-queue. A channel in a broker whose kind carries one kind of channel can also be created by the connection that names it. See Broker and channel.
Say what travels
An event says what happened, and is declared in the component that publishes it. A command asks one component to do something, and a query asks it for something; both are declared in the component that handles them. Each is about a domain object, which is required. carries, after every other part of a connection, names what it carries. Declare the order, where the order service holds it, and the event it publishes to the warehouse:
A publisher holds what its event is about: an event about data its publisher holds nowhere is KQ114. See Writing events, commands and queries and What a connection carries, and Model the data for the order's holding.
Walk through a scenario
A scenario is an ordered walk over connections you have already written, for one piece of behavior. It sits directly in the ecosystem. Each step names one connection by its ends, or one hop through a channel from the publisher to a subscriber, and may name the message it sends and a sentence saying what it does. Placing an order, first to last:
A step creates nothing: the connection it names must exist, KQ240. See Writing a scenario.
See what you modeled
The scenario view answers which system asks or tells which, in what order: a trimmed UML sequence diagram, with a lifeline per system and a row per step. Placing an order, drawn from the last step:
The diagram in words
Place an order · Scenario view
Scenario
- Place an order
Taking part
- Web Shop (User-facing app · Storefront)
- Order Service (Backend · Storefront)
- Payments (SaaS · Storefront)
- Warehouse (Backend · Storefront)
Steps
- Web Shop → Order Service: 1. Sends the order, http · orders-api, waits for an answer
- Order Service → Payments: 2. Takes the payment, http · payments-api, waits for an answer
- Order Service → Warehouse: 3. Tells the warehouse to ship it, through Orders, does not wait
In VS Code, the viewer draws it as you type. See Scenario view.
Where next
- Model the data: what each system holds, and how copies are kept in step.
- Mark bounded contexts: the contexts your calls and messages cross.
- Model people and access: who signs in, and with what.
© 2026 Extenza Works. All rights reserved.