π Production Ready | β‘ Cloudflare Edge Network | π€ AI-Generated Code
ZKode is an AI-powered coding platform that transforms natural language descriptions into fully functional web applications. Built with Cloudflare Workers and React, it provides an intuitive interface for generating, editing, and deploying web apps instantly.
- Staging:
https://zkode-staging.marioduerson34.workers.devβ - Production:
https://zkode-prod.marioduerson34.workers.devβ
β User Authentication & JWT Sessions β AI Code Generation (HTML, CSS, JavaScript) β Database Persistence (Cloudflare D1) β Template Management β Project CRUD Operations β User Preferences Management
- API Response Time: 0.1-0.9s
- AI Generation: ~42s (expected)
- Database Queries: <0.5ms
- Uptime: 100% since deployment
- AI Code Generation: Describe your app in natural language and watch it come to life
- Live Preview: Real-time preview of your generated applications
- Monaco Editor: Professional code editing experience
- One-Click Deploy: Deploy your apps instantly to Cloudflare Workers
- Template Library: Start with pre-built templates
- Modern UI: Clean, dark-themed interface built with React and Tailwind CSS
- Node.js 18+
- npm or yarn
- Cloudflare account (for deployment)
- Clone the repository
git clone <repository-url>
cd zkode- Install dependencies
npm run setup- Start development
# Terminal 1: Start the frontend
npm run start:frontend
# Terminal 2: Start the Worker (in another terminal)
npm run dev- Frontend: React + TypeScript + Vite + Tailwind CSS
- Backend: Cloudflare Workers
- AI: Cloudflare AI Gateway integration
- Storage: R2 for templates and projects
- Deployment: Workers for Platforms
zkode/
βββ frontend/ # React application
β βββ src/
β β βββ App.tsx # Main application component
β β βββ index.css # Global styles
βββ src/
β βββ worker.js # Cloudflare Worker
βββ templates/ # Code templates
βββ wrangler.toml # Cloudflare configuration
βββ package.json # Dependencies
cd frontend
npm run devnpm run devnpm run build# Deploy to staging
npm run deploy:staging
# Deploy to production
npm run deploy:prodAll endpoints have been tested and validated in production:
# Register new user
curl -X POST https://zkode-staging.marioduerson34.workers.dev/api/auth/register \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password123", "name": "User Name"}'
# Login
curl -X POST https://zkode-staging.marioduerson34.workers.dev/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password123"}'
# Get profile (requires JWT token)
curl -X GET https://zkode-staging.marioduerson34.workers.dev/api/auth/profile \
-H "Authorization: Bearer YOUR_JWT_TOKEN"# Generate code from prompt
curl -X POST https://zkode-staging.marioduerson34.workers.dev/api/generate \
-H "Content-Type: application/json" \
-d '{"prompt": "Create a simple HTML landing page", "framework": "html", "model": "balanced"}'# Get available templates
curl -X GET https://zkode-staging.marioduerson34.workers.dev/api/templates# List user projects (requires authentication)
curl -X GET https://zkode-staging.marioduerson34.workers.dev/api/projects \
-H "Authorization: Bearer YOUR_JWT_TOKEN"- Describe Your Vibe: Enter a natural language description of the app you want to create
- Generate Code: Click "Generate Code" to create your application
- Edit & Preview: Use the built-in editor to modify code and see live previews
- Deploy: One-click deployment to share your creation with the world
- "Create a modern todo app with dark theme and animations"
- "Build a landing page for a startup with hero section and features"
- "Make a calculator app with a sleek design"
- "Design a portfolio website with project showcase"
ZKode includes several pre-built templates:
- React Starter: Basic React application template
- Landing Page: Modern landing page with hero section
- Dashboard: Admin dashboard template
- Portfolio: Personal portfolio website
Update wrangler.toml with your Cloudflare account details:
name = "zkode"
main = "src/worker.js"
compatibility_date = "2024-12-01"
[[r2_buckets]]
binding = "TEMPLATES"
bucket_name = "your-templates-bucket"
[[r2_buckets]]
binding = "PROJECTS"
bucket_name = "your-projects-bucket"
[[ai]]
binding = "AI"- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by Cloudflare's AI coding platform
- Built with modern web technologies
- Powered by AI for creative coding
ZKode - Where ideas become code, instantly. β¨