Table of Contents

Patterns

The ideas that recur. Each one is applied in more than one place, and each is the shape to reach for when the same problem turns up again.

A pattern earns a page here by recurring — if something happened once and is unlikely to happen again, it is a decision, not a pattern, and belongs elsewhere.

Structure

How the code is divided, and how the pieces reach each other.

Self-registering module

A new domain is a project and a class. Nothing central changes.

Composition at the edge

When one screen needs four domains, the host assembles the answer — so domains stay ignorant of each other.

Port across a boundary

A domain that must be reachable from elsewhere publishes an interface; the caller depends on the contract, never the implementation.

Data and scope

What is stored, what is derived, and who is allowed to see it.

Conventions in the base

Timestamps, scoping and soft delete are enforced once in the context base. An entity opts in with a marker interface.

Scoped and bypass

The route decides whether queries are filtered to one customer. Handlers never filter by hand.

Compute on read

Persist only what cannot be derived. Recompute the rest, and materialise it at the moment it becomes a record.

Behaviour

How work gets done, and how it is judged.

Transactional outbox

Work that must not be lost is written as a queue row in the same transaction as the business change, then drained in the background.

Rule set with phases

Validation is a list of independent rules, each declaring when it applies — against a prospective change, or against the composed result.

Variation and contracts

How one codebase serves more than one region, provider and client.

Provider and router

A capability with more than one implementation sits behind an interface, with configuration choosing which one runs.

Two flavours of setting

Settings that change with the business live in the database and are editable live. Settings that change with a deployment live in configuration.

Envelope in, results out

Inbound writes share one request envelope and answer with one result per item, so a partial success is expressible.

Warning

Every page in this section is a placeholder. The catalogue and its groupings are settled; the content is not yet written.