by mggger
Web builder AI-Agent
# Add to your Claude Code skills
git clone https://github.com/mggger/WebCraftAn AI-powered web design agent that dynamically generates web pages and provides real-time interactive editing capabilities for each component.
Install dependencies
npm install
Configure Cloudflare R2
Modify wrangler.toml to bind your Cloudflare R2 bucket:
[[r2_buckets]]
binding = "R2_BUCKET"
bucket_name = "your-bucket-name"
Configure Environment Variables
Update the variables in wrangler.toml:
[vars]
ANTHROPIC_API_KEY = "your-anthropic-api-key"
R2_ENDPOINT_URL = "https://your-r2-custom-domain.com"
IMPORTANT: Ensure your R2_ENDPOINT_URL allows cross-origin access (CORS). This is critical as the generated web pages will need to access images from this endpoint. Without proper CORS configuration, the images won't display correctly.
To run the application locally:
npm start
This will start the development server with hot reloading enabled.
To deploy the application to Cloudflare:
npm run deploy
This command builds the application and deploys it to Cloudflare in one step.
This project utilizes advanced AI agent technology to dynamically generate web pages. Key features include:
Dynamic Web Page Generation: AI-powered creation of responsive web layouts based on user requirements
Real-time Component Editing: Each UI component can be edited interactively in the browser
WebSocket Real-time Status Updates: Provides immediate feedback during the design generation process
Cloudflare-based Architecture: Built on Cloudflare's infrastructure for reliability and performance