Database seeding
Populate Postgres with test data fromapi-events/scripts/seed/.
demo-full, restart the Clerk emulator:
api-events/scripts/seed/manifest/local-personas.json. Details: api-events/scripts/seed/README.md. Blake Admin is Admin on Seed Demo Band and Owner of leftover Blake Workspace; one-click sign-in lands on Blake Workspace.
Migrations
OpenAPI and contract gates
docs/openapi/soundcheck.json for web/mobile client codegen. Path templates use Encore param names. Query/body/response shapes come from sibling openapiRoute() annotations on api.raw handlers. Named $ref schemas come from sibling openapiSchema() registrations. The extractor keeps the first registration of a name it reads, so a copy in src/systems/shared/openapiSchemas.generated.ts can shadow the hand-written schema. openapi:assert-path-templates fails when a name is registered in both places, unless it is on api-events/scripts/openapi/driftedSchemaDuplicates.json. That list holds the copies that still differ from their hand-written schema. Do not add names to it. A listed name that is no longer duplicated also fails, so the list shrinks as copies are deleted. After editing a hand-written schema, delete its generated block if it has one and re-emit. Annotation coverage compares emit to the frozen Go-era checklist in api-events/scripts/openapi/testdata/openapi.baseline-ops.json, not the spec this branch writes. Schema-catalog equality also uses that in-memory emit (only $ref’d openapiSchema() names survive); leftover keys in the committed snapshot must not mask unused registrations. On PRs, api-events-deploy.yml openapi-parity emits and asserts Encore path templates (and catalog keys when the committed snapshot changed). On api-events/ pushes to dev/qa/main, docs-ci sync-openapi-spec emits first, then asserts Encore path templates and catalog keys, and refuses to auto-commit if either drifts. When a PR edits the committed snapshot, Docs CI also requires that file’s catalog keys to match emit so docs-only leftover schemas cannot land.
E2E runner
api-events/scripts/run-encore-e2e.ps1
Shared infra launcher
scripts/dev-infra.mjs → dev/docker-compose.yml
Encore dev launcher
api-events/scripts/dev-emulator.mjs
Troubleshooting
Seed fails with connection error
Seed fails with connection error
Confirm infra is up and
DATABASE_URL points at :5433:Clerk personas missing
Clerk personas missing
Seed then restart emulator:
OpenAPI parity fails
OpenAPI parity fails
Regenerate and fix drift: