Skip to content
PraxisSign in
Knowledge sections

Architecture overview

How the web worker, API worker, background worker, D1, and Effect capabilities fit together.

architecturecloudflareeffect
On this page

The web, API, and background Workers share D1 and the Effect services in packages/capabilities. HTTP contracts live in packages/api; request logging lives in packages/logger.

Request topology of the B2B SaaS StarterbrowserHTTP clientMCP clientqueue jobswebTanStack StartapiREST + MCPbackgroundqueue consumerpackages/capabilitiesD1QueuesEmail

The web Worker calls capabilities in-process. External clients use the API Worker. Both enforce the shared permission rules in packages/authz.

Capabilities select D1-backed Live adapters when a DB binding exists and in-memory Seed adapters otherwise. Local development uses persisted local D1; Seed adapters let capability tests run without a Worker.

The background Worker consumes queues, handles Stripe webhooks, and runs scheduled reconciliation, email digests, and cleanup. Keeping this work outside page requests lets it retry independently. See Workers for the entry points.