Workers at the edge for API and runtime · PostgreSQL via Hyperdrive for transactional truth · Durable Objects for realtime state · Workflows for long processes · R2 for artifacts · Queues for events · Vectorize for RAG · Agents SDK for persistent AI departments.
Internet → Edge security → Gateway → Domain services → Event/durability → Data → AI. Every request follows this path. Every service knows where it sits.
Where each workload runs. What primitive owns what job. No overlap, no ambiguity.
| Requirement | Cloudflare service | Class |
|---|---|---|
| API / runtime | Workers | CORE |
| Web application | Workers + React | CORE |
| Main relational database | PostgreSQL + Hyperdrive | DATA |
| Edge/isolated SQL cases | D1 | DATA |
| Object storage | R2 | DATA |
| Live conversations / presence | Durable Objects | REALTIME |
| Agent runtime | Agents SDK + Durable Objects | AI |
| Long business processes | Workflows | ORCHESTRATION |
| Async event processing | Queues | ORCHESTRATION |
| Semantic retrieval | Vectorize | AI |
| AI gateway / policy | AI Gateway | AI |
| Cloudflare inference | Workers AI | AI |
| Custom domains | Cloudflare for SaaS · Custom Hostnames | EDGE |
| User-code isolation (later) | Workers for Platforms | EDGE |
| Cache / config | KV | DATA |
| Security | WAF · Turnstile · Rate Limiting · Access | SECURITY |
| Logs / telemetry | Workers Observability + external SIEM | OBS |
| Secrets | Workers Secrets · approved secret store | SECURITY |
Not enforced by developer discipline. Enforced by the framework. Every repository query, every AI retrieval, every signed URL — tenant-scoped.
No tenant-scoped API accepts tenant_id from client. Tenant context is always resolved from authenticated identity.
Apps → Workers → Agents → Workflows → Packages → Database → Contracts → Infrastructure. Every code change belongs somewhere obvious.
8 apps · operator-web · admin-web · applicant-portal · partner-portal · lender-portal · public-forms · page-builder · developer-portal
44+ workers · api-gateway · auth · crm · applications · credit · underwriting · fundability · lender-intelligence · funding-plans · offers · documents · esign · conversations · workflows · partners · commissions · migration · ai-orchestrator
15 agent teams · sales · credit · underwriting · bank-statements · documents · fundability · lender-match · funding-strategy · client-success · reactivation · compliance · partner-success · marketing · revenue · executive
8 workflows · applicant-intake · funding-process · document-collection · requalification · invoice-collection · partner-onboarding · reactivation · verticals
13 packages · domain · events · authz · database · ui · validation · crypto · observability · ai · workflow-sdk · integration-sdk · test-fixtures · generated-api-client
migrations · seeds · schemas · views · policies · never modify prod schema ad hoc.
openapi · events · webhooks · agent-tools. Every service publishes contracts here.
cloudflare · terraform · environments · dashboards · alerts. IaC first.