Describe it. Build it. Ship it.
Buildable is an AI-powered web application builder that converts natural language descriptions into production-ready React apps. A 2-agent LangGraph system generates and iterates on code in an isolated E2B sandbox โ with live preview, iterative chat refinement, and one-click deployment to Cloudflare Pages.
- Describe โ Write what you want in plain English
- Build โ A build agent (Sonnet 4.5) generates your app with automatic prompt enhancement
- Iterate โ Refine with follow-up messages; an edit agent (o4-mini) makes surgical changes with build validation
- Ship โ Preview live, download as ZIP, or deploy to Cloudflare Pages
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Frontend โ
โ Next.js 16 ยท TypeScript ยท Tailwind v4 โ
โ shadcn/ui ยท Monaco Editor ยท SSE Client โ
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTPS (SSE)
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Backend (FastAPI) โ
โ โ
โ โโโโ First Build โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ guardrail โ enhancer โ build agent โ assembler โ โ
โ โ โ sandbox โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโ Follow-up โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ guardrail โ edit agent โ validate โ error fix โ โ
โ โ โ sandbox โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ Auth (JWT) ยท PostgreSQL ยท Cloudflare R2 ยท E2B Sandbox โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Agent | Model | Tools | Role |
|---|---|---|---|
| Build | Sonnet 4.5 | create_app, web_search |
Initial app generation from prompt |
| Edit | o4-mini | modify_app, chat_message, web_search |
Follow-up edits + error fixes |
Supporting steps:
- Guardrail โ Classifies every message as "build" or "chat" (questions vs change requests)
- Prompt Enhancer โ Lightly expands vague prompts (e.g. "todo app" โ adds key features). Additive only, skipped if prompt is already detailed
- Assembler โ Merges LLM files with base template, protects locked config files
- Validation Loop โ On edits: write โ
npm run buildโ if fail โ error fix agent โ retry (max 3)
Backend: Python 3.12+, FastAPI, LangGraph, LangChain, SQLAlchemy (async), E2B, Cloudflare R2, Alembic
Frontend: Next.js 16 (App Router), TypeScript, Tailwind CSS v4, shadcn/ui, Monaco Editor, Axios, SSE
Infrastructure: DigitalOcean, Nginx, Certbot, Terraform, Neon PostgreSQL, Vercel
Models: Hardcoded via OpenRouter (BYOK) โ Sonnet 4.5 for builds, o4-mini for edits/guardrail/enhancement
- Python 3.12+
- uv (Python package manager)
- Node.js 24+
- Docker (for PostgreSQL)
- E2B API key
# Clone
git clone https://github.com/BihanBanerjee/Buildable.git
cd Buildable
# Backend
cp .env.example .env # Fill in required values
docker-compose up -d # Start PostgreSQL
uv sync # Install Python deps
uv run alembic upgrade head # Run migrations
uv run main.py # Start backend on :8000
# Frontend
cd frontend
npm install
npm run dev # Start frontend on :3000| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Yes | PostgreSQL connection string (asyncpg) |
SECRET_KEY |
Yes | JWT signing key |
E2B_API_KEY |
Yes | E2B sandbox API key |
E2B_TEMPLATE_ID |
No | Custom E2B template |
R2_ACCESS_KEY |
No | Cloudflare R2 access key |
R2_SECRET_KEY |
No | Cloudflare R2 secret key |
R2_ENDPOINT |
No | Cloudflare R2 endpoint URL |
R2_BUCKET_NAME |
No | R2 bucket name |
CLOUDFLARE_ACCOUNT_ID |
No | Cloudflare account ID (for deployment) |
CLOUDFLARE_API_TOKEN |
No | Cloudflare API token (for deployment) |
FRONTEND_URL |
No | Frontend URL for CORS (default: http://localhost:3000) |
โโโ main.py # FastAPI entry point
โโโ agent/
โ โโโ service.py # Orchestration + sandbox lifecycle
โ โโโ agent.py # LLM configuration (models, OpenRouter)
โ โโโ build_agent.py # Build agent (Sonnet 4.5)
โ โโโ edit_agent.py # Edit agent + error fix (o4-mini)
โ โโโ tools.py # Pure-data tools (create_app, modify_app, etc.)
โ โโโ prompts.py # All LLM prompts
โ โโโ assembler.py # Merge generated files with base template
โ โโโ sandbox.py # E2B sandbox lifecycle
โ โโโ base_template.py # Base project files + LOCKED_FILES
โโโ auth/ # JWT auth (register, login, refresh)
โโโ db/ # SQLAlchemy models + base
โโโ utils/
โ โโโ r2.py # Cloudflare R2 client
โ โโโ store.py # Dual-write (R2 + local cache)
โ โโโ cloudflare.py # Cloudflare Pages deployment
โโโ alembic/ # Database migrations
โโโ frontend/
โ โโโ app/ # Next.js pages (/, /chat, /chat/[id])
โ โโโ components/ # UI components (shadcn + chat)
โ โโโ lib/ # SSE handlers, types, utils
โ โโโ api/ # Axios client (auth, chat)
โโโ deploy/ # Terraform + systemd service
โโโ nginx/ # Nginx config + SSL setup
โโโ .github/workflows/ # CI/CD pipelines
- CI โ Runs on every push: frontend lint + build, backend ruff + syntax check
- CD โ Auto-deploys backend to DigitalOcean after CI passes
- Frontend โ Auto-deployed by Vercel on push
MIT

