Platform referenceArchitecture
Ontology-based design
Why Fabric models the world as object types, actions, and events instead of CRUD tables.
A Fabric application is not a CRUD app. The unit of design is the ontology — a typed vocabulary of objects, actions, events, and policies — not a set of tables.
What an ontology is here
In Fabric, an ontology consists of:
- Object types — kinds of things the system reasons about (
Vehicle,Party,Offer,ActionInvocation). Registered as PascalCase strings viaregisterObjectType. - Actions — the only legal verbs that mutate domain state. Each action has a stable ID like
lending.accept_offerand is registered as anActionDefinition. - Events — append-only facts emitted by actions. Each event has an
eventType(e.g.OfferAccepted) and a typed payload. - Policies — predicates evaluated before an action runs, returning
pass,warn, orblock. - State machines — declarative transition graphs that constrain which action can move which entity from which state to which state.
These five concepts are the only first-class registry types in the platform. Everything else (UI, queries, analytics) is a projection of them.
What this buys you
- One mutation path. Because actions are the only verbs, every change to domain state is captured as an
ActionInvocationrow. There is no "small write" that escapes audit. - Replayable state. Because events are immutable and sequenced, any read model can be rebuilt from history. Bugs in projection logic don't lose source data.
- Policy is composable. Policies attach to action IDs, not call sites. A policy like
lending.credit_pull_consent.v1runs the same way whether the action was invoked from the UI, an agent, a webhook, or a cron. - Agents become first-class. An LLM holding a credential calls the same
invokeActionAPI a human does. No special "AI endpoint" exists, so no special audit gap exists.
Where the ontology lives
| Concern | Owner |
|---|---|
| Cross-industry governance types | @fabricorg/platform/objects (pre-registered) |
| Vertical object types | The vertical's FabricModule.objectTypes |
| Action definitions | The vertical's FabricModule.actions |
| Event types | The vertical's FabricModule.eventTypes |
| Policies | The vertical's FabricModule.policies |
| State machines | The vertical's FabricModule.stateMachines |
The platform itself ships zero vertical vocabulary. There is no User, Order, or Customer in @fabricorg/platform. See built-in entities for the small fixed set the platform does pre-register.
Diagram
See also
- Mutation pipeline — how the ontology is actually executed.
- Built-in entities — the fixed types the platform reserves.
- Module contract — how a vertical declares its ontology.