Cloudflare Workers Infrastructure Patterns
Proven patterns extracted from a production Cloudflare Workers project. Apply these when starting a new project or reviewing existing infrastructure.
Worker Architecture
Structure your worker with a typed Env interface declaring all Cloudflare bindings (D1, KV, secrets) with optional markers for graceful degradation. Use a single handleRequest(request, env, ctx) entry point with this flow:
- Validate -- check method, content-type, body
[Description truncada. Veja o README completo no GitHub.]