[Story-1132] Consume bootstrap endpoint; replace 5-call fan-out

Story 1132Epic None21 files · +1839/−25

PR #280 · pramaan-io/pramaan-app · merged 2026-06-09

Why this matters

The matter-template page made five separate API calls before any picker was even ready — and one slow response left the form half-hydrated.

Five round-trips, one fragile page

More calls ≠ a reliable page

The fix — Five fan-out calls collapsed into one validated welcome kit that warms every picker cache.

How it flows

sequenceDiagram
  autonumber
  participant page as Picker Page
  participant bff as BFF Proxy
  participant srv as App Server
  page->>bff: GET create-bootstrap
  bff-->>srv: forward read-only (ADR-103)
  srv->>bff: aggregate JSON, schema-validated
  bff->>page: validated JSON
  page->>page: seed three TanStack catalog caches
  page->>page: pickers read from warm cache

Files changed (21)

File±
docs/walkthroughs/story-1132-walkthrough.html+288
openapi/app-api.json ★+131
src/app/[locale]/(workspace)/settings/matter-configuration/matter-templates/new/page.tsx+4 −3
src/app/api/internal/matter-templates/create-bootstrap/route.ts+32
src/gen/client/appGetConfigScreenBootstrap.ts+57
src/gen/client/index.ts+1
src/gen/hooks/index.ts+8
src/gen/hooks/useAppGetConfigScreenBootstrap.ts ★+115
src/gen/hooks/useAppGetConfigScreenBootstrapSuspense.ts+113
src/gen/index.ts+30
src/gen/schemas/matterConfigBootstrapResponse.json ★+508
src/gen/types/AppGetConfigScreenBootstrap.ts+55
src/gen/types/MatterConfigBootstrapResponse.ts+43
src/gen/types/index.ts+11
src/gen/zod/appGetConfigScreenBootstrapSchema.ts+73
src/gen/zod/index.ts+10
src/gen/zod/matterConfigBootstrapResponseSchema.ts+56
src/lib/matter-templates/catalog-prefetch.ts+39 −22
src/lib/matter-templates/gateway.ts+47
src/lib/matter-templates/types.ts+1
tests/unit/matter-config-bootstrap-contract.test.ts+217