Packages inventory
| Package | Purpose | Primary consumers |
|---|---|---|
@repo/database | Kysely client (pg), SQL migrations, generated types, seeds | Web, API, worker, service packages |
@repo/api | tRPC routers and service layer | API host, web, mobile clients |
@repo/contract | Zod wire schemas and native model codegen | Native iOS/Android apps |
@repo/auth | Better Auth shared setup | Web, API |
@repo/notifications | Knock translations and email layout | Web, worker |
@repo/redis-search | Valkey property search/indexing | Web, worker |
@repo/cache | Valkey/Redis client helpers | Web, API, worker |
@repo/integrations | Integration adapters (Knock, Stream, S3, Stripe, queues, rate limit); imports nothing from @repo/api | @repo/api, API, web, worker |
@repo/validation | Shared Zod validation and property rules | Web, API, packages |
@repo/config | Per-host Zod env schemas parsed once at boot; source of truth for turbo.json and .env.example | Web, API, worker |
Safe edit rule
Section titled “Safe edit rule”Before changing a package, identify all primary consumers and run the narrow checks for each consumer. Database, API, contract, notification, and search changes should be treated as cross-app changes.