Mental model
Blue blocks do not integrate in the usual sense. They compose. That distinction is one of the most important ideas in the system.
To integrate usually means: system A calls system B, schema mapping is custom, assumptions are hidden in code, every new connection is a new implementation project.
In Blue, blocks compose because they already share a common shape: participants, rules, state, record. That means one block can reference, trigger, constrain, or reuse another — without becoming the same thing.
One document mentions another by identifier — typically a BlueId or a session id — without copying its contents.
Example: An order document carries a payNote field whose value is a reference (e.g. { blueId: ... }) to the matching PayNote. Both blocks remain independent; they just point at each other.
An event in one document causes a request in another. The two documents stay separate; only a request is delivered.
Example: A delivery confirmation document, when the courier marks status delivered, triggers a Complete Payment request on the linked PayNote. The PayNote then runs its own rules to decide whether to complete.
One document acts as a precondition or boundary on actions taken inside another.
Example: A mandate constrains a payment: the payment's rules require any operation made by the agent to be valid under the mandate (allowed source, max amount, conditions). The mandate is not the payment, but no payment passes without it.
A pattern (a contract type, a sub-document, a workflow) defined once is reused across many blocks via repo.blue.
Example: A service document accesses a shared linked folder of supporting docs (terms, change log, rate sheet). The folder pattern is reused everywhere a service exists. Each instance is a separate document, but the shape is the same.
A simple commerce flow:
This is not one giant document. It is several blocks working together — references, triggers, constraints, and reused patterns.
Different interactions have different participants, different trust requirements, different lifecycles, and may be reusable independently. For example:
Composition keeps those pieces independent.
Participants: buyer, seller. Rules around acceptance and shipping.
Participants: payer, payee, bank. Conditions on completion.
Participants: payer, payee, guarantor, maybe courier or verifier. Governs what happens with the funds.
Participants: owner, agent. Defines what the agent is allowed to do.