An AI-powered application builder that generates and deploys web applications to Kubernetes using OpenAI's API. Similar to Lovable.ai, this platform allows you to describe your application in natural language and automatically generates, builds, and deploys it.
- 🤖 AI-Powered Code Generation: Uses OpenAI GPT-4 to generate code based on natural language prompts
- 🚀 Multi-Framework Support: Supports React, Vue, Angular, Next.js, Nuxt.js, Flutter, React Native, and Svelte
- ☸️ Kubernetes Integration: Automatically deploys applications to Kubernetes pods with services
- 🛠️ Interactive Development: Provides tools for file operations, code execution, and code search within deployed pods
- 📝 File Management: Read, write, and manage files directly in Kubernetes pods
- 🔍 Code Search: Search across codebases to understand project structure and patterns
- ⚡ Hot Module Reload: Supports file watching and hot reloading for rapid development
The application consists of:
- Express API Server: RESTful API that handles agent requests
- OpenAI Integration: Uses GPT-4 with function calling to interact with Kubernetes pods
- Kubernetes Client: Manages deployments, services, and pod interactions
- Agent Tools: Set of functions that allow the AI to:
- Read and write files in pods
- Execute shell commands (npm install, npm run dev, etc.)
- List directory contents
- Search code across the codebase
- Bun runtime (v1.2.20+)
- Kubernetes cluster access (via kubeconfig or in-cluster config)
- OpenAI API key
kubectlinstalled and configured
bun installSet the following environment variables:
OPENAI_API_KEY=your_openai_api_key
OPENAI_MODEL=gpt-4o-mini # Optional, defaults to gpt-4o-mini
PORT=3000 # Optional, defaults to 3000
NAMESPACE=default # Optional, defaults to "default"
LABEL_SELECTOR=app=react-app # Optional, defaults to "app=react-app"
KUBECONFIG=~/.kube/config # Optional, uses default kubeconfig locationbun run index.tsSend a POST request to /agent with your application description:
curl -X POST http://localhost:3000/agent \
-H "Content-Type: application/json" \
-d '{
"prompt": "Create a todo app with React that allows users to add, complete, and delete tasks"
}'The agent will:
- Start a base image deployment (e.g., React)
- Inspect the project structure
- Generate and write code files
- Install dependencies
- Run the development server
react- React with TypeScriptvue- Vue.jsangular- Angularnextjs- Next.jsnuxtjs- Nuxt.jsflutter- Flutterreact-native- React Nativesvelte- Svelte
GET /- Health check endpointPOST /agent- Main agent endpoint that accepts prompts and builds applications
- User sends a prompt describing the application they want to build
- AI agent analyzes the prompt and determines which base image to use
- Kubernetes deployment is created with the selected base image
- AI agent interacts with the pod using tools to:
- Explore the project structure
- Generate code files
- Install dependencies
- Run development servers
- Application is deployed and accessible via Kubernetes service
.
├── index.ts # Main Express server and agent logic
├── k8s-deployments.ts # Kubernetes deployment and service creation
├── package.json # Dependencies and project configuration
└── README.md # This file
- Bun: Fast JavaScript runtime
- Express: Web framework
- OpenAI API: GPT-4 for code generation
- Kubernetes Client: Node.js client for Kubernetes operations
- TypeScript: Type-safe development
Private project - All rights reserved