A hands-on journey through Cloudflare's ecosystem — from DNS basics to building full-stack serverless applications with Workers, Durable Objects, and Zero Trust security.
# Clone the repo
git clone <your-repo-url>
cd cloudflare-learning
# Install Wrangler globally (optional)
npm install -g wrangler
# Login to Cloudflare
npx wrangler login
# Start with the first project
cd projects/00-hello-worker
npm install
npm run devcloudflare-learning/
├── projects/
│ │
│ │ # Beginner — Single service, one storage type
│ ├── 00-hello-worker/ # Just Workers
│ ├── 01-url-shortener/ # Workers + KV
│ ├── 02-redirect-engine/ # Workers + KV + bulk operations
│ ├── 03-contact-form/ # Workers + Email Workers
│ │
│ │ # Intermediate — Multiple services, mixed storage
│ ├── 04-link-in-bio/ # Pages + D1 + Workers
│ ├── 05-image-cdn/ # Workers + R2 + caching
│ ├── 06-api-gateway/ # Workers + KV + D1 + rate limiting
│ ├── 07-webhook-relay/ # Workers + Queues
│ │
│ │ # Advanced — Full stack, real-time, coordination
│ ├── 08-realtime-chat/ # Durable Objects + WebSockets + D1
│ ├── 09-edge-auth-system/ # Workers + DO + KV + JWT
│ ├── 10-ai-search/ # Workers AI + Vectorize + D1
│ └── 11-multi-tenant-saas/ # Full stack (all services)
│
├── notes/
│ ├── concepts.md # Core concepts reference
│ └── roadmap.md # Learning roadmap & curriculum
│
└── README.md
| # | Project | Stack | What You'll Learn |
|---|---|---|---|
| 00 | Hello Worker | Workers | Wrangler CLI, fetch handler, request/response basics, routing |
| 01 | URL Shortener | Workers + KV | KV read/write, redirects, nanoid generation, analytics |
| 02 | Redirect Engine | Workers + KV | Bulk operations, pattern matching, API design, admin endpoints |
| 03 | Contact Form | Workers + Email | MailChannels, form validation, spam protection, HTML responses |
| # | Project | Stack | What You'll Learn |
|---|---|---|---|
| 04 | Link in Bio | Pages + D1 | D1 SQL queries, dynamic pages, click analytics, profile management |
| 05 | Image CDN | Workers + R2 | R2 storage, presigned URLs, image transforms, cache headers |
| 06 | API Gateway | Workers + KV + D1 | Rate limiting, API key auth, request proxying, metrics logging |
| 07 | Webhook Relay | Workers + Queues | Async processing, HMAC signatures, retries, delivery tracking |
| # | Project | Stack | What You'll Learn |
|---|---|---|---|
| 08 | Real-time Chat | DO + WebSockets + D1 | Durable Objects, WebSocket hibernation, presence, message persistence |
| 09 | Edge Auth | Workers + DO + KV | JWT at edge, password hashing, sessions, RBAC, refresh tokens |
| 10 | AI Search | Workers AI + Vectorize | Embeddings, vector search, RAG patterns, hybrid search |
| 11 | Multi-tenant SaaS | Full Stack | All services combined, teams, billing, production patterns |
- Node.js 18+
- Cloudflare account (free tier works for most projects)
- Basic TypeScript knowledge
Each project is self-contained with its own README. Follow this order:
- Read the concepts — Start with notes/concepts.md to understand the fundamentals
- Follow the roadmap — See notes/roadmap.md for the complete learning path with milestones
- Build projects sequentially — Each project builds on skills from previous ones
Every project includes:
project-name/
├── src/
│ └── index.ts # Main worker entry point
├── wrangler.toml # Cloudflare configuration
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript config
├── schema.sql # Database schema (if using D1)
└── README.md # Project-specific instructions
# Development
npm run dev # Start local dev server
npm run deploy # Deploy to Cloudflare
# Wrangler CLI
npx wrangler login # Authenticate
npx wrangler tail # Stream live logs
npx wrangler secret put # Add secrets
# KV
npx wrangler kv:namespace create MY_KV
npx wrangler kv:key put --binding MY_KV "key" "value"
# R2
npx wrangler r2 bucket create my-bucket
# D1
npx wrangler d1 create my-database
npx wrangler d1 execute my-database --file=schema.sql- DNS & CDN configuration
- SSL/TLS modes
- Caching strategies
- WAF basics
- First Worker deployment
- Request/response handling
- Routing patterns
- Middleware composition
- Error handling
- KV for config and sessions
- R2 for file storage
- D1 for relational data
- Durable Objects for state
- Cloudflare Tunnel
- Access policies
- Gateway rules
- Advanced WAF
- Queues & Crons
- WebSockets
- Workers AI
- Service bindings
Track your progress as you complete each project:
- Beginner Projects
- 00 - Hello Worker
- 01 - URL Shortener
- 02 - Redirect Engine
- 03 - Contact Form
- Intermediate Projects
- 04 - Link in Bio
- 05 - Image CDN
- 06 - API Gateway
- 07 - Webhook Relay
- Advanced Projects
- 08 - Real-time Chat
- 09 - Edge Auth System
- 10 - AI Search
- 11 - Multi-tenant SaaS
LGPL-2.1 license

