A Bolt.new / Replit-style AI website builder that generates, previews, and deploys full-stack React applications directly in your browser.
- Natural language to full React application
- Powered by Groq's Llama model for fast inference
- Generates complete project structures with components, styling, and configuration
- WebContainer - Full Node.js runtime in the browser
- Live preview with hot reloading
- No server required - everything runs client-side
- File explorer with syntax-highlighted code editor
- GitHub Integration - Automatically creates repos and pushes code
- Vercel Deployment - Direct deployment to production
- Auto-fixes common AI mistakes (invalid icon imports, etc.)
- Get a live URL in under 2 minutes
- Frontend: React 18, TypeScript, Vite, Tailwind CSS
- Backend: Express, TypeScript, Groq SDK
- Editor: Monaco Editor (VS Code's editor)
- Preview: WebContainer API
- Deployment: Octokit (GitHub API), Vercel API
- Git: isomorphic-git with LightningFS
This project is my attempt to clone the magic of Bolt.new and Replit. The goal was to understand and recreate the core workflow:
- Init - Create a GitHub repository via API
- Code - AI generates React code in the browser
- Preview - WebContainer runs the code with live preview
- Sync - Push code to GitHub
- Deploy - Trigger Vercel deployment and get a live URL
- ✅ Full AI-to-deployment pipeline working
- ✅ WebContainer integration for in-browser Node.js
- ✅ Real-time code generation with streaming
- ✅ GitHub repo creation and file pushing
- ✅ Direct Vercel deployment (no GitHub integration required)
- ✅ Auto-correction of common AI code errors
- ✅ Beautiful dark-themed UI inspired by Bolt.new
- Frontend: https://frontend-seven-rho-wedgxycnon.vercel.app
- Backend API: https://be-woad-beta.vercel.app
- Node.js 18+
- npm or yarn
- Groq API key (Get one free)
- Clone the repository
git clone https://github.com/Sparshjoshi-iit/WebAI.git
cd WebAI- Install dependencies
# Install root dependencies
npm install
# Install frontend dependencies
cd frontend && npm install
# Install backend dependencies
cd ../be && npm install- Configure environment
# In the be/ folder, create .env file
cd be
echo "GROQ_API_KEY=your_groq_api_key_here" > .env- Run the development servers
# Terminal 1 - Backend (from be/ folder)
npm run dev
# Terminal 2 - Frontend (from frontend/ folder)
npm run dev- Open the app
- Frontend: http://localhost:5173
- Backend: http://localhost:3001
| Variable | Description | Required |
|---|---|---|
GROQ_API_KEY |
Your Groq API key for AI inference | Yes |
When using the deploy feature, users provide their own tokens:
- GitHub Personal Access Token - With
reposcope - Vercel Access Token - From Vercel dashboard
WebAI/
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── Builder.tsx # Main builder interface
│ │ │ ├── LandingPage.tsx
│ │ │ ├── Preview.tsx # WebContainer preview
│ │ │ ├── DeployPanel.tsx
│ │ │ └── ...
│ │ ├── hooks/
│ │ │ ├── useWebContainer.ts
│ │ │ └── useDeploy.ts
│ │ ├── services/ # API services
│ │ │ ├── github.ts # GitHub API (Octokit)
│ │ │ ├── vercel.ts # Vercel API
│ │ │ ├── git.ts # isomorphic-git
│ │ │ └── deploy.ts # Deployment orchestration
│ │ └── ...
│ └── vercel.json # Vercel config with COOP/COEP headers
│
├── be/ # Express backend
│ ├── src/
│ │ ├── index.ts # API routes
│ │ ├── prompts.ts # AI system prompts
│ │ └── defaults/ # Template files
│ └── vercel.json # Serverless config
│
└── README.md
- API Keys - Never commit
.envfiles. They're gitignored. - User Tokens - GitHub/Vercel tokens are stored in localStorage. Users should be cautious on shared devices.
- CORS Headers - WebContainer requires
Cross-Origin-Opener-PolicyandCross-Origin-Embedder-Policyheaders.
WebContainer only works in Chromium-based browsers:
- ✅ Chrome
- ✅ Edge
- ✅ Brave
- ❌ Firefox (not supported)
- ❌ Safari (not supported)
- Backend
cd be
vercel deploy --prod
# Add GROQ_API_KEY in Vercel dashboard > Settings > Environment Variables- Frontend
cd frontend
# Update BACKEND_URL in src/config.ts to your backend URL
vercel deploy --prodContributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
MIT License - feel free to use this for learning or building your own projects!
- Bolt.new - Inspiration for the UI/UX
- WebContainer API - In-browser Node.js runtime
- Groq - Fast AI inference
- Vercel - Deployment platform
- GitHub Copilot - AI pair programming assistant
Built with ❤️ by Sparsh Joshi