Skip to content

API and worker

apps/api is the standalone Hono host for mobile/native clients and browser tRPC traffic. apps/worker runs asynchronous jobs on BullMQ.

ItemValue
Pathapps/api
Local runbun --filter api dev
Checkbun --filter api check-types
Owns/api/auth/*, /api/trpc/*, selected image/upload routes, signed /api/webhooks/replicate/staging/* receiver
Primary packages@repo/api, @repo/auth, @repo/database, @repo/server-services
ItemValue
Pathapps/worker
Local runbun --filter worker dev
Checkbun --filter worker check-types
OwnsSearch sync, lead ingestion/DLQ, alerts, AI jobs, Bull Board
Primary packages@repo/database, @repo/cache, @repo/notifications, @repo/redis-search
  • API behavior usually belongs in packages/api services and routers, not directly inside apps/api.
  • Worker producers and consumers must use the same QUEUE_SUFFIX in dev.
  • GPT Image 2 staging uses the dedicated ai-staging queue and PostgreSQL as its dispatch/provider-attempt source of truth. Keep REPLICATE_API_TOKEN on the worker and REPLICATE_WEBHOOK_SIGNING_SECRET on apps/api. Follow the staging rollout runbook before enabling paid predictions.
  • Notification payloads must match @repo/notifications translations and generated Knock docs.