Skip to content

Read Model Standard

Purpose

The Read Model Standard defines implementation-level rules for query projections.

Read Model Types

Type Purpose
Domain read model Query view owned by one module.
Workflow read model Task, approval, deadline, or process view.
Cross-domain projection Governed view combining references from multiple modules.
Mobile read model Compact view optimized for mobile experiences.
Analytics projection Reporting projection owned by Analytics.

Rules

  • Read models are not source facts.
  • Read models have explicit owner, source domains, and lineage.
  • TenantId and OrganizationId are required where source data is tenant-scoped.
  • Staleness and refresh behavior must be documented.
  • Read models should be rebuildable where practical.
  • Corrections happen in source domains, then projections update.
  • Read model writes are performed by projection builders or owning module services, not arbitrary consumers.

Projection Flow

flowchart LR
    Source[Source Domain]
    Event[Domain Event]
    Projection[Projection Builder]
    ReadModel[(Read Model Table)]
    API[Query API]

    Source --> Event
    Event --> Projection
    Projection --> ReadModel
    ReadModel --> API

Required Spec Fields

  • Owner.
  • Source domains.
  • Source events or read contracts.
  • Tenant and organization scope.
  • Refresh strategy.
  • Rebuild strategy.
  • Data freshness metadata.
  • Security and entitlement behavior.