Overview

SiteCraft is an automated pipeline that transforms natural language website requests into fully deployed, production-grade websites. The entire process — from order intake to live deployment — happens without manual intervention.

💡
This documentation site is itself a product of the SiteCraft pipeline, serving as a live verification that the system is working correctly.

Key Components

  • Telegram Bot — receives and parses incoming order messages
  • AI Builder — generates multi-page websites from descriptions
  • Cloudflare Pages — hosts and serves the generated sites globally
  • Chat Widget — enables customers to request edits from their live site
  • Email Service — sends delivery confirmations via Resend

New Orders

A new order is triggered when a message containing NEW ORDER is sent to the Telegram bot. The message must include a Project ID, customer email, and a description of the desired website.

Order Format

text
NEW ORDER Project: <project-id> Email: <customer-email> Request: <natural language description>

What Happens

  • Order is parsed and validated
  • AI generates a multi-page website matching the request
  • Chat widget is injected into all HTML pages
  • Site is deployed to Cloudflare Pages
  • Customer receives an email with the live URL
  • Confirmation is sent back via Telegram

Edit Requests

Customers can request changes to their live site through the embedded chat widget or via Telegram. Edit requests are processed automatically.

text
EDIT REQUEST Project: <project-id> Changes: <description of changes>

The system locates the existing project files, applies the requested modifications, redeploys to Cloudflare, and notifies the customer through the chat widget.

Chat Widget

Every deployed site includes an embedded chat widget that allows customers to communicate directly from their website. The widget connects to the SiteCraft backend via a Cloudflare Worker.

Integration

html
<script src="https://site-builder-worker.ziyenw.workers.dev/widget/chat-widget.js" data-project="<project-id>"> </script>

The widget is automatically injected before the closing </body> tag of every HTML file during the build process.

Deployment

Sites are deployed to Cloudflare Pages, which provides global CDN distribution, automatic SSL, and instant cache invalidation on updates.

Deploy Process

bash
# Create project (first deploy only) npx wrangler pages project create <project-id> --production-branch main # Deploy files npx wrangler pages deploy ./builds/<project-id>/ \ --project-name <project-id>

Each project gets its own subdomain: <project-id>.pages.dev

Architecture

The SiteCraft pipeline follows a message-driven architecture with clear separation between intake, processing, and delivery.

diagram
TelegramOrder ParserAI BuilderDeploy (CF Pages) | | v v Confirmation Email (Resend) | CustomerChat WidgetLive Site
🚀
The entire pipeline is stateless — each order is processed independently. Project files persist in the builds directory for subsequent edit requests.