Examples

[ AxiomCore · Documentation ]

Advanced patterns

Combine shared form rules, typed failures, read caching, bounded streams, transactions and sandboxed computation, and verify each on your target.

Use these patterns once a small app such as the task app or exam app works on your target. Each pattern names the boundary you still have to verify, because a passing compile does not prove the behavior on every host, SDK or database.

Patterns

PatternWhat it doesBoundary to verify
Shared form rulesInherits selected validation, parses drafts, and maps approved failures to fieldsPrivate rules and payload fields stay outside the selected contract
Logical submission identityKeeps one runtime-owned key for a dispatched submission and its resolutionDo not store the key as a preference or invent a second body key
Authenticated read cachingReuses bounded reads within the declared authority partitionPermissions, tenant and principal identity, invalidation, provider replay safety
Managed persistenceWrites business data, a submission receipt and an outbox event in one supported transactionQualified PostgreSQL profile, readiness, explicit grants, least-privilege tenant policies
Signed sandbox normalizationPasses only a title to a typed TypeScript, Rust or Python guestThe exact signed module, interface and authority; no implicit I/O, credentials, snapshots or host handles
Bounded snapshot streamsReads an authenticated complete snapshot, reduces it, then closes the subscriptionA finite snapshot is not a continuous change feed or a resumable event history
Typed read batchingCombines distinct authorized reads through a declared batch providerPer-item outcomes and one physical dispatch; no implicit frontend HTTP merging
Receipt-backed archive batchesPersists a bounded event batch with a stable receiptDatabase commit and Redis delivery acknowledgment recover separately

Compose the application explicitly

  • Keep the backend, frontend and database manifests separate.
  • Select the public contract and the approved failure fields for each audience.
  • Keep preference state apart from form drafts, submission identity and credentials.
  • Make each successful mutation invalidate the queries that depend on it.

For receipt-backed PostgreSQL task data, IDs can be positive canonical decimal strings within the supported signed 64-bit storage range. Shared regex rules must stay within the portable subset. Browser preview checks do not establish native receipt and outbox atomicity, Redis admission durability or row-policy readiness; those need real provider and recovery tests.

Verify each execution layer

CheckWhat it establishes
Compiler and contract checkAccepted syntax, types, selected rules and artifact compatibility
Reference or generated-adapter scenarioScripted transport, ownership, assertions and cleanup on that runner
Mounted web or native applicationReal target interaction and lifecycle behavior
Real provider integrationPersisted writes, replay and rollback behavior, configured isolation

Preparing a project must not activate a provider, grant authority or contact a deployment. Review signed database readiness, credentials, sandbox bindings and grants explicitly before you serve real traffic.

Next steps