An internal application for one multi-branch healthcare organisation. Teams need to coordinate registration, appointments, service queues, invoices, payments, and branch operations reporting without building a complete medical-record system.
This sample comes from an internal test run, not from your idea and not from customer work. Content was sanitised and public terminology aligned without adding new outcome claims.
Version
sample-2026-08-25.v2
Generated
25 August 2026
Reviewed
30 August 2026
INPUT IDEA
One product context for every output
An internal application for one multi-branch healthcare organisation. Teams need to coordinate registration, appointments, service queues, invoices, payments, and branch operations reporting without building a complete medical-record system.
RESOLVED DECISIONS
A private PWA serves laptops and smartphones.
Users work within server-derived branch or central scopes.
PostgreSQL is the business authority; caches, workers, and offline snapshots are not sources of truth.
Offline is limited to registration and queues; invoices and payments remain online-only.
A handoff completes only after authority accepts the change or returns Already Applied.
Sign Approve 1
Product context, actors, boundary, storage, and critical decisions are locked before structure generation.
Sign Approve 2
The App Map and Structure Review Package are reviewed before final output is completed.
01
AI generated · reviewed for demonstration
Smart Requirement Summary
Separate facts, decisions, defaults, and open questions before the first approval.
The product is scoped as an internal tool for one multi-branch organisation, with server-derived branch scope and no complete medical record.
Outcome and boundary
Branch teams manage registration, appointments, queues, service, invoices, and payment with auditable states. Central leadership reads aggregate reports without changing branch transactions.
Included: operational workflows, ordered billing, reports, audit, and recovery.
Outside the boundary: complete medical records, native apps, and completion based only on cache.
Locked decisions
Access derives from roles and server assignments. Laptops and phones use the same PWA workflow. Offline behaviour exists only on explicitly permitted surfaces.
One organisation; every transaction remains branch-scoped.
Invoice and Payment fail closed when authority is unavailable.
Conflicting changes never use last-write-wins.
Still to prove
OIDC configuration, conflict resolution, billing mapping, performance parameters, retention, and browser compatibility remain release gates—not facts invented by the AI.
02
AI generated · reviewed for demonstration
Application Journey
Explain work sequence, handoffs, terminal states, guards, and recovery across actors.
Registration → Appointment → Queue → Service → Invoice → Payment, with lifecycle guards and completion authority at each handoff.
Primary journey
Registration staff find or create the patient, schedule an appointment, and place the patient in the clinic queue. Once service is completed and guards pass, an invoice becomes available for payment.
The server validates entry conditions.
Handoffs carry correlation and idempotency keys.
Completion means accepted or Already Applied.
Offline and reconnect
Registration and queue changes can enter a durable outbox. On reconnect, replay revalidates session, assignment, expected version, and current authority before commit.
Invoice and Payment are never offline.
Conflict freezes mutation until explicit resolution.
Queued does not mean complete.
Failure and recovery
Downtime uses manual capture followed by auditable re-entry. Restore, replay, and reconciliation must not duplicate transactions or erase audit evidence.
03
AI generated · reviewed for demonstration
Technical Foundation
Turn operational requirements into architecture, authority, offline, observability, and recovery boundaries.
React/TypeScript PWA, modular NestJS API, and PostgreSQL authority; workers, caches, and IndexedDB remain non-authoritative.
Application shape
One responsive private PWA calls a versioned REST API. A modular monolith keeps lifecycle and authorisation in one boundary until measured scale justifies service separation.
Frontend: React + TypeScript + Vite.
Backend: NestJS REST modular monolith.
Database: PostgreSQL authority.
Async and offline
Workers perform non-authoritative tasks such as notification delivery and reconciliation. IndexedDB holds bounded snapshots and outbox items; every business outcome commits to PostgreSQL.
Idempotent replay.
No silent conflict merge.
Stale cache cannot authorise sensitive commands.
Operations and recovery
Append-only audit, correlation IDs, observability, backups, restore drills, and recovery targets must be proven before release. The sample records RPO ≤5 minutes and RTO ≤60 minutes as targets still requiring validation.
04
Conditional · relevant to this sample
Database Schema
Define data authority, relations, constraints, lifecycle, audit, and idempotency for a product that needs persistence.
The schema models identity, end-to-end operations, ordered billing, conflicts, outbox, notifications, reconciliation, audit, and recovery.
Data boundaries
Organisation is the highest boundary and transactions carry branch scope. Assignments connect users to operational authority; every query and command validates scope server-side.
Identity and assignments.
Registration, appointment, queue, service, invoice, and payment.
Audit, idempotency, outbox, conflict, and notification delivery.
Lifecycle and constraints
Statuses use constraints that can evolve through controlled migrations. Version and idempotency prevent duplicate replay; foreign keys and uniqueness preserve authority relations.
Invoice follows valid service completion.
Payment requires an available invoice.
Audit records reason, outcome, actor, and correlation.
Release gate
The schema is a reviewable baseline, while indexes, volume, retention, conflict resolution, billing mapping, and scope-isolation tests still require proof before production.
05
AI generated · reviewed for demonstration
App Map
Map product areas, capabilities, actors, and journey responsibilities without pretending to be a screen or route list.
Branch Operations, Services, Billing, Reporting, Reconciliation, and Audit own distinct capabilities and journey responsibilities.
Product areas
Branch Operations owns registration, appointments, and queues. Services manages service state. Billing governs invoice and payment. Reporting, Reconciliation, and Audit provide separate supporting surfaces.
Actors see areas according to role and assignment.
Areas are not a screen or route tree.
Capabilities have explicit owners and data boundaries.
Journey relationships
Registration hands off to Appointment and Queue; Service changes invoice eligibility; Billing sends outcomes to reporting and reconciliation. Audit receives cross-area events without becoming transaction authority.
Sign Approve 2
The App Map is reviewed with the Application Journey, Technical Foundation, and relevant Database Schema. The second approval locks the structure package rather than approving each document separately.
06
AI generated · reviewed for demonstration
PRD
Keep product requirements, the MVP boundary, exclusions, risks, and acceptance criteria in one canonical document.
The MVP includes registration through payment, bounded offline operation, reports, audit, and recovery while keeping release gates visible.
Goal and users
The MVP helps branch staff run patient operations and helps management read scoped reports without replacing medical records or clinical decisions.
Registration staff and branch coordinators manage the initial flow.
Service staff update state within their authority.
Management reads branch or central aggregate reports.
MVP boundary inside the PRD
The boundary covers registration, appointments, queues, service, invoice, payment, reports, in-app notifications, audit, and recovery described by the connected artifacts.
Offline only on approved surfaces.
No complete medical records.
No native app or fallback that broadens access.
Acceptance and risk
Each requirement names authority, actor, guard, failure state, and test evidence. OIDC, conflict resolution, billing mapping, retention, performance, and browser/storage remain open release gates.
Revision impact example
If the offline decision changes from ‘registration and queues’ to ‘registration only’, the revision flow marks Application Journey, Technical Foundation, Database Schema, and PRD as affected. Healthy areas do not need an end-to-end rerun.
This is sanitised AI working material reviewed for demonstration. Technical, legal, security, medical, and operational details still require human review and appropriate testing.