An agent-native hosting experience: a control panel where a customer describes their business in one sentence and, seconds later, gets a real, branded, fully editable website — each running as its own isolated Worker with its own database.
It's the kind of product a hosting platform could ship to move from managing infrastructure to owning the web-experience layer — built entirely on Cloudflare Workers for Platforms and EmDash.
The button clones the repo and deploys the platform Worker + container into your account. This is an advanced, multi-service setup — Workers for Platforms, a dispatch namespace, a wildcard zone, and a couple of secrets are required. Follow Requirements and Setup to finish wiring it up. When connecting via the button / Workers Builds, set the build command to
./wfp/deployer/build-bundle.shso the EmDash bundle is generated before deploy.
- Customer signs in (email only in this demo) and sees their site dashboard.
- They click New website, describe it, and hit generate.
- Workers AI writes the brand (name, accent color, copy, testimonials, hours) and picks a template from a registry that best fits the business.
- The site is provisioned deploy-only (no per-site build, ~30–45s): a per-site D1 database is created and the prebuilt EmDash bundle is deployed into a dispatch namespace as an isolated user Worker, seeded with the AI content and Unsplash imagery.
- It's served at
https://<site>.sites.<yourdomain>and is a full CMS — editable by humans and AI agents (EmDash ships APIs + an MCP server).
Templates live in src/templates.ts (id, label, description,
keywords) with visual presets in
wfp/deployer/template-overrides/themes.css
— distinct font pairings, header layouts, hero styles, and shapes. The generator
matches each prompt to the best template; grow the library over time by adding
a registry entry + a style block (no per-site build).
Architecture & operational detail: see WORKERS-FOR-PLATFORMS.md.
- A Cloudflare account on a Workers Paid plan.
- Workers for Platforms enabled (Enterprise add-on / paid feature). Without it,
dispatch namespaces aren't available. Check:
npx wrangler dispatch-namespace list. - A Cloudflare zone (a domain on your account) for the generated sites'
wildcard subdomains, e.g.
*.sites.yourdomain.com.- A two-level wildcard (
*.sites.yourdomain.com) needs Advanced Certificate Manager (paid). A single-level wildcard (*.yourdomain.com) is covered by Universal SSL.
- A two-level wildcard (
- An API token (used by the deployer to create D1 + deploy sites) with: Workers Scripts:Edit, Workers for Platforms:Edit, D1:Edit, Workers KV Storage:Edit, Workers R2 Storage:Edit, Account Settings:Read (and, if you want the included wildcard DNS/ACM helper, Zone DNS:Edit + SSL:Edit).
- Docker (for local
wrangler deploycontainer image builds). - (Optional) an Unsplash API access key for topic-relevant imagery (falls back to keyword images with no key).
git clone https://github.com/scottbuscemi/emdash-platform-wfp
cd emdash-platform-wfp
npm install- Create the resources and note the ids:
npx wrangler dispatch-namespace create emdash-sites npx wrangler kv namespace create emdash-platform-wfp # -> DEMO_KV id npx wrangler kv namespace create emdash-session # -> SESSION_KV_ID npx wrangler r2 bucket create emdash-sites-media
- Fill in
wrangler.jsonc— replaceREPLACE_WITH_*(KV ids, account id) and setSITE_HOST_SUFFIXto your zone (e.g.sites.yourdomain.com). - Set secrets:
npx wrangler secret put CLOUDFLARE_API_TOKEN # the deploy-scoped token above npx wrangler secret put UNSPLASH_ACCESS_KEY # optional
- Build the EmDash bundle (the deployer image bakes it in):
Generates
./wfp/deployer/build-bundle.sh
wfp/deployer/emdash/distwith a fresh encryption key (git-ignored). - Deploy the platform Worker (builds + pushes the deployer container image):
npx wrangler deploy
- Deploy the dispatch router and point your wildcard at it:
Then add a proxied wildcard DNS record for
cd wfp/dispatch # edit wrangler.jsonc: set SITE_HOST_SUFFIX, the route pattern, and zone_name npx wrangler deploy
*.sites.yourdomain.comand (for a two-level wildcard) order an ACM certificate covering it. - Open the platform Worker's URL, sign in, and generate a site.
Rebuilding the template bundle: the EmDash bundle is pre-baked at
wfp/deployer/emdash/dist. To change templates/fonts/homepage, editwfp/deployer/template-overrides/*, runwfp/deployer/build-bundle.sh, then bumpDEPLOYERinsrc/index.ts(so a fresh deployer container pulls the new image) andnpx wrangler deploy.
- EmDash build fix: the bundle applies
emdash-cms/emdash#1613(an Astro-7 compiler fix); remove the patch once it ships in a published release. - Behind a TLS-inspecting corporate proxy? Drop your proxy's root CA (
*.crt) intowfp/deployer/certs/before building the deployer image (it's git-ignored). - Demo scope: the control-panel "login" is email-only (no real auth); generated sites use EmDash's passkey setup on first admin visit. Harden both for production.
MIT