A modern web application that converts wireframes and UI screenshots into clean, responsive React/JSX code using AI.
- 🎨 Drag & Drop Upload: Easy image upload with drag-and-drop support
- 🤖 AI-Powered Code Generation: Uses OpenAI to generate clean React/JSX code
- 🎯 Layout Detection: Analyzes wireframes to detect UI elements and structure
- 💻 Syntax Highlighting: Beautiful code display with syntax highlighting
- 🌙 Dark Mode: Toggle between light and dark themes
- 📱 Responsive Design: Works perfectly on desktop and mobile devices
- React 18 with TypeScript
- Vite for fast development and building
- Tailwind CSS for styling
- shadcn/ui for UI components
- React Router for navigation
- React Query for data fetching
- FastAPI for the API server
- OpenAI API for code generation
- PIL for image processing
- Python-multipart for file uploads
- Node.js 18+ and npm
- Python 3.8+ and pip
- OpenAI API key
- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser:
Navigate to
http://localhost:5173
- Navigate to backend directory:
cd backend- Install Python dependencies:
pip install -r requirements.txt- Create environment file:
Create a
.envfile in the backend directory:
OPENAI_API_KEY=your_openai_api_key_here
HOST=0.0.0.0
PORT=8000
DEBUG=True- Start the backend server:
python run.pyThe API will be available at http://localhost:8000
- Upload a wireframe: Drag and drop or click to upload an image
- Generate code: Click the "Generate Code" button
- View results: The generated React/JSX code will appear in the code block
- Copy code: Use the syntax highlighter to copy the generated code
GET /- Health checkGET /health- Health checkPOST /generate- Generate code from uploaded image
wireflow/
├── src/
│ ├── components/ # React components
│ ├── lib/ # Utilities and API functions
│ ├── pages/ # Page components
│ └── hooks/ # Custom React hooks
├── backend/
│ ├── services/ # Backend services
│ ├── main.py # FastAPI application
│ └── requirements.txt
└── public/ # Static assets
Frontend:
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
Backend:
python run.py- Start FastAPI serverpython -m uvicorn main:app --reload- Start with auto-reload
Wireflow was built as a learning project to explore:
- Fast prototyping using modern AI tools
- Building full-stack MVPs with React and FastAPI
- Working with OpenAI APIs and image processing