Skip to content

Complete Entity Grammar

The Live Vocabulary Inventory is the companion raw index of every exported type. This page explains how those terms compose and which properties authors can configure.

This page is the implementation-backed reference for describing an entity from its smallest value atom through database generation, protocol execution, and application rendering.

It answers two questions:

  1. What can a Blueprint author configure?
  2. Which declarations are semantic objects, typed references, extension keys, or physical/wire identifiers?

The grammar is industry-neutral. Pharma, finance, public-sector, logistics, and other domains supply different declarations; they do not get different Blueprint runtimes.

Universal vocabulary identity

Every renderable Blueprint vocabulary item crosses the explorer and protocol boundary with one canonical schema identity:

PropertyContract
schemaTypeRequired semantic discriminator. Consumers dispatch only on this value.
nameRequired stable vocabulary name. It is not title-cased or localized.
titleRequired human-facing display string. It may be explicitly authored or deterministically derived during assembly.
codeOptional exact developer identifier such as iam.user or mfg.equipment.cleaning.release. Its case and punctuation are preserved.
pluralTitleOptional plural display string for collection surfaces.
descriptionOptional explanatory display copy.
i18nKeyOptional localization lookup key.

Columns use the same nomenclature: name is the stable projected field name and title is the visible column heading. The canonical wire contract does not introduce a parallel label property. A renderer may call a text widget a label internally, but it must not manufacture Blueprint identity from UI terminology.

The typed sealed ProjectionResult hierarchy remains the cardinality and data shape contract. schema.schemaType remains its only semantic discriminator; name, title, and code are identity and display metadata, never alternate type tags. The wire-level shape value (collection, item, or custom) selects the sealed data envelope only; it does not identify business semantics.

The authoring rule

Use this precedence whenever one declaration points at another:

  1. Hold the declaration object when both objects are in the same Dart graph.
  2. Hold a typed Ref when the target is cross-module, configuration data, or a registered extension.
  3. Use a string only at an explicitly named physical, protocol, registry, or presentation boundary.

Fields follow that rule rigorously:

dart
abstract final class AreaFields {
  static const tenantId = TenantIdField();
  static const code = CodeField();
  static const name = NameField();
  static const status = StatusField(
    'status',
    AreaStatus.values,
    dbEnumName: 'area_status',
  );
  static const createdAt = TimestampField('created_at');
}

const areaUi = EntityUI(
  list: ListUI(
    layouts: [
      TableUI(
        columns: [
          TableColumnUI(field: AreaFields.code, required: true),
          TableColumnUI(field: AreaFields.name),
          TableColumnUI(
            field: AreaFields.status,
            appearance: UIColumnAppearance.status,
          ),
          TableColumnUI(
            field: AreaFields.description,
            visible: false,
          ),
        ],
        defaultFilter: Compare(
          AreaFields.status,
          PredicateOp.equals,
          'active',
        ),
        defaultOrderBy: [FieldOrder(AreaFields.name)],
      ),
      GridUI(
        content: CardContentUI(
          titleField: AreaFields.name,
          subtitleField: AreaFields.code,
          statusField: AreaFields.status,
        ),
      ),
    ],
  ),
);

Never repeat semantic field names in those surfaces:

dart
// Do not author this:
// columns: ['code', 'name']
// defaultOrderBy: [FieldOrder('name')]
// filter: FilterCondition(field: 'status', ...)

ProjectedFieldRef('qualified.path') is the deliberate escape hatch for a field produced by assembly, a projection, or an extension when no declaration token exists. It is not a shortcut for avoiding a real Field constant.

End-to-end structure

The entity declaration is not a generated API model. It is the program the generic runtime interprets.

Configuration inventory

This is the exhaustive map of the current built-in grammar. Each row points to the section that defines the individual properties and sealed choices. An extension reference is an intentional escape hatch; it does not turn the grammar into an untyped property bag.

PlaneConfigurable surfaceWhat can be configured
ProgramBlueprintIdentity, version, modules, Blueprint-wide query limits, and action-placement defaults.
ProgramModuleNamespace, database schema, release, dependencies, exports, entities, contributed descriptors, rules, task templates, DB posture, UI defaults, and seed pack.
DomainEntityIdentity, physical table, human language, facets, direct tenant field, aggregates, save history and governed revisions, unique keys, projection, DB hints, UI hints, and seed hints.
DomainFacetName, language, fields, relationships, lifecycle, actions, derived values, UI grouping, contribution priority, and merge mode.
DataField<T>Semantic type, name, title, help, nullability, default, validation, indexing, DB mapping, seed strategy, UI presentation, input behavior, formatting, and derivation. Uniqueness is Entity.uniqueKeys.
Datafield typeText, integer, decimal, boolean, UUID, timestamp, date, time, duration, JSON, binary, list, enum, reference, actor, tenant, site, code, name, description, status, identifier, effective-from, and effective-until semantics.
DataRelationshipName, target entity, cardinality/kind, owning field, requiredness, physical or logical storage, discriminator, cascade, inverse name, and picker/detail presentation.
Dataderived/projectionExpression/evaluator, dependencies, materialization, cache behavior, projection fields, relationship expansions, and projection purpose.
BehaviorLifecycleState field, initial state, transitions, triggers, guards, effects, and transition action binding.
BehaviorActionIdentity, language, input contract, rules, capture contract, evidence requirements, audit envelope, snapshots, emitted domain events, effects, idempotency, and UI metadata.
Behaviorrule/conditionAccess, data, policy, lifecycle, aggregate, separation-of-duties, field comparison, existence, evidence, actor/grant, boolean composition, and evaluator references.
BehavioreffectCreate/update/delete, transition, event, notification, outbox, task, workflow signal/start/complete, evidence, audit, and custom effect references.
Workactor/assignment/taskActor kind and source, assignee strategy, candidate users/groups/roles, scope, due/escalation rules, completion requirements, and task payload.
Integrityinvariant/subscriptionRow/aggregate/evaluator truth, severity, dependencies, subscribed entities/events, invalidation scope, and handler references.
StorageModuleDbExtensions, RLS mode, audit mode, realtime, outbox, retention, cross-entity indexes, triggers, views, materialized views, and notes.
StorageEntityDbSizing, write rate, read pattern, partitioning, partition field, audit/realtime overrides, retention, query patterns, and notes.
StorageFieldDbSQL type override, column name, generated expression, collation, index method, operator class, check expression, and storage notes.
Seedmodule/entity/field seedEnablement, deterministic pack, scale, realism, locale, tenant/scenario coverage, record counts, fixed values, generator, sequence, null rate, distribution, reference strategy, and system seed actor.
Entity UXEntityUIIcon, visibility, access, category, route prefix, explicit-or-derived collection contract, typed list columns, default sort, read-only behavior, priority, query limits, action placements, and detail-tab extensions.
Field UXFieldUITitle/help, visibility, input capability, required/read-only behavior, editor kind, formatter, mask, placeholder, value titles, table/filter/sort/search/group participation, column appearance, reference picker, derivation, and extension key.
Relationship UXRelationshipUIPicker/link/detail presentation, option search, title/subtitle fields, projection, empty behavior, and relationship-tab behavior.
App UXBlueprintAppRoutes, menus, effective entity UI plans, settings, global search, command palette, status bar, shell, deployment labels, app portfolio, and developer tools.
Collection UXListUIProjection, typed columns, default predicate, typed order, supported view modes, query limits, paging, selection, create action, and empty/loading/error behavior.
Detail UXdetail/tab surfacesSummary, related data, versions, audit, workflow/runtime data, Blueprint metadata, tab ordering, visibility, actions, docking, and custom builders.
Editor UXeditor/form surfacesCreate/edit mode, dock/dialog/page presentation, single or multiple parts/tabs, facet inclusion, explicit sections, typed field placement, columns, unplaced-field policy, actions, dirty guard, and custom form binding.
Shell UXshell surfacesNavigation, pinned/compact behavior, actor and scope selectors, theme/text scaling, global search, notifications, environment/release badges, status-bar contributions, dock defaults, and portfolio awareness.
Runtimeprotocol/runtime configurationProtocol base, installed Blueprint/features, persistence strategy, authentication context, environment discovery, query and action execution, retries, cache, realtime, logging, tracing, and developer transcript exposure.
Extensiontyped refsEvaluator, transformer, formatter, editor, renderer, effect, policy, persistence, seed generator, route, and custom surface references.

Configuration cascade

Defaults are resolved property by property, not by replacing an entire lower level object:

text
field / relationship / action
  -> facet
  -> entity
  -> module
  -> blueprint
  -> platform default

An explicit value wins. An absent value inherits. A sealed off, none, or hidden value is an explicit override and therefore does not inherit. Runtime policy can further reduce the effective result, but cannot silently expand what the declaration permits.

Declared, derived, and runtime-effective

Not every runtime value is author-configurable:

KindSource
DeclaredThe domain or app author chooses it in the Blueprint.
DerivedAssembly computes routes, default projections, inverse cache edges, generated DB artifacts, editor fields, and dependency order from declarations.
Runtime-effectiveActor grants, subscription, tenant/site scope, record state, policy decisions, installed extensions, environment, and feature licensing reduce or specialize the declared result.
RecordedAction id, command id, timestamps, actor, request lineage, technical version, revision evidence, emitted events, effects, and audit outcome are created by execution and cannot be authored retroactively.

The runtime must reject an unresolved reference or unsupported configuration. It must not guess a field name, fabricate tenant scope, synthesize persistence data, or silently substitute an editor.

1. Blueprint

Blueprint is the root domain program.

PropertyMeaning
nameStable Blueprint identity.
versionVersion of the declaration program.
modulesBounded contexts assembled into the program.
uiBlueprint-wide UI defaults.

Blueprint.single(...) is a convenience for a one-module program. bootstrap() assembles descriptors and returns an EffectiveBlueprint.

BlueprintUI currently configures:

  • query limits with QueryUI
  • inherited ActionPlacementUI contributions

QueryUI supports maxSortLevels and maxGroupLevels. Values cascade one property at a time:

text
entity -> module -> blueprint -> platform default

2. Module

Module is a namespace, release, database-schema, governance, and ownership boundary.

PropertyMeaning
name, schema, versionStable module identity and schema placement.
title, pluralTitle, description, i18nKeyHuman language.
entitiesEntity declarations owned by the module.
descriptorsCross-module contributions assembled onto entities.
dependsOnModule dependency DAG.
exportsCross-module entity, derived-value, and trigger gates.
rulesModule-wide Rule truths lifted onto mutating actions.
taskTemplatesAssignment-shaped work contracts.
dbSchema-level physical and security posture.
uiModule UI defaults.
seedModule seed-pack guidance.

Exports are sealed as:

  • EntityExport
  • DerivedValueExport
  • TriggerExport

ModuleUI configures icon, visibility, access, category, route prefix, module/category navigation hierarchy and disclosure behavior, query limits, and action placements.

ModuleDb configures:

  • Postgres extensions
  • audit mode: standard, full, immutable
  • realtime: off, on, outboxOnly
  • RLS: off, permissive, enforced
  • outbox: off, schema, perEntity
  • retention reference
  • cross-entity physical indexes
  • database triggers
  • views and materialized views
  • design notes

ModuleSeed configures enablement, dataset size (none, smoke, demo, validation, load), realism (synthetic, realistic, regulated), locale, tenant/scenario coverage, and notes.

3. Entity

Entity is the identity-bearing aggregate root.

PropertyMeaning
nameModule-local identity.
schemaTypeStable qualified identity; defaults to module.entity.
tableName, schemaPhysical host-table placement.
title, pluralTitle, description, i18nKeyHuman language.
facetsComposable state and behavior slices.
tenantFieldOptional typed tenant field reference for directly tenant-scoped entities. Null means global or scope-through-owner; no field name is fabricated.
aggregatesCross-facet derived values.
versioningnone, save versions, or governed revisions(...).
uniqueKeysComposite uniqueness expressed as List<List<Field>>.
projectionEffective entity read projection.
db, ui, seedPhysical, presentation, and seed configuration.

Versioning

EntityVersioning.none has no immutable entity history.

EntityVersioning.versions records one monotonic sequence of immutable snapshots for optimistic concurrency, forensic history, and reconstruction.

const EntityVersioning.revisions(...) uses the same save sequence and adds a governed draft/review/effective revision lifecycle. Its revision policy, actions, audit requirements, and owned relationships live directly on the versioning declaration. There is no entity role, master constructor, or separate master-control object.

The generated history table is <host_table>_versions. Its primary key is (entity_id, version). The history intentionally outlives deletion of the current record.

Governed revisions use <host_table>_revisions; host columns are named revision_id, revision_number, revision_status, parent_revision_id, and effective_revision_id.

Entity DB configuration

EntityDb configures:

  • expected rows: unknown, small, medium, large, millions, billions
  • write rate: unknown, low, medium, high, streaming
  • read pattern: unknown, runtimeLookup, runtimeList, analytical, appendOnly, eventStream
  • partition strategy: none, tenant, time, tenantAndTime
  • typed partition field
  • audit and realtime overrides
  • retention reference
  • query patterns
  • notes

Query patterns are filter, join, sort, search, range, aggregate, uniqueness, lifecycle, audit, and realtime.

Entity seed configuration

EntitySeed configures enablement, target/minimum/maximum rows, scenarios, additional generation dependencies, and notes. Relationship dependencies are derived automatically; dependsOn is only for dependencies not represented by the relationship graph.

4. Facet

Facet owns one cohesive state/behavior slice.

PropertyMeaning
name, title, description, i18nKeyIdentity and language.
fieldsStored typed state.
relationshipsEntity graph edges owned by this facet.
lifecycleState machine, if any.
actionsCommands this facet accepts.
projectionFacet read projection.
derivedPure calculated values.
subscriptionsReactions to published derived changes.
evidenceProof vocabulary owned by the facet.
auditDefault audit envelope.
dependsOnFacet assembly DAG.
uiSection/detail/editor posture.

IdentityFacet fixes its name to identity and anchors entity identity.

FacetUI configures section kind, access, order, and collapsed-by-default. Section kinds are form, detail, lifecycle, evidence, audit, relationships, and analytics.

5. Fields

Common field configuration

Every Field<T> can configure:

  • name
  • title, description, i18nKey
  • nullable
  • literal defaultValue
  • runtime/database defaultExpr
  • simple indexed and unique flags
  • FieldDb
  • FieldUI
  • UIReferenceHint
  • FieldSeed

Default expressions are now, uuidV4, actorId, and siteId.

Primitive field tokens

TokenDart valueAdditional configuration
TextFieldStringmaximum length
IntegerFieldint
BigIntFieldint
DoubleFielddouble
DecimalFieldexact decimal stringprecision, scale
BooleanFieldbool
TimestampFieldDateTimetimezone posture
DateFieldDateTime
UuidFieldString
JsonbFieldJSON object
EnumField<E>Dart enumvalues, Postgres enum name
ListField<T>typed listelement codec
FileFieldfile descriptor JSONkind, size, MIME types, multiplicity

Semantic field tokens

Use semantic tokens to carry cross-surface conventions without repeating hints:

  • CodeField
  • NameField
  • DescriptionField
  • TenantIdField
  • SiteIdField
  • ActorField
  • StatusField<E>
  • EffectiveFromField
  • EffectiveUntilField
  • ReferenceIdField
  • IdentifierField
  • QuantityField
  • MoneyField
  • RelatedField<T>

IdentifierField supports literal, context, sequence, and code segments plus reset scopes (tenant, site, year, month).

QuantityField and MoneyField require either a typed companion field or a fixed unit/currency ref.

Field DB configuration

FieldDb configures index materialization, index kind (btree, hash, gin, gist, brin), query patterns, cardinality (unknown, low, medium, high, unique), partial-index predicate, and notes.

Field seed configuration

FieldSeed configures:

  • strategy: auto, code, label, enumValue, range, relationship, timestamp, jsonObject, evidenceArtifact, instrumentReading
  • example values
  • controlled-vocabulary refs
  • numeric min/max
  • pattern
  • sensitive-data posture
  • notes

Field UI configuration

FieldUI is the shared source for tables, details, filters, and editors.

GroupConfigurable properties
Editorwidget, input posture, form section, read-only, hidden, placeholder, help text, custom editor ref
Queryfilterable, sortable, searchable
Tabletable-column flag, appearance, width factor, minimum width, responsive visibility
Valuesboolean labels, enum/choice labels, option-search behavior and threshold
Accessread/write/execute rules
Orderingfield order
Derivationsource fields, transforms, override behavior, create/update application

Built-in widgets are auto, text, multilineText, number, decimal, checkbox, date, dateTime, enumSelect, referencePicker, jsonEditor, evidencePicker, signature, checklist, photoCapture, instrumentCapture, and custom.

Input posture is auto, never, create, update, or createAndUpdate.

Column appearance is auto, identity, badge, status, metric, or timestamp. Responsive visibility starts at always, sm, md, lg, xl, or xxl.

Option search is auto, always, or never.

Derived form values

UIFieldDerivation links writable fields generically:

dart
const codeUi = FieldUI(
  derivation: UIFieldDerivation(
    sourceFields: [AreaFields.name],
    transforms: [
      UITrimTransform(),
      UIUpperCaseTransform(),
      UIReplacePatternTransform(pattern: r'[^A-Z0-9]+', replacement: '-'),
    ],
    override: UIFieldDerivationOverride.untilOverridden,
  ),
);

Built-in transforms are join, trim, upper-case, lower-case, and regex replace. UIFieldTransformRef is the runtime extension escape hatch.

6. Relationships

Relationship configures:

  • identity, title, description, i18n key
  • target entity
  • kind: belongsTo, hasOne, hasMany, manyToMany
  • explicit typed storage field
  • storage: foreignKey or logical
  • cascade: restrict, nullify, cascade, preserveHistory
  • embed hint: lazy, eager, manual
  • requiredness
  • typed discriminator field and discriminator value
  • RelationshipUI

RelationshipUI configures picker/list/table/card/tree/graph/custom presentation, projection, searchable options, editor/detail/inverse visibility, related-record creation, order, access, custom picker ref, and custom renderer ref.

A foreign key is not the relationship. The field owns storage; the relationship owns graph semantics. Association data belongs in an association entity, not in a magical many-to-many edge.

7. Derived values and projections

Derived values are sealed by execution tier:

  • GeneratedColumnDerivedValue
  • SqlViewDerivedValue
  • MaterializedViewDerivedValue
  • ServerDerivedValue

All carry name, output type, human language, and typed dependencies. Specialized members configure SQL expression/select, refresh events, or a server evaluator ref.

Projection configuration includes:

  • ProjectionMode: read, write, readWrite
  • StoragePlacement
  • StorageBinding
  • ProjectionAccess
  • QueryBehavior
  • ProjectionUIBehavior
  • ProjectedField
  • FacetProjection
  • EntityProjection

Projection sourcePath, statePath, generated column names, and JSON paths are assembled/wire identifiers. They are intentionally strings because they name the lowered projection artifact, not a declaration-plane field.

8. Lifecycle

Lifecycle configures a typed state field, legal transitions, and optional initial state.

Transition configures:

  • from state or Transition.anyState
  • to state
  • same-facet trigger/action name
  • typed rule refs
  • outbound effects

The validator requires (from, trigger) to be deterministic.

9. Actions

Action is the complete command contract.

AreaConfiguration
Identityname, title, description, i18n key, source references
Invocationsource, scope, payload fields, consistency, idempotency field
Decisionrules and typed errors
Proofevidence, audit envelope, snapshot strategy
Outputdeclared events and effects
Replaycapture policy
UIicon, presentation, access, order, tooltip, confirmation, destructive flag, capture-form ref

Sources are manual, system, workflow, and event. Scope is collection, selection, or record. Consistency is strict or eventual.

Create, update, archive/delete, and restore are ordinary actions—normally contributed by the identity facet—not special protocol endpoints.

Rules and conditions

Rule configures id, kind, phase, condition, severity, typed error, i18n, source references, and metadata.

Rule kinds are access, policy, lifecycle, data, evidence, audit, snapshot, effect, and custom. Phases are availability, before-commit, after-commit, and async. Severity is info, warning, or blocking.

Conditions are exhaustive:

  • AlwaysCondition
  • NeverCondition
  • PredicateCondition
  • ActorInSetCondition
  • AllCondition
  • AnyCondition
  • NotCondition
  • EvaluatorCondition
  • ActorHasGrantCondition
  • ActorQualifiedCondition
  • PolicyAllowsCondition
  • StateIsCondition
  • FieldEqualsCondition
  • ExistsCondition
  • EvidencePresentCondition

FieldPredicate provides MatchEverything, MatchNothing, Compare, AllMatch, AnyMatch, and NoneMatch. Compare holds a FieldRef, not a field-name string.

Evidence and audit

Evidence kinds are artifact, log, controlled document, photo, record, signature, checklist, generated report, and external reference.

Each Evidence configures identity/language, requiredness, typed producer ref, retention ref, and metadata.

AuditEnvelope configures signature, reason code, actor/dual-control signature mode, evidence, replayability, and metadata.

Evidence is proof collected by an action. Audit is the immutable account of the action context and outcome. They are linked but not interchangeable.

Snapshots, events, and effects

ActionCapture.snapshot (ContextSnapshot) contains named environment targets captured by SnapshotStrategy.reference (revision pin) or SnapshotStrategy.value (blob).

ActionEvent configures name, event kind, optional entity/facet/payload adapter, requiredness, provenance, and metadata.

Effect configures target entity/facet/trigger, typed target-payload to source-field mapping, typed target-id source, and consistency override. Workflow signaling is an effect like any other; the kernel has no workflow-specific transaction path.

ActionCapture configures proofs (evidence), the environment pin (snapshot), traces, and whether payload and events are retained.

10. Actors, assignments, and tasks

ActorSet is a sealed eligibility algebra:

  • anyone/no-one
  • concrete actor
  • initiator
  • actor stored in a field
  • role, group, grant, qualification
  • all/any/none composition
  • locked subtree

Assignment selectors are concrete user, group, role, and typed derived field. AssignmentSpec combines selectors with pool or direct claim mode.

TaskTemplate configures identity/language, task kind, completion action ref, default assignment, completion strategy, expiry, escalations, separation-of-duties rules, expiry template, and metadata.

Completion strategies are single claim, parallel all, and quorum.

11. Rules and subscriptions

Rule is the only predicate vocabulary. Author it on Action.rules, Entity.rules, Relationship.rules, Module.rules, or Blueprint.rules. Bootstrap lifts shared rules onto mutating actions without rewriting Rule.phase.

  • beforeCommit — must hold before the write commits (row predicates become CHECK constraints when they are single-facet field-local)
  • afterCommit — evaluated after the candidate write set is materialized
  • availability — whether the action may be offered

Subscription names a published source entity/facet/projection, the local delivery trigger, and an optional condition ref.

12. Entity UI

EntityUI configures:

  • icon
  • route/menu/search/dashboard visibility
  • read/write/execute access
  • category and route prefix
  • one list configuration
  • typed list columns, filters, ordering, and query limits
  • detail views, editors, and relationship views
  • read-only posture
  • priority
  • extra detail-tab extension refs
  • action placements

ListUI is the collection configuration. Its ordered layouts are the complete set offered to the user, and the first layout is the default:

dart
const ListUI(
  layouts: [
    TableUI(
      columns: [
        TableColumnUI(field: AreaFields.code, required: true),
        TableColumnUI(field: AreaFields.name),
        TableColumnUI(
          field: AreaFields.status,
          appearance: UIColumnAppearance.status,
        ),
      ],
    ),
    GridUI(
      content: CardContentUI(
        titleField: AreaFields.name,
        subtitleField: AreaFields.code,
        statusField: AreaFields.status,
      ),
    ),
    TimelineUI(
      startField: AreaFields.createdAt,
      item: CardContentUI(titleField: AreaFields.name),
    ),
  ],
)

The built-in typed layout vocabulary is TableUI, GridUI, KanbanUI, CalendarUI, TreeUI, and TimelineUI. CustomUI is the symbolic renderer escape hatch. Each layout owns its projection, initial filter, initial ordering, and layout-specific composition. ListUI.auto() explicitly delegates a conservative table-and-card derivation to assembly. An omitted list uses that auto posture because it is the EntityUI default.

FormUI is the complete form configuration. FormUI.derived() orders input-capable fields from facet and field metadata. FormUI.sections(...) contains ordered FormSectionUI children; each section selects facets and/or typed field refs and declares its column count. EditorUI.form configures a single form editor, while each EditorPartUI.form configures one tab or step in a multipart editor.

UIVisibility configures surfaces, menu group/order, and search terms.

UIAccessRule configures permission, policy, role, and user-group refs plus fallback (hide, disable, redact, placeholder, readOnly).

Action placements are extensible refs. Built-ins cover collection toolbar/menu, selection toolbar/menu, record header/action bar/menu, command palette, and tab toolbar/menu. Each action entry configures presentation, overflow, order, title, and tooltip.

13. App Blueprint

The entity Blueprint declares the domain. BlueprintApp declares one application experience over that domain.

It configures:

  • app identity, version, and description
  • included application modules and features
  • workspace regions and navigation
  • shell
  • routes
  • effective entity UI plans
  • inboxes and dashboards
  • search and settings
  • realtime and offline
  • localization and profile
  • integrations and demos

An optional AppPortfolio advertises independently deployed applications. It does not merge them into one monolith.

Routes and navigation

Routes can be entity list/detail, editor, dashboard, inbox, settings, search, report, or custom. Configure name, path, title, entity, access refs, and custom handler ref.

Navigation configures groups, items, shortcuts, route refs, entity types, and access refs.

Collections

EffectiveEntityUI configures entity, title/description, read-only posture, route prefix, list, details, editors, relationships, effective action catalog/placements, analytics, dashboards, and search.

ListUI configures an ordered set of named layouts:

  • TableUI: title, projection, typed columns, default FieldPredicate, and typed FieldOrder list;
  • GridUI: title, projection, card content slots, minimum item width, maximum columns, default predicate, and typed order;
  • the first declared layout is the default and the declared layouts are the complete set available to saved views.

Grid items are card-shaped, but cards is not a second layout kind. The canonical collection vocabulary is table or grid; richer modes remain separate typed layouts when declared.

Details

DetailUI configures identity/title, kind, facet refs, projection ref, and custom widget ref. Kinds are summary, details, analytics, history, audit, evidence, relationships, execution, and custom.

Editors and forms

EditorUI configures:

  • form/tabs/wizard/designer/custom composition
  • adaptive/dock/dialog/page presentation
  • create/update operations
  • facet and typed field selection
  • derived or explicit form structure
  • multi-part editor parts
  • action refs
  • custom widget ref

FormUI.derived() groups input-capable fields by FieldUI.formSection, then facet. FormUI.sections(...) supplies explicit sections with typed fields, facet selection, one-to-four columns, and optional automatic placement of new fields.

Input capability always comes from FieldUI.input; a form cannot make a runtime-managed field editable.

Editor parts may be form, relationship, designer, preview, audit, or custom, with their own fields, form, actions, requiredness, and widget extension.

Other application UI

The App grammar also configures:

  • inbox item kinds and sources
  • dashboard metric/chart/table/timeline/map/graph/custom widgets
  • global/entity/faceted/full-text/vector search
  • settings and policy packs
  • command palette
  • realtime streams/subscriptions
  • offline read/draft/queued-action strategy and conflict ref
  • locale catalogs
  • profile tenant/site/role/delegation controls
  • reports, blocks, outputs, and exporters
  • help fragments and keyboard shortcut
  • simulation actor/scope switching and protocol transcript
  • integrations/endpoints/webhooks
  • demo seed/scenario packs

Global search and command palette

Every effective entity also receives a standard reference projection for top-line identity resolution. It contains id plus the available code, human-name (name, display_name, title, label, username, or email), and description fields. Reference links and pickers use this projection when they need one known entity, so resolving a label never loads the full detail projection. Reference queries are cached by entity type and identifier, concurrent identical reads are deduplicated, and successful mutations invalidate the changed entity plus relationships derived from the Blueprint graph.

SearchUI declares one independently queryable search source. It selects collections by entity type and uses the standard global_search projection by default. The server derives that projection for every effective entity from:

  • identity fields, including id;
  • the first available human identity fields such as code, name, title, label, display_name, username, or email;
  • every additional readable field whose query metadata marks it searchable.

The projection is executed against persisted data. The client never fabricates display rows. If a result is an association record whose own fields do not contain a human label, the client follows its declared belongsTo relationships and resolves target labels through their global_search projections. The raw identifier remains only a last-resort fallback.

CommandPaletteUI.searchRefs references these SearchUI declarations. Each referenced search is registered as a separate provider, so its tab can populate as soon as its own request completes. A slow or failed provider does not delay or erase results already returned by another provider.

Shell

AppShell configures:

  • actor, tenant, site, and custom scope selectors
  • deployment labels and window-title identity
  • menu bar and user menu
  • theme modes and text-scale steps
  • contextual status bar
  • notifications and activity stream
  • inspector
  • policy, access, evidence, audit, and execution routes
  • offline queue/conflict routes
  • saved views and reports
  • help and simulation

Status indicators configure kind, placement, priority, route/entity/menu context, literal/selection/navigation/recent-action/deployment/extension source, hide-when-empty, and metadata.

14. Extension grammar

Platform defaults are sealed so validators and runtimes can be exhaustive. Imperative or client-specific behavior crosses a named extension seam.

BlueprintExtensionRef declares:

  • side: server or client
  • kind: action handler, rule evaluator, policy resolver, effect handler, route, widget, detail tab, empty state, dashboard widget, report block, form, or custom
  • package/feature ownership and metadata

Other named extension seams include evaluator refs, field transform refs, custom field editors, relationship pickers/renderers, route handlers, widgets, forms, report blocks, data sources, integration endpoints, and conflict policies.

The declaration remains serializable and inspectable; the runtime registry supplies the implementation.

15. Where strings are legitimate

BoundaryWhy it is a string
name, title, description, i18n keyDeclared identity or language.
SQL expressions, predicates, functions, tables, generated columnsExplicit physical database boundary.
route paths and URLsRouter/deployment boundary.
projection sourcePath/statePath and JSON pathLowered artifact/wire boundary.
registry/extension refsImplementation is intentionally outside the declaration graph.
external ids and configuration row idsRuntime data, not a declaration object.
event, policy, source-document, retention, vocabulary refsCross-module/configuration catalog boundary.
serialized request/response field namesProtocol wire representation produced from typed declarations.

If a string is being used only because the author already knows a local field's name, it is not legitimate—use the field object.

16. Validation and lowering

BlueprintValidator checks the declaration before generation or serving. It validates module/export gates, descriptor assembly, enum identity, lifecycle determinism, relationship storage, unique keys, effects and payload mapping, typed field references, related-field chains, identifiers, measured fields, task templates, rules, and UI declarations.

The lowering sequence is:

text
declarations
  -> validate
  -> bootstrap descriptors
  -> effective entity graph
  -> dependency plan
  -> schema / RLS / outbox / seed artifacts
  -> protocol runtime
  -> app surface assembly
  -> CDX query and control adapters

The Blueprint is the only semantic source. SQL names and protocol JSON are outputs, not alternate authoring languages.

17. Minimal complete example

dart
enum AreaStatus { draft, active, retired }

abstract final class AreaFields {
  static const tenantId = TenantIdField();
  static const code = CodeField();
  static const name = NameField();
  static const status = StatusField(
    'status',
    AreaStatus.values,
    dbEnumName: 'area_status',
    defaultValue: 'draft',
  );
}

const area = Entity(
  name: 'area',
  title: 'Area',
  pluralTitle: 'Areas',
  tableName: 'areas',
  schema: 'ops',
  tenantField: AreaFields.tenantId,
  versioning: const EntityVersioning.revisions(),
  uniqueKeys: [
    [AreaFields.tenantId, AreaFields.code],
  ],
  facets: [
    IdentityFacet(
      fields: [
        AreaFields.tenantId,
        AreaFields.code,
        AreaFields.name,
        AreaFields.status,
      ],
      actions: [
        Action(
          name: 'create',
          title: 'Create Area',
          scope: ActionScope.collection,
          payload: [AreaFields.code, AreaFields.name],
        ),
        Action(
          name: 'activate',
          title: 'Activate',
          rules: [
            Rule(
              id: 'area.activate.from_draft',
              kind: RuleKind.lifecycle,
              condition: FieldEqualsCondition(
                field: AreaFields.status,
                value: 'draft',
              ),
            ),
          ],
          audit: AuditEnvelope(requireReasonCode: true),
          emits: [
            ActionEvent(
              name: 'area.activated',
              kind: ActionEventKind.stateChanged,
            ),
          ],
        ),
      ],
    ),
  ],
  db: EntityDb(
    expectedRows: DbRowScale.medium,
    readPattern: DbReadPattern.runtimeList,
    queryPatterns: [QueryPattern.filter, QueryPattern.search],
  ),
  ui: EntityUI(
    list: ListUI(
      layouts: [
        TableUI(
          columns: [
            TableColumnUI(field: AreaFields.code, required: true),
            TableColumnUI(field: AreaFields.name),
            TableColumnUI(
              field: AreaFields.status,
              appearance: UIColumnAppearance.status,
            ),
          ],
          defaultOrderBy: [FieldOrder(AreaFields.name)],
        ),
        GridUI(
          content: CardContentUI(
            titleField: AreaFields.name,
            subtitleField: AreaFields.code,
            statusField: AreaFields.status,
          ),
        ),
      ],
    ),
  ),
  seed: EntitySeed(targetRows: 100),
);

That declaration is enough for the generic layers to derive validation, dependency ordering, storage, immutable history, query metadata, CRUD action contracts, editors, tables/grids, filters, and runtime execution surfaces.

Blue is the Vyuh Blueprint documentation surface.