AI Site Generator Demo

Learn how Cloudflare Workers, AI, and Containers work together

Engineering effort: ~150 lines

Pipeline Steps Click any step to explore

1 Request
Worker receives prompt
-
🤖
2 AI Generate
Workers AI streams code
-
💾
3 DO + Container
Durable Object orchestrates
-
📦
4 Deploy
Write files to container
-
🌐
5 Preview
Public URL generated
-
- How It Works
Click a step above or generate a site to learn

This demo shows how Durable Objects orchestrate Containers to run isolated user code.

Each user gets their own DO, which manages a Container instance. Toggle between options to compare approaches.

Implementation Sandbox SDK
// Durable Objects + Containers
// 
// Each user gets their own Durable Object (DO).
// The DO manages a Container instance.
// 
// Sandbox SDK: DO lifecycle is automatic
// Raw Containers: You manage the DO yourself
Key Difference
Sandbox SDK: One line to get a container
Raw Containers: ~100 lines for lifecycle management

Your Request

Connecting...
// AI-generated code will appear here...