Skip to content

Zo-hund/Zkode

Repository files navigation

ZKode - AI-Powered Vibe Coding Platform

πŸš€ Production Ready | ⚑ Cloudflare Edge Network | πŸ€– AI-Generated Code

Deploy to Cloudflare

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.

🌟 Live Production Status

API Endpoints (Operational)

  • Staging: https://zkode-staging.marioduerson34.workers.dev βœ…
  • Production: https://zkode-prod.marioduerson34.workers.dev βœ…

Validated Features βœ… All Working

βœ… User Authentication & JWT Sessions βœ… AI Code Generation (HTML, CSS, JavaScript) βœ… Database Persistence (Cloudflare D1) βœ… Template Management βœ… Project CRUD Operations βœ… User Preferences Management

Performance Metrics

  • API Response Time: 0.1-0.9s
  • AI Generation: ~42s (expected)
  • Database Queries: <0.5ms
  • Uptime: 100% since deployment

✨ Features

  • 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

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Cloudflare account (for deployment)

Installation

  1. Clone the repository
git clone <repository-url>
cd zkode
  1. Install dependencies
npm run setup
  1. Start development
# Terminal 1: Start the frontend
npm run start:frontend

# Terminal 2: Start the Worker (in another terminal)
npm run dev

πŸ—οΈ Architecture

  • Frontend: React + TypeScript + Vite + Tailwind CSS
  • Backend: Cloudflare Workers
  • AI: Cloudflare AI Gateway integration
  • Storage: R2 for templates and projects
  • Deployment: Workers for Platforms

πŸ“ Project Structure

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

πŸ› οΈ Development

Frontend Development

cd frontend
npm run dev

Worker Development

npm run dev

Building for Production

npm run build

Deployment

# Deploy to staging
npm run deploy:staging

# Deploy to production
npm run deploy:prod

πŸ§ͺ Validated API Endpoints

All endpoints have been tested and validated in production:

Authentication (/api/auth/*)

# 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"

AI Code Generation (/api/generate)

# 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"}'

Templates (/api/templates)

# Get available templates
curl -X GET https://zkode-staging.marioduerson34.workers.dev/api/templates

Projects (/api/projects)

# List user projects (requires authentication)
curl -X GET https://zkode-staging.marioduerson34.workers.dev/api/projects \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

🎯 Usage

  1. Describe Your Vibe: Enter a natural language description of the app you want to create
  2. Generate Code: Click "Generate Code" to create your application
  3. Edit & Preview: Use the built-in editor to modify code and see live previews
  4. Deploy: One-click deployment to share your creation with the world

Example Prompts

  • "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"

🎨 Templates

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

βš™οΈ Configuration

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"

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Inspired by Cloudflare's AI coding platform
  • Built with modern web technologies
  • Powered by AI for creative coding

ZKode - Where ideas become code, instantly. ✨

About

AI powered by vibe coding platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors