# Forms, data views and data exchange

Collect structured input, present records, and plan governed import/export flows using shared models and explicit host ports.

Source snapshot: bcc79fcc27c4d801c2119bef81ddcce7b4e86498

## Choose lifecycle and UI separately

FormsRuntime owns management, immutable publication, submission, consent, deterministic navigation, idempotency and document validation. ModuleForms keeps reusable builder, respondent, results and administration behavior. A product host supplies authenticated creator authority, storage, delivery providers, public routing, branding and feature flags. This split helps when embedding a form in an existing product: reuse the lifecycle and selected UI without assuming the package owns your tenant identity or deployment.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/forms-runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/forms/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/README.md

## Read the published form’s requirements

Forms capabilities are organized into independently gated milestones. A document requiring a disabled milestone is rejected at publication. Verification, AI follow-up, distributed request defense, secrets and outbox delivery are optional host ports until the selected publication policy requires them. Responses remain bound to immutable revisions. When adapting an example, inspect the enabled milestone, required ports, locale fallback and response-session scope together; a working authoring screen alone does not show that a particular published document can accept valid responses.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/forms-runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/forms/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/README.md

## Preview interchange before applying changes

DataExchangeCore provides CSV, JSON and XML codecs, normalized record batches, SchemaModel mapping/coercion and import/export plans. Its preview and reconciliation surfaces allow a caller to inspect differences before choosing an effectful delivery path. Governed projection contracts carry sharing, consent, residency, retention and revocation responsibilities. Recovery dispatches deliberately contain narrower, receiver-specific references than central queue records. Keep source values and scheduler internals out of an unrelated product’s recovery message.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/forms-runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/forms/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/README.md

## Select one data path

For a form, trace document creation through publication and response storage. For import/export, trace decode, schema mapping, validation and preview. Record where trusted actor scope and the selected schema enter that path.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/forms-runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/forms/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/README.md

## Supply the required ports

Inspect the exact publication or exchange requirements before wiring storage, verification, delivery or AI adapters. Use a deterministic local adapter for a source walkthrough, then qualify the intended durable adapter separately.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/forms-runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/forms/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/README.md

## Review replay and recovery

Use an existing fixture to examine duplicate submission, stale revision, denied scope and a bounded retry. Confirm that a preview, queued delivery, accepted response and completed external effect remain visibly different states.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/forms-runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/forms/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/README.md

## Packages

- [@lssm-tech/lib.data-exchange-client](https://lssm.co/docs/packages/lib.data-exchange-client/): Shared controllers plus web and native UI surfaces for data interchange
- [@lssm-tech/lib.data-exchange-core](https://lssm.co/docs/packages/lib.data-exchange-core/): SchemaModel-first core primitives for data import/export and mapping
- [@lssm-tech/lib.data-exchange-server](https://lssm.co/docs/packages/lib.data-exchange-server/): Server-side adapters and execution services for SchemaModel-first data interchange
- [@lssm-tech/lib.exporter](https://lssm.co/docs/packages/lib.exporter/): Compatibility exporter shim backed by the data-exchange core.
- [@lssm-tech/lib.files](https://lssm.co/docs/packages/lib.files/): Files, documents and attachments module for ContractSpec applications
- [@lssm-tech/lib.forms-runtime](https://lssm.co/docs/packages/lib.forms-runtime/): Complete caller-port Forms lifecycle, compiler, validation and PII-safe export runtime.
- [@lssm-tech/module.forms](https://lssm.co/docs/packages/module.forms/): Reusable builder, respondent, results, and administration module for the shared Forms platform.
- [@lssm-tech/integration.crdt-loro](https://lssm.co/docs/packages/integration.crdt-loro/): Isolated Loro-compatible CRDT adapter proof for data transmission collaboration envelopes.
- [@lssm-tech/integration.governed-data-postgres](https://lssm.co/docs/packages/integration.governed-data-postgres/): Subject-bound PostgreSQL persistence for governed ecosystem projections.
- [@lssm-tech/integration.governed-product-data-postgres](https://lssm.co/docs/packages/integration.governed-product-data-postgres/): Product-local encrypted PostgreSQL persistence for governed projection copies.
