1.7 KiB
1.7 KiB
Code Handover Playbook
This is the minimum runbook for a new engineer to continue delivery safely.
Local Setup
- Install Bun matching repo policy.
- Copy
.env.exampleto.envand fill required values. - Generate Prisma client:
bun run db:generate - Apply migrations:
bun run db:migrate:deploy(or local named migration flow) - Seed data:
bun run db:seed - Start apps:
bun run dev
Daily Development Loop
- Create branch by task type:
todo/*,refactor/*,code/*. - Implement smallest vertical slice for one TODO item.
- Run quality gates:
bun run checkbun run typecheckbun run test - Update
TODO.mdstatus and discovery log. - Commit with Conventional Commit message and GPG signing.
Database Workflow
- Schema source is:
packages/db/prisma/schema.prisma - Use named dev migrations for schema changes.
- Avoid manual SQL unless migration tooling is blocked.
- Always regenerate client after schema change.
Testing Strategy
- Unit/service tests:
packages/*and logic helpers. - App-boundary integration tests: auth flow and route-level behavior.
- E2E tests: full admin/public happy paths through Playwright.
Common Failure Recovery
DATABASE_URL not set: ensure root.envis loaded for Bun/Prisma scripts.- Prisma client import errors:
run
bun run db:generate. - Migration drift: run deploy/reset flow in dev and reseed.
- Playwright host deps missing: install browser dependencies on host before running e2e.
Ownership Expectations
- Keep invariants explicit and tested before changing auth/media pipelines.
- Treat
TODO.mdas delivery source of truth. - If changing branch/release workflow, update docs in same branch.