api-events) for local development.
Prerequisites
Encore CLI is required for
npm run dev:emulator. The devcontainer image includes it; otherwise install from encore.dev.Quick start
1
Install dependencies
2
Start shared infra
:5433), Azurite (:10000), and Clerk emulator (:4711) from dev/docker-compose.yml.3
Migrate and seed (first time)
4
Start api-events
5
Verify it's running
cd web && npm run dev:emulator (proxies to Encore on :4000). See .agents/skills/local-clerk-emulator/SKILL.md.
Shared infra (dev:infra)
Environment variables
npm run dev:emulator sets the documented local env (Clerk emulator URLs, stub providers, DATABASE_URL). For manual runs:
TWILIO_USE_STUB_SMS, SENDGRID_USE_STUB_EMAIL, etc.) default to on in dev:emulator. See api-events operations for the full secrets inventory.
Database access
Troubleshooting
Port 4000 already in use
Port 4000 already in use
encore run --port=4001Database connection refused
Database connection refused
Ensure infra is running:
Clerk sign-in works but API returns 401
Clerk sign-in works but API returns 401
Restart the emulator after seeding and confirm
npm run dev:emulator (not raw encore run without emulator env). See local Clerk emulator runbook.Prisma client errors
Prisma client errors
Regenerate after schema changes:
Next steps
Profiles
Local infra and ephemeral profiles
Database
Schema, migrations, and seeding