Bolt is a full-stack AI-powered website builder that lets you generate, edit, preview, download, and deploy modern websites with a single prompt. The project is split into two main parts:
backendβ Node.js/Express API for AI generation and Netlify deploymentfrontend/website-makerβ React + Vite web app for user interaction
- AI Website Generation: Describe your website, and AI generates HTML, CSS, and JS.
- Live Editing: Edit the generated code in a beautiful, multi-tab editor.
- Instant Preview: See your changes live as you type.
- Download as ZIP: Download your site as a ready-to-use ZIP file.
- One-click Deploy: Deploy your site to Netlify with a single click.
.
βββ backend/
β βββ .env
β βββ package.json
β βββ server.js
β βββ .netlify/
β βββ netlify.toml
βββ frontend/
βββ website-maker/
βββ package.json
βββ index.html
βββ src/
β βββ App.jsx
β βββ main.jsx
β βββ ...
βββ ...
- Node.js (v18+ recommended)
- npm
- Netlify CLI (
npm install -g netlify-cli) - OpenAI API key (for backend
.env)
-
Install dependencies:
cd backend npm install -
Configure environment:
- Create a
.envfile inbackend/:OPENAI_API_KEY=sk-... - (Already present in your workspace.)
- Create a
-
Start the backend server:
npm start
- Runs on http://localhost:4000
- Endpoints:
POST /generate-siteβ Generates website code from promptPOST /deployβ Deploys generated site to Netlify
-
Netlify Setup:
- Ensure your Netlify site ID and token are set in
server.js. - Netlify CLI must be installed and authenticated (
netlify login).
- Ensure your Netlify site ID and token are set in
-
Install dependencies:
cd frontend/website-maker npm install -
Start the development server:
npm run dev
- Runs on http://localhost:5173 (default Vite port)
-
Usage Flow:
- Enter a prompt describing your desired website.
- Click "Build with AI" to generate the site.
- Edit HTML, CSS, or JS in the editor tabs.
- Preview updates live.
- Download your site as a ZIP or deploy it live to Netlify.
- User enters a prompt in the frontend.
- Frontend sends the prompt to
POST /generate-siteon the backend. - Backend calls OpenAI to generate HTML, CSS, JS, and returns them as JSON.
- Frontend displays the generated code and live preview.
- User can edit the code, download as ZIP, or deploy live.
- Deploy: Frontend sends files to
POST /deployon the backend, which uploads to Netlify and returns a live URL.
- AI Prompting: Modify the system prompt in
server.jsfor different generation styles. - Deployment: Update Netlify credentials in
server.jsas needed.
- Frontend uses Vite + React + Tailwind CSS.
- Backend uses Express, node-fetch, and dotenv.
- Ensure CORS is enabled for local development.
- Build frontend:
npm run build
- Serve static files or deploy as needed.
- Never commit your
.envor API keys to public repositories. - Restrict Netlify tokens and OpenAI keys.
MIT
Made with β‘ by Gaurav