Using Cloudflare workers as your only backend
summary
Builds a recommendations app called Topic with a Next.js frontend and uses Cloudflare Workers as the only edge backend for routing, R2 for image storage, and Workers KV for fast lookups; local dev via wrangler works well. Attempts to use Durable Objects as an async aggregator/queue succeed for replication logic but fail as a reliable queue. Tries D1 Alpha (SQLite-on-edge) but hits limits (≈50 reads/writes/sec, no migrations, no Durable Object bindings). Auth uses NextAuth, storage falls back to MongoDB, and Sentry handles errors.
AI-written summary · about
chapters (18)
- 0:00Introduction and motivation
- 1:27Cloudflare Workers as backend
- 4:57Edge computing basics
- 7:21Cloudflare Workers ecosystem
- 9:47Durable Objects explained
- 11:12Architectural flexibility
- 13:00Local development setup
- 15:51Deployment and dashboard
- 16:33Monitoring and error tracking
- 17:15Database integration options
- 18:19Cloudflare D1 Alpha
- 20:48Demo app: Topic
- 23:16Live demo and user interaction
- 25:44Workers backend code
- 26:48Integration with other services
- 27:09Development observations
- 28:56Limitations and future outlook
- 29:17Conclusion and Q&A
