[Story-1007] Create matters from template snapshots
PR #215 ยท pramaan-io/pramaan-app ยท merged 2026-06-03
How it flows
sequenceDiagram
autonumber
participant ui as Live UI
participant act as Server Action
participant gw as Gateway
participant be as Backend
ui->>ui: Pick template
ui->>act: Submit with template
act->>gw: create template snapshot
gw->>be: Freeze vocab + type
be->>be: Add participant rows
Failure cases โ why the order and contract matter
- Template not selected
- Snapshot skipped
- Participants created first
- Template mutates later
- Backend type mismatch
Snapshot pehle, phir participants โ fixed order
Contract-backed gateway โ frontend and backend agree
Template mandatory at creation โ by design
Template live-link without snapshot
Vocab drift after participants exist
Type identifier missing on submit
Files changed (15)