1 codebase, 1 deployment, N domains. All domains go through the same Cloudflare zone (dbio.ai) and are routed to the same Workers.
Adding a New Domain
Just 1 API call to Cloudflare (create Custom Hostname) + 1 row INSERT into D1. No redeployment needed.
Estimated Cost
CF Workers $5/mo, D1/KV/R2 free tier is very generous. Total under $50/mo for early stage.
// Request Flow Details
Response Time
Cache HIT: < 5ms at the edge. Cache MISS (first request): 200-500ms due to SSR. Then cached for 30 minutes.
Store Isolation
Every query includes WHERE store_id = ?. Never cross-store except for the marketplace on dbio.ai.
Canonical SEO
Satellite domain is always canonical. dbio.ai always points canonical back to the satellite. Avoids duplicate content penalty.
// Data Strategy
D1 — Source of Truth
All critical data (bios, users, bookings) stored in D1. SQLite at the edge, query < 5ms. Supports transactions.
KV — Read-heavy Cache
Store config, rendered HTML, sessions. Reads < 1ms at the edge. Eventually consistent — ideal for cache, not for frequently changing data.
R2 — Binary Storage
Images, videos, file uploads. S3-compatible, 0 egress fee. Served directly via custom domain CDN.
// Comparison: Old vs New
❌ Old Way (1 repo per domain)
Clone repo → config → deploy separately. Adding a domain = adding a deployment. Update UI = deploy N times. Maintain N codebases.
✅ dbio.ai (1 codebase)
Adding a domain = 1 API call + 1 DB row. Update UI = deploy once. Maintain 1 codebase. Cost: 1 Worker deployment.
// MCP Server — Why It Matters
From Product to Platform
Without MCP: dbio.ai = bio builder (product). With MCP: dbio.ai = bio infrastructure (platform). AI clients become the primary interface. mcp.dbio.ai turns every AI assistant into a dbio client.
Auth Model
Platform Key (tied to user): manage stores, create bios across stores. Store Key (tied to 1 store): CRUD bios within a single store. Both via Bearer {api_key}.
4-Layer Access
No-code: Dashboard UI. AI-assisted: MCP / Chat. Low-code: Zapier + webhooks. Full-code: REST API + SDK. All 4 layers hit the same API, same data, same rules.
Ecosystem Moat
When 1,000 AI users create bios daily via MCP → data lock-in + API dependency + integration ecosystem. Clone the UI = months. Clone the ecosystem = nearly impossible.