An interactive learning platform for mastering Cloudflare's developer platform. Test your knowledge with AI-powered quiz evaluation, track your progress, and get personalized study recommendations.
- 106 Interactive Questions covering Workers, KV, Durable Objects, D1, R2, Queues, Workflows, AI Gateway, and more
- AI-Powered Evaluation using Cloudflare Workers AI (Llama 3.1) to judge your answers
- Follow-up Questions - ask the AI to clarify any concept
- Progress Tracking with localStorage persistence
- Performance Analytics by category with study recommendations
- Multiple Quiz Modes - full quiz, quick 20-question, or by category
- Workers 101 Code Playground backed by a Cloudflare
worker_loaderbinding that runs your code safely via/api/run
- Frontend: SvelteKit 5, Tailwind CSS 4
- Backend: Cloudflare Workers, D1 (SQLite), Durable Objects
- AI: Cloudflare Workers AI (Llama 3.1 8B Instruct)
- Auth: Better Auth (optional, included but not required for quiz)
- Deployment: Alchemy for zero-config Cloudflare deployment
# Clone the repo
git clone https://github.com/acoyfellow/cf-tutorial.git
cd cf-tutorial
# Install dependencies
bun install
# Set your Alchemy password
echo 'ALCHEMY_PASSWORD=your-secure-password' > .env
# Start development
bun run devThe app will be available at http://localhost:5173
src/
āāā lib/
ā āāā flashcards.ts # 106 quiz questions and answers
ā āāā quiz-store.svelte.ts # Svelte 5 reactive quiz state
ā āāā auth.ts # Better Auth config (optional)
ā āāā schema.ts # D1 database schema
āāā routes/
ā āāā +page.svelte # Main quiz UI
ā āāā data.remote.ts # Server-side AI functions
āāā hooks.server.ts # Server hooks
worker/
āāā index.ts # Durable Object + worker_loader-powered code playground API (/api/run)
alchemy.run.ts # Cloudflare deployment config
| Category | Questions | Key Concepts |
|---|---|---|
| Workers Fundamentals | 8 | V8 isolates, CPU limits, handlers |
| Execution Context | 3 | waitUntil, lifecycle |
| Workers KV | 5 | Eventually consistent storage |
| Durable Objects | 6 | Strong consistency, WebSockets |
| D1 | 5 | SQLite at the edge |
| R2 | 4 | S3-compatible object storage |
| Queues | 4 | At-least-once delivery |
| Service Bindings | 4 | Worker-to-Worker RPC |
| Workflows | 8 | Durable execution |
| Agents SDK | 5 | AI agent framework |
| MCP | 4 | Model Context Protocol |
| Browser Rendering | 4 | Headless Chrome |
| Containers | 4 | Run any runtime |
| AI Gateway | 5 | AI proxy & guardrails |
| Workers AI | 4 | Edge inference |
| Vectorize | 3 | Vector database |
| Hyperdrive | 4 | Database connection pooling |
| Pipelines | 3 | Event ingestion |
| Pages | 3 | Static + functions |
| Wrangler | 4 | CLI tooling |
| HTMLRewriter | 4 | Streaming HTML transforms |
| Smart Placement | 3 | Auto-optimization |
| System Design | 4 | Architecture patterns |
| Gotchas | 5 | Common pitfalls |
- Choose a quiz mode - Full (106 questions), Quick (20 random), or by category
- Answer questions in your own words
- AI evaluates your answer against the reference using Workers AI
- Ask follow-ups to clarify concepts you're unsure about
- Review results with category breakdowns and study recommendations
- Track progress across sessions with localStorage
# Start dev server (auto-runs migrations)
bun run dev
# Type checking
bun run check
# Build for production
bun run build
# Deploy to Cloudflare
bun run deployAlchemy handles all Cloudflare infrastructure:
# Deploy everything
bun run deploy
# This creates:
# - D1 database with migrations
# - Durable Object namespace
# - Worker with AI binding
# - SvelteKit app on Workers| Variable | Required | Description |
|---|---|---|
ALCHEMY_PASSWORD |
Yes | Alchemy deployment password |
BETTER_AUTH_SECRET |
No | Auth secret (auto-generated) |
BETTER_AUTH_URL |
No | App URL (default: localhost:5173) |
Edit src/lib/flashcards.ts:
export const flashcards: Flashcard[] = [
{
id: "NEW001",
category: "Your Category",
question: "Your question?",
answer: "The correct answer with key details.",
tags: ["tag1", "tag2", "important"]
},
// ...
];Tags with "important" get highlighted in the UI.
Contributions welcome! Areas that could use help:
- More questions for newer Cloudflare products
- Improved AI evaluation prompts
- Additional quiz modes (spaced repetition, timed)
- Markdown/code formatting in answers
- Export/import progress
MIT
- Built with Alchemy for Cloudflare deployment
- AI powered by Cloudflare Workers AI
- UI components styled with Tailwind CSS