Sketch β Intent β Audit β Blueprint β Production React Code
Upload a wireframe. Get a full frontend. In minutes.
SketchFlow AI transforms a hand-drawn wireframe or whiteboard photo into a fully structured, production-ready React application β using Claude's vision and reasoning capabilities across a five-stage pipeline.
Most teams fail not because they can't code, but because they start coding before requirements are complete. SketchFlow forces the right order: understand first, build second.
πΈ Sketch Image
β
βΌ
βββββββββββββββββββββββ
β 1. Vision Extract β Claude reads your sketch and extracts structured product intent
β (Claude API) β β screens, features, user flows, layout, open questions
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β 2. Intent Editor β You review and edit the extracted intent before anything proceeds
β (Human step) β β correct names, add screens, remove wrong assumptions
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β 3. Product Audit β Claude acts as a PM reviewer β finds missing screens,
β (Claude API) β broken flows, missing UI states, UX issues, industry requirements
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β 4. Blueprint β Architecture document: screen inventory, component inventory,
β (Claude API) β design system, user flows, responsive requirements, libraries
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β 5. Code Generation β Two-pass React generation using image + intent + audit + blueprint
β (Claude API) β β Download a ready-to-run ZIP with package.json + README
βββββββββββββββββββββββ
- Claude Vision β reads any wireframe: hand-drawn, Figma export, whiteboard photo, napkin sketch
- Intent Editor β fully editable before anything is locked in; add/remove screens, features, flows
- PM-grade Audit β missing screens, broken user flows, missing UI states, UX issues, industry compliance
- Frontend Blueprint β screen inventory, component inventory, design system, responsive requirements
- Two-pass Code Generation β core structure first, then pages and config; image-grounded output
- Smart package.json β named after your product, includes all libraries the blueprint recommends
- Step-by-step README β every generated ZIP includes a README so anyone can run it immediately
- Truncation recovery β if Claude's response is cut short, the parser salvages the valid portion
- SQLite persistence β every project step is saved; nothing is lost on restart
| Layer | Technology |
|---|---|
| AI | Anthropic Claude (Vision + Generation) |
| Backend | Python 3.10, FastAPI, SQLAlchemy, SQLite |
| Frontend | React 18, TypeScript, Vite, TailwindCSS |
| Output | React + Vite + TypeScript + TailwindCSS project |
- Python 3.10+
- Node.js 18+
- An Anthropic API key
git clone https://github.com/yourusername/sketchflow-v2.git
cd sketchflow-v2cd backend
# Create and activate virtual environment
python -m venv venv
# Windows
venv\Scripts\activate
# macOS / Linux
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtCreate a .env file in the backend/ directory:
ANTHROPIC_API_KEY=sk-ant-your-key-here
CLAUDE_MODEL=claude-haiku-4-5-20251001
DATABASE_URL=sqlite:///./sketchflow.dbStart the backend:
uvicorn main:app --reload --port 8000API docs available at: http://localhost:8000/docs
cd frontend
npm install
npm run devOpen http://localhost:5173 in your browser.
sketchflow-v2/
βββ backend/
β βββ main.py # FastAPI app entry point
β βββ app/
β βββ api/
β β βββ routes.py # All API endpoints
β βββ core/
β β βββ config.py # Settings from .env
β β βββ database.py # SQLAlchemy + SQLite setup
β βββ models/
β β βββ models.py # DB models (Project, Intent, Audit, Blueprint, Generation)
β βββ schemas/
β β βββ schemas.py # Pydantic request/response schemas
β βββ services/
β β βββ vision_service.py # Stage 1: Claude Vision intent extraction
β β βββ audit_service.py # Stage 3: PM audit via Claude
β β βββ blueprint_service.py # Stage 4: Architecture blueprint via Claude
β β βββ codegen_service.py # Stage 5: Two-pass React code generation
β βββ utils/
β βββ zip_utils.py # ZIP packaging for generated projects
β
βββ frontend/
βββ src/
β βββ App.tsx # Root component, step state machine
β βββ api/client.ts # All backend API calls
β βββ types/index.ts # TypeScript interfaces
β βββ pages/
β βββ UploadStep.tsx # Step 1: Sketch upload with drag-and-drop
β βββ IntentStep.tsx # Step 2: Intent review and edit
β βββ AuditStep.tsx # Step 3: Audit results display
β βββ BlueprintStep.tsx # Step 4: Blueprint viewer
β βββ GenerateStep.tsx # Step 5: Generate and download
βββ vite.config.ts
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/health |
Health check |
POST |
/api/projects/upload |
Upload sketch image, extract intent |
GET |
/api/projects/{id}/intent |
Get extracted intent |
PATCH |
/api/projects/{id}/intent |
Save intent edits |
POST |
/api/projects/{id}/intent/confirm |
Lock in intent, proceed to audit |
POST |
/api/projects/{id}/audit |
Run PM audit |
GET |
/api/projects/{id}/audit |
Get audit results |
POST |
/api/projects/{id}/blueprint |
Generate frontend blueprint |
GET |
/api/projects/{id}/blueprint |
Get blueprint |
POST |
/api/projects/{id}/generate |
Generate React frontend ZIP |
GET |
/api/projects/{id}/download |
Download ZIP file |
Every downloaded ZIP contains a complete, runnable React project:
your-project/
βββ src/
β βββ App.tsx # Root with React Router
β βββ main.tsx # Entry point
β βββ index.css # Tailwind imports
β βββ types/index.ts # TypeScript interfaces
β βββ components/
β β βββ layout/
β β β βββ Layout.tsx # App shell
β β β βββ Sidebar.tsx # Navigation sidebar
β β β βββ Navbar.tsx # Top navbar
β β βββ ui/
β β βββ StatCard.tsx # KPI card component
β β βββ DataTable.tsx # Reusable data table
β β βββ Badge.tsx # Status badge
β βββ pages/
β β βββ Dashboard.tsx
β β βββ Orders.tsx
β β βββ Products.tsx
β βββ hooks/
β βββ useSidebar.ts
βββ package.json # Named after your product, correct deps
βββ vite.config.ts
βββ tailwind.config.js
βββ tsconfig.json
βββ index.html
βββ README.md # Step-by-step run instructions
Run it with:
npm install
npm run devSketchFlow uses a two-pass generation strategy to stay within Claude's output limits while producing a complete project:
Pass 1 β Claude receives the sketch image + full context and generates the core structure: App.tsx, Layout.tsx, Sidebar.tsx, Navbar.tsx, types/index.ts, and the primary Dashboard.tsx page.
Pass 2 β Claude receives the Pass 1 output as context and generates the remaining files: additional pages, reusable UI components, hooks, and all config files.
package.json and README.md are always generated in Python β not by Claude β so they are always present, valid, and reflect the actual product name and libraries from the blueprint.
| Variable | Description | Default |
|---|---|---|
ANTHROPIC_API_KEY |
Your Anthropic API key | Required |
CLAUDE_MODEL |
Claude model to use | claude-haiku-4-5-20251001 |
DATABASE_URL |
SQLAlchemy DB URL | sqlite:///./sketchflow.db |
- Generated code is a strong starting point, not a finished product β expect to customise routing, data fetching, and business logic
- Very complex sketches with 15+ screens may produce incomplete output from the haiku model; switch to a larger model in
.envfor better results - The SQLite database is local and single-user; for team use, swap to PostgreSQL via
DATABASE_URL
- Anthropic Claude β Vision, reasoning, and code generation
- FastAPI β Backend API framework
- SQLAlchemy β ORM and database layer
- React β Frontend UI framework
- Vite β Build tool
- TailwindCSS β Utility-first styling