Simulacrum

Recipe — Build a feature end to end

Move from schema to UI using Simulacrum conventions for adapters, actions, and RBAC.

Outline

  1. Model — Add tables or models via your ORM adapter; generate migrations.
  2. Data layer — Expose repository functions in lib with typed inputs.
  3. Authorization — Gate mutations with RBAC helpers consistent with your template.
  4. Server Actions — Validate with Zod, call repositories, return structured errors.
  5. UI — Build components with TanStack Query hooks for reads.
  6. Tests — Add Playwright coverage for the critical path (E2E).

Sketch the happy path on paper before coding; fewer refactors when adapter boundaries stay clean.