Skip to content

Mental model

Browser workflows usually go through SvelteKit pages, loads, and form actions. Mobile and native clients talk to apps/api through Better Auth and tRPC. Shared business logic belongs in packages, not copied into apps.

SurfacePathNotes
Web readsSvelteKit loads or direct service callsSSR-first where useful.
Web writesSvelteKit form actionsProgressive enhancement and localized validation.
Mobile reads/writesapps/api tRPCNative apps use a hand-written tRPC-over-HTTP client (cookie auth, no Origin).
AuthBetter Auth mounted in web and APICookie sessions, no bearer-token app auth.
Async workapps/worker BullMQSearch sync, leads, alerts, AI jobs, and DLQ handling.
NotificationsKnock via @repo/notificationsTranslation and email layout live in the shared package.
PackageWhy it matters
@repo/databaseKysely client (pg) + SQL migrations + generated types.
@repo/apitRPC routers and service layer used by web/mobile.
@repo/contractZod wire schemas used to generate Swift/Kotlin models.
@repo/notificationsKnock workflow translations and email layout.
@repo/redis-searchProperty search/indexing behavior.

Treat changes to database schema, contract schemas, auth, API procedure shape, notification payloads, and search indexing as cross-app changes. Update docs and run the broader checks listed in First checks.