Skip to content

GauravSingh9356/Gaurav-s-Bolt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

⚑ Bolt: AI Website Builder

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 deployment
  • frontend/website-maker β€” React + Vite web app for user interaction

πŸš€ Features

  • 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.

πŸ—‚οΈ Project Structure

.
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ .env
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ server.js
β”‚   └── .netlify/
β”‚       └── netlify.toml
└── frontend/
    └── website-maker/
        β”œβ”€β”€ package.json
        β”œβ”€β”€ index.html
        β”œβ”€β”€ src/
        β”‚   β”œβ”€β”€ App.jsx
        β”‚   β”œβ”€β”€ main.jsx
        β”‚   └── ...
        └── ...

πŸ› οΈ Prerequisites

  • Node.js (v18+ recommended)
  • npm
  • Netlify CLI (npm install -g netlify-cli)
  • OpenAI API key (for backend .env)

βš™οΈ Backend Setup (backend/)

  1. Install dependencies:

    cd backend
    npm install
  2. Configure environment:

    • Create a .env file in backend/:
      OPENAI_API_KEY=sk-...
      
    • (Already present in your workspace.)
  3. Start the backend server:

    npm start
    • Runs on http://localhost:4000
    • Endpoints:
      • POST /generate-site β€” Generates website code from prompt
      • POST /deploy β€” Deploys generated site to Netlify
  4. Netlify Setup:

    • Ensure your Netlify site ID and token are set in server.js.
    • Netlify CLI must be installed and authenticated (netlify login).

🎨 Frontend Setup (frontend/website-maker/)

  1. Install dependencies:

    cd frontend/website-maker
    npm install
  2. Start the development server:

    npm run dev
  3. 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.

🌐 Full Workflow

  1. User enters a prompt in the frontend.
  2. Frontend sends the prompt to POST /generate-site on the backend.
  3. Backend calls OpenAI to generate HTML, CSS, JS, and returns them as JSON.
  4. Frontend displays the generated code and live preview.
  5. User can edit the code, download as ZIP, or deploy live.
  6. Deploy: Frontend sends files to POST /deploy on the backend, which uploads to Netlify and returns a live URL.

πŸ“ Customization

  • AI Prompting: Modify the system prompt in server.js for different generation styles.
  • Deployment: Update Netlify credentials in server.js as needed.

πŸ§‘β€πŸ’» Development Notes


πŸ“¦ Production

  • Build frontend:
    npm run build
  • Serve static files or deploy as needed.

πŸ›‘οΈ Security

  • Never commit your .env or API keys to public repositories.
  • Restrict Netlify tokens and OpenAI keys.

πŸ“„ License

MIT


Made with ⚑ by Gaurav

About

Platform to create static website maker using LLMs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published