Platform services
backend/app/ separates API routes, audit, canonical schemas, events, exports, identity, products, provenance, rules, validation and work queues.
NHS Sovereign Federated Data Platform · 02 — Software & Deployment
Version 0.1.0 maps the architecture into a conventional open stack, an RTT reference product, versioned contracts, portable deployment files and repeatable tests.
Reference product
The first product proves the full platform route with synthetic records: source preservation, canonical construction, fixed calculation, rule evaluation, idempotent work queue, audit, provenance and export.
Software modules
| Module | Implemented responsibility | Controlled boundary |
|---|---|---|
| API application | Loads validated settings, typed routes, middleware and database lifecycle. | Requests receive identity, organisation, access and correlation context. |
| Identity | NHS Number validation and explicit unresolved-identity state. | Unresolved identity blocks patient-specific product action. |
| Validation | Named information, warning, review and blocking results. | Invalid records remain preserved; failure is not silently discarded. |
| Canonical data | Stable operational schemas and temporal state linked to source evidence. | Products query governed entities rather than hidden duplicate stores. |
| RTT product | Fixed elapsed-day calculation, validation rule and pathway state. | Rule behaviour is versioned outside the interface. |
| Work queues | Deterministic task keys, ownership, status and idempotent creation. | Repeat execution cannot multiply the same live work item. |
| Audit & provenance | Links trigger, actor, purpose, input, rule, result and source record. | Displayed values and derived states remain traceable. |
| Export | Portable data, schemas, rules, counts, hashes and manifest evidence. | An export is not accepted until opened, validated and re-imported. |
Repository organisation
backend/app/ separates API routes, audit, canonical schemas, events, exports, identity, products, provenance, rules, validation and work queues.
products/rtt-validation/ contains its manifest, pipeline, rules and synthetic data instead of hiding behaviour in screen code.
schemas/ contains canonical, pipeline, product and rule contracts that can be validated independently.
Static HTML, CSS and JavaScript provide product views and work queues. Business rules remain in governed services.
Inventory, chain-of-custody, reconciliation and non-cooperative-exit templates make transition evidence part of the repository.
API, event, export, identity, release-contract and RTT tests bind the claims to fixed executable behaviour.
Containerised execution
The same source can run directly or through OCI containers. Application layers remain replaceable while databases, audit stores, exports and backups persist independently.
Testing contract
Input, environment, schemas, rules, pipeline and configuration are versioned before the test begins.
Output, error, audit event and state transition are declared before execution.
Missing, invalid, duplicate, contradictory, unauthorised and interrupted states are tested explicitly.
The same-state test is repeated and complete outputs are compared, not merely screenshots.
Command, environment, versions, expected output, actual output and reviewer are retained.
A passing demonstrator does not authorise trust, regional or national deployment without the next evidence stage.