Interactive tutorials and hands-on labs to build production-ready applications on Cloudflare's developer platform.
Cloudflare Workers
- Build serverless applications at the edge
- Create HTTP APIs with routing
- Integrate with KV storage and D1 databases
- Add AI-powered features with Workers AI
Model Context Protocol (MCP)
- Build intelligent AI assistants
- Connect to external systems and APIs
- Create custom AI tools and workflows
- Deploy MCP servers globally
- Node.js v18+ - Download here
- Cloudflare Account - Sign up free
- Wrangler CLI - Install with
npm install -g wrangler
# Clone the repository
git clone https://github.com/lauragift21/developer-labs.git
cd developer-labs
# Install dependencies
npm install
# Start development server
npm run devVisit http://localhost:4321 to see the site locally.
# Login to Cloudflare (first time only)
wrangler login
# Deploy to production
npm run deploydeveloper-labs/
โโโ public/ # Static assets
โ โโโ assets/
โ โ โโโ css/ # Stylesheets
โ โ โโโ js/ # JavaScript files
โ โ โโโ og-image.png # Social media image
โ โโโ favicon.svg # Site favicon
โโโ src/
โ โโโ components/ # Reusable Astro components
โ โ โโโ Alert.astro
โ โ โโโ Callout.astro
โ โ โโโ CodeBlock.astro
โ โโโ content/ # Markdown content
โ โ โโโ mcp-steps/ # MCP tutorial steps
โ โ โโโ workers-steps/ # Workers tutorial steps
โ โโโ layouts/
โ โ โโโ Layout.astro # Main layout template
โ โโโ pages/ # Site pages
โ โโโ labs/
โ โ โโโ index.astro # Labs overview
โ โ โโโ mcp/ # MCP tutorial
โ โ โโโ workers/ # Workers tutorial
โ โโโ index.astro # Homepage (redirects to /labs)
โโโ astro.config.mjs # Astro configuration
โโโ wrangler.jsonc # Cloudflare Workers config
โโโ package.json
| Command | Action |
|---|---|
npm install |
Install dependencies |
npm run dev |
Start development server at localhost:4321 |
npm run build |
Build production site to ./dist/ |
npm run preview |
Preview build locally |
npm run deploy |
Build and deploy to Cloudflare Workers |
npm run astro ... |
Run Astro CLI commands |
- Interactive Tutorials: Step-by-step labs with hands-on coding
- Progressive Learning: From basics to advanced concepts
- Real Deployments: Every lab results in a working application
- Modern Stack: Built with Astro, deployed on Cloudflare Workers
- Responsive Design: Works perfectly on desktop and mobile
- SEO Optimized: Complete meta tags and structured data
- Hello World - Your first Worker
- HTTP APIs - Building REST endpoints
- KV Storage - Persistent data storage
- D1 Database - SQL database integration
- Workers AI - AI-powered applications
- Advanced Routing - Complex request handling
- Production Deploy - Going live globally
- MCP Basics - Understanding the protocol
- First Server - Building your first MCP server
- Custom Tools - Creating AI assistant tools
- External APIs - Connecting to third-party services
- Persistent State - Using KV for data storage
- Advanced Features - Complex workflows and patterns
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test thoroughly
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
To add a new lab step:
- Create a new markdown file in
src/content/workers-steps/orsrc/content/mcp-steps/ - Follow the existing frontmatter format:
--- stepNumber: 8 title: "Your Lab Title" description: "Brief description of what students will learn" duration: "15 min" learningObjectives: - "Objective 1" - "Objective 2" ---
- Write your tutorial content in markdown
- Test locally with
npm run dev
This project is licensed under the MIT License - see the LICENSE file for details.
- Built by the Cloudflare Developer Relations team
- Powered by Astro and Cloudflare Workers
- Community feedback and contributions
Ready to start building? Visit developer-labs.examples.workers.dev and choose your first lab!