Utilizziamo i cookie per migliorare la tua esperienza sul sito
CodeWorlds
Torna alle collezioni
Guide30 min read

Bolt.new

Bolt.new is an AI fullstack app builder by StackBlitz. Complete guide - building web applications from prompts, WebContainers, iterative development, and one-click deploy.

Bolt.new - Kompletny Przewodnik po AI Fullstack Builder

Czym jest Bolt.new?

Bolt.new to rewolucyjne narzędzie od StackBlitz, które pozwala budować kompletne aplikacje webowe z opisów tekstowych. Wykorzystuje unikową technologię WebContainers do uruchamiania Node.js bezpośrednio w przeglądarce, co oznacza natychmiastowy start bez żadnej lokalnej instalacji.

W przeciwieństwie do innych generatorów AI, Bolt tworzy nie tylko frontend, ale pełne aplikacje fullstack z backendem, bazą danych i API - wszystko działające od razu w przeglądarce. Możesz iteracyjnie rozwijać projekt, rozmawiając z AI jak z doświadczonym programistą.

Dlaczego Bolt.new?

Kluczowe zalety

  1. Kompletne aplikacje fullstack - Nie tylko UI, ale cały stack
  2. Natychmiastowy feedback - WebContainers uruchamiają kod od razu
  3. Zero konfiguracji - Bez Node.js, npm, czy środowiska lokalnego
  4. Iteracyjny rozwój - Rozmawiaj z AI i wprowadzaj zmiany na żywo
  5. Deploy jednym klikiem - Wbudowana integracja z Netlify
  6. Kod do pobrania - Pełny eksport projektu

Bolt vs v0 vs Lovable

CechaBolt.newv0 by VercelLovable
TypFullstack appsUI componentsFullstack apps
BackendTak (Express, Fastify)NieTak (Supabase)
Baza danychSQLite, PostgreSQLNiePostgreSQL
ŚrodowiskoWebContainers (w przeglądarce)Kod do pobraniaCloud IDE
DeployNetlify (wbudowany)Vercel (zewnętrzny)Vercel/Netlify
GitHubEksportTakNatywna integracja
Cena (Pro)$20/miesiąc$20/miesiąc$20/miesiąc

Jak działa Bolt.new?

Technologia WebContainers

WebContainers to przełomowa technologia StackBlitz, która uruchamia Node.js bezpośrednio w przeglądarce poprzez WebAssembly. To oznacza:

  • Natychmiastowy start - Bez pobierania czy instalacji
  • Bezpieczeństwo - Kod działa w sandbox przeglądarki
  • Pełna funkcjonalność - npm, file system, procesy
  • Offline support - Działa nawet bez internetu (po pierwszym załadowaniu)
Code
JavaScript
// Co WebContainers mogą uruchamiać:
// ✅ Express.js / Fastify servers
// ✅ React / Vue / Svelte / Next.js
// ✅ SQLite databases
// ✅ npm packages (większość)
// ✅ TypeScript compilation
// ✅ Bundlers (Vite, esbuild)

// Ograniczenia:
// ❌ Native binaries (sharp, bcrypt)
// ❌ Duże frameworki backendowe (NestJS partially)
// ❌ PostgreSQL/MySQL (tylko SQLite natywnie)

Workflow budowania aplikacji

  1. Opisz aplikację - Napisz prompt opisujący co chcesz zbudować
  2. Bolt generuje kod - AI tworzy pełną strukturę projektu
  3. Podgląd na żywo - Widzisz działającą aplikację od razu
  4. Iteruj przez chat - Dodawaj funkcje, poprawiaj błędy
  5. Deploy jednym klikiem - Publikuj na Netlify

Generowanie aplikacji z promptów

Skuteczne prompty

Struktura dobrego promptu:

Code
TEXT
Build a [typ aplikacji] with [główne technologie].

Features:
- [Funkcja 1]
- [Funkcja 2]
- [Funkcja 3]

Requirements:
- [Wymaganie techniczne 1]
- [Wymaganie techniczne 2]

Design:
- [Preferencje designu]

Przykłady skutecznych promptów

Todo App z kategoriami

Code
TEXT
Build a todo app with React and TypeScript.

Features:
- Add, edit, delete tasks
- Categories with color coding
- Priority levels (low, medium, high)
- Due dates with calendar picker
- Drag and drop sorting
- Local storage persistence
- Dark mode support

Design:
- Clean, minimal UI
- Smooth animations
- Mobile responsive

Blog Platform

Code
TEXT
Build a blog platform with React, Express, and SQLite.

Features:
- Markdown editor with preview
- Categories and tags
- Search functionality
- Admin panel for posts management
- Comment system
- RSS feed generation

Requirements:
- RESTful API
- Image upload support
- SEO-friendly URLs
- Responsive design

Design:
- Typography-focused
- Reading mode toggle
- Dark/light theme

E-commerce Store

Code
TEXT
Build a simple e-commerce store with React and Express.

Features:
- Product catalog with categories
- Shopping cart with persistence
- Search and filtering
- Product detail pages
- Checkout flow (without payment)
- Order summary

Requirements:
- SQLite database for products
- RESTful API
- Session-based cart
- Form validation

Design:
- Grid product layout
- Clean checkout process
- Mobile-first approach

Dashboard aplikacja

Code
TEXT
Build an analytics dashboard with React and Recharts.

Features:
- Multiple chart types (line, bar, pie)
- Date range selector
- Data export (CSV)
- Real-time updates simulation
- Responsive grid layout
- Key metrics cards

Requirements:
- TypeScript
- Tailwind CSS
- Mock data generation
- Loading states

Design:
- Professional look
- Consistent color palette
- Accessible charts

Iteracyjny rozwój

Po wygenerowaniu pierwszej wersji, możesz iteracyjnie rozwijać aplikację:

Code
TEXT
// Pierwsza iteracja
You: "Build a todo app with React"
Bolt: [Generuje podstawową todo app]

// Druga iteracja
You: "Add categories - users should be able to create custom categories with colors"
Bolt: [Dodaje system kategorii]

// Trzecia iteracja
You: "Add a dark mode toggle that persists user preference"
Bolt: [Implementuje dark mode]

// Czwarta iteracja
You: "The delete button is not working on mobile - fix it"
Bolt: [Debuguje i naprawia problem]

// Piąta iteracja
You: "Add keyboard shortcuts - Enter to add task, Escape to cancel"
Bolt: [Dodaje keyboard navigation]

Obsługiwane technologie

Frontend

Code
JavaScript
// React (domyślnie)
// ✅ React 18 z Hooks
// ✅ React Router v6
// ✅ State management (useState, useReducer, Context)
// ✅ Styled Components / Emotion
// ✅ Tailwind CSS

// Vue
// ✅ Vue 3 Composition API
// ✅ Vue Router
// ✅ Pinia

// Svelte
// ✅ Svelte 4
// ✅ SvelteKit (basic)
// ✅ Svelte stores

// Styling
// ✅ Tailwind CSS (preferowane)
// ✅ CSS Modules
// ✅ SCSS/SASS
// ✅ Styled Components

Backend

JSExpress.js
JavaScript
// Express.js (domyślne)
const express = require('express')
const app = express()

app.use(express.json())

app.get('/api/items', (req, res) => {
  res.json(items)
})

app.post('/api/items', (req, res) => {
  const item = { id: Date.now(), ...req.body }
  items.push(item)
  res.status(201).json(item)
})

// Fastify (szybsza alternatywa)
const fastify = require('fastify')()

fastify.get('/api/items', async (request, reply) => {
  return items
})

Bazy danych

Code
JavaScript
// SQLite z better-sqlite3
const Database = require('better-sqlite3')
const db = new Database('data.db')

// Tworzenie tabel
db.exec(`
  CREATE TABLE IF NOT EXISTS users (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    name TEXT NOT NULL,
    email TEXT UNIQUE,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP
  )
`)

// CRUD operations
const insertUser = db.prepare('INSERT INTO users (name, email) VALUES (?, ?)')
const getUsers = db.prepare('SELECT * FROM users')
const getUserById = db.prepare('SELECT * FROM users WHERE id = ?')

// Użycie
insertUser.run('Jan Kowalski', 'jan@example.com')
const users = getUsers.all()
const user = getUserById.get(1)

Autentykacja

Code
JavaScript
// Prosta autentykacja sesyjna
const express = require('express')
const session = require('express-session')
const bcrypt = require('bcryptjs') // bcryptjs działa w WebContainers

const app = express()

app.use(session({
  secret: 'your-secret-key',
  resave: false,
  saveUninitialized: false
}))

// Rejestracja
app.post('/api/register', async (req, res) => {
  const { email, password } = req.body

  const hashedPassword = await bcrypt.hash(password, 10)

  // Zapisz do SQLite
  const stmt = db.prepare('INSERT INTO users (email, password) VALUES (?, ?)')
  const result = stmt.run(email, hashedPassword)

  res.status(201).json({ id: result.lastInsertRowid })
})

// Logowanie
app.post('/api/login', async (req, res) => {
  const { email, password } = req.body

  const stmt = db.prepare('SELECT * FROM users WHERE email = ?')
  const user = stmt.get(email)

  if (!user || !await bcrypt.compare(password, user.password)) {
    return res.status(401).json({ error: 'Invalid credentials' })
  }

  req.session.userId = user.id
  res.json({ message: 'Logged in' })
})

// Middleware autoryzacji
const requireAuth = (req, res, next) => {
  if (!req.session.userId) {
    return res.status(401).json({ error: 'Unauthorized' })
  }
  next()
}

app.get('/api/profile', requireAuth, (req, res) => {
  const user = db.prepare('SELECT id, email FROM users WHERE id = ?')
    .get(req.session.userId)
  res.json(user)
})

Praktyczne przykłady

Kompletna Todo App

Code
TEXT
Prompt: "Build a modern todo app with React, Express, and SQLite.

Features:
- Add, edit, delete, complete tasks
- Categories with custom colors
- Due dates with reminders
- Priority levels
- Search and filter
- Statistics dashboard
- Data export to JSON

Design:
- Clean, modern UI
- Smooth animations with Framer Motion
- Dark mode support
- Mobile responsive"

Wygenerowana struktura:

Code
TEXT
todo-app/
├── client/
│   ├── src/
│   │   ├── components/
│   │   │   ├── TaskList.tsx
│   │   │   ├── TaskItem.tsx
│   │   │   ├── TaskForm.tsx
│   │   │   ├── CategorySelector.tsx
│   │   │   ├── SearchBar.tsx
│   │   │   ├── StatsPanel.tsx
│   │   │   └── ThemeToggle.tsx
│   │   ├── hooks/
│   │   │   ├── useTasks.ts
│   │   │   ├── useCategories.ts
│   │   │   └── useTheme.ts
│   │   ├── api/
│   │   │   └── tasks.ts
│   │   ├── types/
│   │   │   └── index.ts
│   │   ├── App.tsx
│   │   └── main.tsx
│   ├── index.html
│   └── package.json
├── server/
│   ├── index.js
│   ├── routes/
│   │   ├── tasks.js
│   │   └── categories.js
│   ├── db/
│   │   └── schema.sql
│   └── package.json
└── package.json

Real-time Chat App

Code
TEXT
Prompt: "Build a real-time chat application with React and Express.

Features:
- Multiple chat rooms
- User nicknames
- Real-time messaging with Server-Sent Events
- Message timestamps
- Online users list
- Typing indicators
- Message reactions

Requirements:
- No WebSockets (use SSE for WebContainers compatibility)
- SQLite for message persistence
- Clean REST API

Design:
- Slack-like interface
- Message threading
- Emoji picker"

Kluczowy kod SSE:

JSserver/routes/messages.js
JavaScript
// server/routes/messages.js
const clients = new Map() // roomId -> Set of response objects

// SSE endpoint
app.get('/api/rooms/:roomId/events', (req, res) => {
  const { roomId } = req.params

  res.setHeader('Content-Type', 'text/event-stream')
  res.setHeader('Cache-Control', 'no-cache')
  res.setHeader('Connection', 'keep-alive')

  // Dodaj klienta do pokoju
  if (!clients.has(roomId)) {
    clients.set(roomId, new Set())
  }
  clients.get(roomId).add(res)

  // Wyślij heartbeat co 30 sekund
  const heartbeat = setInterval(() => {
    res.write(':heartbeat\n\n')
  }, 30000)

  // Cleanup on disconnect
  req.on('close', () => {
    clearInterval(heartbeat)
    clients.get(roomId)?.delete(res)
  })
})

// Broadcast do pokoju
function broadcast(roomId, event, data) {
  const roomClients = clients.get(roomId)
  if (!roomClients) return

  const message = `event: ${event}\ndata: ${JSON.stringify(data)}\n\n`

  for (const client of roomClients) {
    client.write(message)
  }
}

// Wysyłanie wiadomości
app.post('/api/rooms/:roomId/messages', (req, res) => {
  const { roomId } = req.params
  const { text, userId, userName } = req.body

  const message = {
    id: Date.now(),
    roomId,
    userId,
    userName,
    text,
    createdAt: new Date().toISOString()
  }

  // Zapisz do DB
  db.prepare(`
    INSERT INTO messages (id, room_id, user_id, user_name, text, created_at)
    VALUES (?, ?, ?, ?, ?, ?)
  `).run(message.id, roomId, userId, userName, text, message.createdAt)

  // Broadcast do wszystkich w pokoju
  broadcast(roomId, 'new-message', message)

  res.status(201).json(message)
})
TSclient/src/hooks/useMessages.ts
TypeScript
// client/src/hooks/useMessages.ts
import { useState, useEffect } from 'react'

interface Message {
  id: number
  userId: string
  userName: string
  text: string
  createdAt: string
}

export function useMessages(roomId: string) {
  const [messages, setMessages] = useState<Message[]>([])

  useEffect(() => {
    // Pobierz historię
    fetch(`/api/rooms/${roomId}/messages`)
      .then(res => res.json())
      .then(setMessages)

    // Subskrybuj SSE
    const eventSource = new EventSource(`/api/rooms/${roomId}/events`)

    eventSource.addEventListener('new-message', (event) => {
      const message = JSON.parse(event.data)
      setMessages(prev => [...prev, message])
    })

    eventSource.addEventListener('user-typing', (event) => {
      // Handle typing indicator
    })

    return () => eventSource.close()
  }, [roomId])

  const sendMessage = async (text: string, userId: string, userName: string) => {
    await fetch(`/api/rooms/${roomId}/messages`, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ text, userId, userName })
    })
  }

  return { messages, sendMessage }
}

CRM Dashboard

Code
TEXT
Prompt: "Build a CRM dashboard with React, Express, and SQLite.

Features:
- Contacts management (CRUD)
- Deals pipeline with drag-and-drop
- Activity timeline
- Search and filtering
- Contact tags
- Notes per contact
- Dashboard with metrics

Requirements:
- RESTful API
- Pagination for contacts
- Export to CSV
- Form validation with Zod

Design:
- Professional business look
- Table views with sorting
- Kanban board for deals
- Responsive sidebar"

Przykładowy komponent Kanban:

TSclient/src/components/DealsPipeline.tsx
TypeScript
// client/src/components/DealsPipeline.tsx
import { DragDropContext, Droppable, Draggable, DropResult } from '@hello-pangea/dnd'
import { useState, useEffect } from 'react'

interface Deal {
  id: number
  title: string
  value: number
  stage: string
  contactId: number
  contactName: string
}

const stages = ['Lead', 'Qualified', 'Proposal', 'Negotiation', 'Closed Won', 'Closed Lost']

export function DealsPipeline() {
  const [deals, setDeals] = useState<Deal[]>([])

  useEffect(() => {
    fetch('/api/deals').then(r => r.json()).then(setDeals)
  }, [])

  const handleDragEnd = async (result: DropResult) => {
    if (!result.destination) return

    const dealId = parseInt(result.draggableId)
    const newStage = result.destination.droppableId

    // Optimistic update
    setDeals(deals.map(deal =>
      deal.id === dealId ? { ...deal, stage: newStage } : deal
    ))

    // Update on server
    await fetch(`/api/deals/${dealId}`, {
      method: 'PATCH',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ stage: newStage })
    })
  }

  const dealsByStage = stages.reduce((acc, stage) => {
    acc[stage] = deals.filter(d => d.stage === stage)
    return acc
  }, {} as Record<string, Deal[]>)

  return (
    <DragDropContext onDragEnd={handleDragEnd}>
      <div className="flex gap-4 overflow-x-auto p-4">
        {stages.map(stage => (
          <div key={stage} className="min-w-64 bg-gray-100 rounded-lg p-4">
            <h3 className="font-semibold mb-4 flex justify-between">
              {stage}
              <span className="text-gray-500">
                ${dealsByStage[stage].reduce((sum, d) => sum + d.value, 0).toLocaleString()}
              </span>
            </h3>

            <Droppable droppableId={stage}>
              {(provided) => (
                <div
                  ref={provided.innerRef}
                  {...provided.droppableProps}
                  className="space-y-2 min-h-24"
                >
                  {dealsByStage[stage].map((deal, index) => (
                    <Draggable
                      key={deal.id}
                      draggableId={String(deal.id)}
                      index={index}
                    >
                      {(provided) => (
                        <div
                          ref={provided.innerRef}
                          {...provided.draggableProps}
                          {...provided.dragHandleProps}
                          className="bg-white p-3 rounded shadow cursor-grab"
                        >
                          <h4 className="font-medium">{deal.title}</h4>
                          <p className="text-sm text-gray-600">{deal.contactName}</p>
                          <p className="text-sm font-semibold text-green-600">
                            ${deal.value.toLocaleString()}
                          </p>
                        </div>
                      )}
                    </Draggable>
                  ))}
                  {provided.placeholder}
                </div>
              )}
            </Droppable>
          </div>
        ))}
      </div>
    </DragDropContext>
  )
}

Deploy na Netlify

One-click deploy

Bolt ma wbudowaną integrację z Netlify:

  1. Kliknij przycisk "Deploy" w interfejsie Bolt
  2. Autoryzuj konto Netlify (jednorazowo)
  3. Wybierz nazwę projektu
  4. Gotowe! Aplikacja jest online

Konfiguracja build

Bolt automatycznie generuje netlify.toml:

Code
TOML
[build]
  command = "npm run build"
  publish = "dist"

[build.environment]
  NODE_VERSION = "18"

# Redirect API calls do serverless functions
[[redirects]]
  from = "/api/*"
  to = "/.netlify/functions/:splat"
  status = 200

# SPA fallback
[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

Serverless Functions

Dla backendu, Bolt konwertuje Express routes na Netlify Functions:

JSnetlify/functions/api.js
JavaScript
// netlify/functions/api.js
const express = require('express')
const serverless = require('serverless-http')

const app = express()
app.use(express.json())

// Twoje routes
app.get('/api/items', (req, res) => {
  res.json([{ id: 1, name: 'Item 1' }])
})

app.post('/api/items', (req, res) => {
  // Handle POST
})

module.exports.handler = serverless(app)

Custom domains

Po deploy możesz dodać custom domain:

  1. W Netlify Dashboard → Domain Settings
  2. Add custom domain
  3. Configure DNS (CNAME lub A record)
  4. Netlify automatycznie wystawi SSL

Cennik Bolt.new (2025)

Plan Free

Cena: $0/miesiąc

Zawiera:

  • Ograniczone tokeny miesięcznie (~100 generacji)
  • Publiczne projekty
  • Community support
  • Podstawowy deploy na Netlify

Plan Pro

Cena: $20/miesiąc

Zawiera:

  • Znacznie więcej tokenów (~1000 generacji)
  • Prywatne projekty
  • Priorytetowa generacja
  • Lepsze modele AI
  • Email support

Plan Team

Cena: Custom pricing

Zawiera:

  • Wszystko z Pro
  • Współdzielone projekty
  • Admin dashboard
  • SSO integration
  • Dedicated support

Best Practices

Efektywne promptowanie

Code
TEXT
// ✅ Dobre prompty
"Build a blog with React and Express. Include:
- Markdown editor
- Post categories
- Search
- Pagination
Use Tailwind for styling and SQLite for data."

// ❌ Słabe prompty
"Make me a blog"  // Zbyt ogólne
"Build a social network like Facebook"  // Zbyt ambitne
"Create an app with all features"  // Niesprecyzowane

Debugowanie

Kiedy coś nie działa:

Code
TEXT
// 1. Opisz problem dokładnie
"The delete button throws an error 'Cannot read property id of undefined'
when I try to delete a task"

// 2. Poproś o debugging
"Add console.log statements to the deleteTask function
to help debug the undefined id error"

// 3. Poproś o fix z wyjaśnieniem
"Fix the delete bug and explain what was wrong"

Optymalizacja wydajności

Code
TEXT
// Poproś o optymalizacje
"Optimize the app for better performance:
- Add React.memo to list items
- Implement debouncing on search
- Add loading states
- Lazy load heavy components"

Eksport projektu

Aby pobrać kod:

  1. Kliknij "Export" w menu projektu
  2. Wybierz format (ZIP lub GitHub)
  3. Projekt jest gotowy do dalszego rozwoju lokalnie
Code
Bash
# Po eksporcie
cd my-project
npm install
npm run dev

Ograniczenia Bolt.new

Co nie zadziała

Code
JavaScript
// ❌ Native binaries
const sharp = require('sharp')  // Nie działa w WebContainers
const bcrypt = require('bcrypt')  // Użyj bcryptjs zamiast

// ❌ Duże bazy danych
const { Pool } = require('pg')  // PostgreSQL wymaga zewnętrznego serwera
// ✅ Użyj SQLite lub zewnętrznego Supabase/Neon

// ❌ WebSockets natywne
const WebSocket = require('ws')  // Ograniczone wsparcie
// ✅ Użyj Server-Sent Events lub polling

// ❌ Ciężkie frameworki
const { NestFactory } = require('@nestjs/core')  // Może nie działać w pełni
// ✅ Użyj Express lub Fastify

Alternatywy dla ograniczeń

OgraniczenieAlternatywa
PostgreSQLSQLite lub zewnętrzny Supabase
WebSocketsServer-Sent Events
bcryptbcryptjs
sharpZewnętrzne API (Cloudinary)
File uploadsZewnętrzny storage (S3, Cloudinary)

FAQ - Najczęściej zadawane pytania

Czy mogę używać Bolt do produkcyjnych aplikacji?

Tak, ale z ograniczeniami. Bolt świetnie nadaje się do:

  • Prototypów i MVP
  • Wewnętrznych narzędzi
  • Prostych aplikacji CRUD
  • Landing pages z formularzami

Dla skalowalnych aplikacji produkcyjnych, rozważ eksport i dalszy rozwój lokalnie.

Jak długo przechowywane są moje projekty?

  • Free: Projekty mogą być usunięte po 30 dniach nieaktywności
  • Pro: Projekty przechowywane bez limitu czasowego

Czy mogę importować istniejący projekt?

Obecnie Bolt skupia się na generowaniu nowych projektów. Możesz jednak:

  1. Opisać istniejącą aplikację
  2. Poprosić o wygenerowanie podobnej struktury
  3. Ręcznie przenieść specyficzny kod

Jak Bolt radzi sobie z dużymi projektami?

Bolt najlepiej sprawdza się przy małych-średnich projektach. Dla dużych:

  • Podziel na mniejsze moduły
  • Generuj po jednej funkcji na raz
  • Eksportuj i rozwijaj lokalnie

Czy mogę używać własnych pakietów npm?

Tak! Bolt obsługuje większość pakietów npm, które działają w Node.js bez natywnych binaries.

Code
TEXT
"Add these npm packages to the project:
- date-fns for date formatting
- zod for validation
- react-hot-toast for notifications"

Podsumowanie

Bolt.new to potężne narzędzie do szybkiego prototypowania i budowania aplikacji webowych:

  • Natychmiastowy start - Zero konfiguracji dzięki WebContainers
  • Pełne aplikacje - Frontend, backend, baza danych w jednym
  • Iteracyjny rozwój - Rozmawiaj z AI i wprowadzaj zmiany
  • Deploy jednym klikiem - Netlify integration out-of-the-box
  • Eksport kodu - Kontynuuj rozwój lokalnie

Idealne dla prototypów, MVP, narzędzi wewnętrznych i nauki programowania.


Bolt.new - complete guide to the AI fullstack builder

What is Bolt.new?

Bolt.new is a revolutionary tool from StackBlitz that lets you build complete web applications from text descriptions. It leverages the unique WebContainers technology to run Node.js directly in the browser, which means an instant start without any local installation.

Unlike other AI generators, Bolt creates not just the frontend but full-stack applications with a backend, database, and API - all running immediately in the browser. You can iteratively develop your project by chatting with AI as you would with an experienced developer.

Why Bolt.new?

Key advantages

  1. Complete fullstack applications - Not just UI, but the entire stack
  2. Instant feedback - WebContainers run code right away
  3. Zero configuration - No Node.js, npm, or local environment needed
  4. Iterative development - Chat with AI and make changes on the fly
  5. One-click deploy - Built-in Netlify integration
  6. Downloadable code - Full project export

Bolt vs v0 vs Lovable

FeatureBolt.newv0 by VercelLovable
TypeFullstack appsUI componentsFullstack apps
BackendYes (Express, Fastify)NoYes (Supabase)
DatabaseSQLite, PostgreSQLNoPostgreSQL
EnvironmentWebContainers (in browser)Downloadable codeCloud IDE
DeployNetlify (built-in)Vercel (external)Vercel/Netlify
GitHubExportYesNative integration
Price (Pro)$20/month$20/month$20/month

How does Bolt.new work?

WebContainers technology

WebContainers is a groundbreaking technology from StackBlitz that runs Node.js directly in the browser via WebAssembly. This means:

  • Instant start - No downloading or installing
  • Security - Code runs in the browser sandbox
  • Full functionality - npm, file system, processes
  • Offline support - Works even without internet (after the first load)
Code
JavaScript
// What WebContainers can run:
// ✅ Express.js / Fastify servers
// ✅ React / Vue / Svelte / Next.js
// ✅ SQLite databases
// ✅ npm packages (most of them)
// ✅ TypeScript compilation
// ✅ Bundlers (Vite, esbuild)

// Limitations:
// ❌ Native binaries (sharp, bcrypt)
// ❌ Large backend frameworks (NestJS partially)
// ❌ PostgreSQL/MySQL (only SQLite natively)

Application building workflow

  1. Describe the application - Write a prompt describing what you want to build
  2. Bolt generates code - AI creates the full project structure
  3. Live preview - You see the running application immediately
  4. Iterate through chat - Add features, fix bugs
  5. One-click deploy - Publish to Netlify

Generating applications from prompts

Effective prompts

Structure of a good prompt:

Code
TEXT
Build a [application type] with [main technologies].

Features:
- [Feature 1]
- [Feature 2]
- [Feature 3]

Requirements:
- [Technical requirement 1]
- [Technical requirement 2]

Design:
- [Design preferences]

Examples of effective prompts

Todo app with categories

Code
TEXT
Build a todo app with React and TypeScript.

Features:
- Add, edit, delete tasks
- Categories with color coding
- Priority levels (low, medium, high)
- Due dates with calendar picker
- Drag and drop sorting
- Local storage persistence
- Dark mode support

Design:
- Clean, minimal UI
- Smooth animations
- Mobile responsive

Blog platform

Code
TEXT
Build a blog platform with React, Express, and SQLite.

Features:
- Markdown editor with preview
- Categories and tags
- Search functionality
- Admin panel for posts management
- Comment system
- RSS feed generation

Requirements:
- RESTful API
- Image upload support
- SEO-friendly URLs
- Responsive design

Design:
- Typography-focused
- Reading mode toggle
- Dark/light theme

E-commerce store

Code
TEXT
Build a simple e-commerce store with React and Express.

Features:
- Product catalog with categories
- Shopping cart with persistence
- Search and filtering
- Product detail pages
- Checkout flow (without payment)
- Order summary

Requirements:
- SQLite database for products
- RESTful API
- Session-based cart
- Form validation

Design:
- Grid product layout
- Clean checkout process
- Mobile-first approach

Dashboard application

Code
TEXT
Build an analytics dashboard with React and Recharts.

Features:
- Multiple chart types (line, bar, pie)
- Date range selector
- Data export (CSV)
- Real-time updates simulation
- Responsive grid layout
- Key metrics cards

Requirements:
- TypeScript
- Tailwind CSS
- Mock data generation
- Loading states

Design:
- Professional look
- Consistent color palette
- Accessible charts

Iterative development

After generating the first version, you can iteratively develop the application:

Code
TEXT
// First iteration
You: "Build a todo app with React"
Bolt: [Generates a basic todo app]

// Second iteration
You: "Add categories - users should be able to create custom categories with colors"
Bolt: [Adds a category system]

// Third iteration
You: "Add a dark mode toggle that persists user preference"
Bolt: [Implements dark mode]

// Fourth iteration
You: "The delete button is not working on mobile - fix it"
Bolt: [Debugs and fixes the problem]

// Fifth iteration
You: "Add keyboard shortcuts - Enter to add task, Escape to cancel"
Bolt: [Adds keyboard navigation]

Supported technologies

Frontend

Code
JavaScript
// React (default)
// ✅ React 18 with Hooks
// ✅ React Router v6
// ✅ State management (useState, useReducer, Context)
// ✅ Styled Components / Emotion
// ✅ Tailwind CSS

// Vue
// ✅ Vue 3 Composition API
// ✅ Vue Router
// ✅ Pinia

// Svelte
// ✅ Svelte 4
// ✅ SvelteKit (basic)
// ✅ Svelte stores

// Styling
// ✅ Tailwind CSS (preferred)
// ✅ CSS Modules
// ✅ SCSS/SASS
// ✅ Styled Components

Backend

JSExpress.js
JavaScript
// Express.js (default)
const express = require('express')
const app = express()

app.use(express.json())

app.get('/api/items', (req, res) => {
  res.json(items)
})

app.post('/api/items', (req, res) => {
  const item = { id: Date.now(), ...req.body }
  items.push(item)
  res.status(201).json(item)
})

// Fastify (faster alternative)
const fastify = require('fastify')()

fastify.get('/api/items', async (request, reply) => {
  return items
})

Databases

Code
JavaScript
// SQLite with better-sqlite3
const Database = require('better-sqlite3')
const db = new Database('data.db')

// Creating tables
db.exec(`
  CREATE TABLE IF NOT EXISTS users (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    name TEXT NOT NULL,
    email TEXT UNIQUE,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP
  )
`)

// CRUD operations
const insertUser = db.prepare('INSERT INTO users (name, email) VALUES (?, ?)')
const getUsers = db.prepare('SELECT * FROM users')
const getUserById = db.prepare('SELECT * FROM users WHERE id = ?')

// Usage
insertUser.run('John Smith', 'john@example.com')
const users = getUsers.all()
const user = getUserById.get(1)

Authentication

Code
JavaScript
// Simple session-based authentication
const express = require('express')
const session = require('express-session')
const bcrypt = require('bcryptjs') // bcryptjs works in WebContainers

const app = express()

app.use(session({
  secret: 'your-secret-key',
  resave: false,
  saveUninitialized: false
}))

// Registration
app.post('/api/register', async (req, res) => {
  const { email, password } = req.body

  const hashedPassword = await bcrypt.hash(password, 10)

  // Save to SQLite
  const stmt = db.prepare('INSERT INTO users (email, password) VALUES (?, ?)')
  const result = stmt.run(email, hashedPassword)

  res.status(201).json({ id: result.lastInsertRowid })
})

// Login
app.post('/api/login', async (req, res) => {
  const { email, password } = req.body

  const stmt = db.prepare('SELECT * FROM users WHERE email = ?')
  const user = stmt.get(email)

  if (!user || !await bcrypt.compare(password, user.password)) {
    return res.status(401).json({ error: 'Invalid credentials' })
  }

  req.session.userId = user.id
  res.json({ message: 'Logged in' })
})

// Authorization middleware
const requireAuth = (req, res, next) => {
  if (!req.session.userId) {
    return res.status(401).json({ error: 'Unauthorized' })
  }
  next()
}

app.get('/api/profile', requireAuth, (req, res) => {
  const user = db.prepare('SELECT id, email FROM users WHERE id = ?')
    .get(req.session.userId)
  res.json(user)
})

Practical examples

Complete todo app

Code
TEXT
Prompt: "Build a modern todo app with React, Express, and SQLite.

Features:
- Add, edit, delete, complete tasks
- Categories with custom colors
- Due dates with reminders
- Priority levels
- Search and filter
- Statistics dashboard
- Data export to JSON

Design:
- Clean, modern UI
- Smooth animations with Framer Motion
- Dark mode support
- Mobile responsive"

Generated structure:

Code
TEXT
todo-app/
├── client/
│   ├── src/
│   │   ├── components/
│   │   │   ├── TaskList.tsx
│   │   │   ├── TaskItem.tsx
│   │   │   ├── TaskForm.tsx
│   │   │   ├── CategorySelector.tsx
│   │   │   ├── SearchBar.tsx
│   │   │   ├── StatsPanel.tsx
│   │   │   └── ThemeToggle.tsx
│   │   ├── hooks/
│   │   │   ├── useTasks.ts
│   │   │   ├── useCategories.ts
│   │   │   └── useTheme.ts
│   │   ├── api/
│   │   │   └── tasks.ts
│   │   ├── types/
│   │   │   └── index.ts
│   │   ├── App.tsx
│   │   └── main.tsx
│   ├── index.html
│   └── package.json
├── server/
│   ├── index.js
│   ├── routes/
│   │   ├── tasks.js
│   │   └── categories.js
│   ├── db/
│   │   └── schema.sql
│   └── package.json
└── package.json

Real-time chat app

Code
TEXT
Prompt: "Build a real-time chat application with React and Express.

Features:
- Multiple chat rooms
- User nicknames
- Real-time messaging with Server-Sent Events
- Message timestamps
- Online users list
- Typing indicators
- Message reactions

Requirements:
- No WebSockets (use SSE for WebContainers compatibility)
- SQLite for message persistence
- Clean REST API

Design:
- Slack-like interface
- Message threading
- Emoji picker"

Key SSE code:

JSserver/routes/messages.js
JavaScript
// server/routes/messages.js
const clients = new Map() // roomId -> Set of response objects

// SSE endpoint
app.get('/api/rooms/:roomId/events', (req, res) => {
  const { roomId } = req.params

  res.setHeader('Content-Type', 'text/event-stream')
  res.setHeader('Cache-Control', 'no-cache')
  res.setHeader('Connection', 'keep-alive')

  // Add client to the room
  if (!clients.has(roomId)) {
    clients.set(roomId, new Set())
  }
  clients.get(roomId).add(res)

  // Send heartbeat every 30 seconds
  const heartbeat = setInterval(() => {
    res.write(':heartbeat\n\n')
  }, 30000)

  // Cleanup on disconnect
  req.on('close', () => {
    clearInterval(heartbeat)
    clients.get(roomId)?.delete(res)
  })
})

// Broadcast to the room
function broadcast(roomId, event, data) {
  const roomClients = clients.get(roomId)
  if (!roomClients) return

  const message = `event: ${event}\ndata: ${JSON.stringify(data)}\n\n`

  for (const client of roomClients) {
    client.write(message)
  }
}

// Sending messages
app.post('/api/rooms/:roomId/messages', (req, res) => {
  const { roomId } = req.params
  const { text, userId, userName } = req.body

  const message = {
    id: Date.now(),
    roomId,
    userId,
    userName,
    text,
    createdAt: new Date().toISOString()
  }

  // Save to DB
  db.prepare(`
    INSERT INTO messages (id, room_id, user_id, user_name, text, created_at)
    VALUES (?, ?, ?, ?, ?, ?)
  `).run(message.id, roomId, userId, userName, text, message.createdAt)

  // Broadcast to everyone in the room
  broadcast(roomId, 'new-message', message)

  res.status(201).json(message)
})
TSclient/src/hooks/useMessages.ts
TypeScript
// client/src/hooks/useMessages.ts
import { useState, useEffect } from 'react'

interface Message {
  id: number
  userId: string
  userName: string
  text: string
  createdAt: string
}

export function useMessages(roomId: string) {
  const [messages, setMessages] = useState<Message[]>([])

  useEffect(() => {
    // Fetch history
    fetch(`/api/rooms/${roomId}/messages`)
      .then(res => res.json())
      .then(setMessages)

    // Subscribe to SSE
    const eventSource = new EventSource(`/api/rooms/${roomId}/events`)

    eventSource.addEventListener('new-message', (event) => {
      const message = JSON.parse(event.data)
      setMessages(prev => [...prev, message])
    })

    eventSource.addEventListener('user-typing', (event) => {
      // Handle typing indicator
    })

    return () => eventSource.close()
  }, [roomId])

  const sendMessage = async (text: string, userId: string, userName: string) => {
    await fetch(`/api/rooms/${roomId}/messages`, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ text, userId, userName })
    })
  }

  return { messages, sendMessage }
}

CRM dashboard

Code
TEXT
Prompt: "Build a CRM dashboard with React, Express, and SQLite.

Features:
- Contacts management (CRUD)
- Deals pipeline with drag-and-drop
- Activity timeline
- Search and filtering
- Contact tags
- Notes per contact
- Dashboard with metrics

Requirements:
- RESTful API
- Pagination for contacts
- Export to CSV
- Form validation with Zod

Design:
- Professional business look
- Table views with sorting
- Kanban board for deals
- Responsive sidebar"

Example Kanban component:

TSclient/src/components/DealsPipeline.tsx
TypeScript
// client/src/components/DealsPipeline.tsx
import { DragDropContext, Droppable, Draggable, DropResult } from '@hello-pangea/dnd'
import { useState, useEffect } from 'react'

interface Deal {
  id: number
  title: string
  value: number
  stage: string
  contactId: number
  contactName: string
}

const stages = ['Lead', 'Qualified', 'Proposal', 'Negotiation', 'Closed Won', 'Closed Lost']

export function DealsPipeline() {
  const [deals, setDeals] = useState<Deal[]>([])

  useEffect(() => {
    fetch('/api/deals').then(r => r.json()).then(setDeals)
  }, [])

  const handleDragEnd = async (result: DropResult) => {
    if (!result.destination) return

    const dealId = parseInt(result.draggableId)
    const newStage = result.destination.droppableId

    // Optimistic update
    setDeals(deals.map(deal =>
      deal.id === dealId ? { ...deal, stage: newStage } : deal
    ))

    // Update on server
    await fetch(`/api/deals/${dealId}`, {
      method: 'PATCH',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ stage: newStage })
    })
  }

  const dealsByStage = stages.reduce((acc, stage) => {
    acc[stage] = deals.filter(d => d.stage === stage)
    return acc
  }, {} as Record<string, Deal[]>)

  return (
    <DragDropContext onDragEnd={handleDragEnd}>
      <div className="flex gap-4 overflow-x-auto p-4">
        {stages.map(stage => (
          <div key={stage} className="min-w-64 bg-gray-100 rounded-lg p-4">
            <h3 className="font-semibold mb-4 flex justify-between">
              {stage}
              <span className="text-gray-500">
                ${dealsByStage[stage].reduce((sum, d) => sum + d.value, 0).toLocaleString()}
              </span>
            </h3>

            <Droppable droppableId={stage}>
              {(provided) => (
                <div
                  ref={provided.innerRef}
                  {...provided.droppableProps}
                  className="space-y-2 min-h-24"
                >
                  {dealsByStage[stage].map((deal, index) => (
                    <Draggable
                      key={deal.id}
                      draggableId={String(deal.id)}
                      index={index}
                    >
                      {(provided) => (
                        <div
                          ref={provided.innerRef}
                          {...provided.draggableProps}
                          {...provided.dragHandleProps}
                          className="bg-white p-3 rounded shadow cursor-grab"
                        >
                          <h4 className="font-medium">{deal.title}</h4>
                          <p className="text-sm text-gray-600">{deal.contactName}</p>
                          <p className="text-sm font-semibold text-green-600">
                            ${deal.value.toLocaleString()}
                          </p>
                        </div>
                      )}
                    </Draggable>
                  ))}
                  {provided.placeholder}
                </div>
              )}
            </Droppable>
          </div>
        ))}
      </div>
    </DragDropContext>
  )
}

Deploy to Netlify

One-click deploy

Bolt has built-in integration with Netlify:

  1. Click the "Deploy" button in the Bolt interface
  2. Authorize your Netlify account (one-time)
  3. Choose a project name
  4. Done! The application is online

Build configuration

Bolt automatically generates a netlify.toml:

Code
TOML
[build]
  command = "npm run build"
  publish = "dist"

[build.environment]
  NODE_VERSION = "18"

# Redirect API calls to serverless functions
[[redirects]]
  from = "/api/*"
  to = "/.netlify/functions/:splat"
  status = 200

# SPA fallback
[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

Serverless functions

For the backend, Bolt converts Express routes into Netlify Functions:

JSnetlify/functions/api.js
JavaScript
// netlify/functions/api.js
const express = require('express')
const serverless = require('serverless-http')

const app = express()
app.use(express.json())

// Your routes
app.get('/api/items', (req, res) => {
  res.json([{ id: 1, name: 'Item 1' }])
})

app.post('/api/items', (req, res) => {
  // Handle POST
})

module.exports.handler = serverless(app)

Custom domains

After deploying you can add a custom domain:

  1. In Netlify Dashboard go to Domain Settings
  2. Add custom domain
  3. Configure DNS (CNAME or A record)
  4. Netlify will automatically provision SSL

Bolt.new pricing (2025)

Free plan

Price: $0/month

Includes:

  • Limited monthly tokens (~100 generations)
  • Public projects
  • Community support
  • Basic deploy to Netlify

Pro plan

Price: $20/month

Includes:

  • Significantly more tokens (~1000 generations)
  • Private projects
  • Priority generation
  • Better AI models
  • Email support

Team plan

Price: Custom pricing

Includes:

  • Everything from Pro
  • Shared projects
  • Admin dashboard
  • SSO integration
  • Dedicated support

Best practices

Effective prompting

Code
TEXT
// ✅ Good prompts
"Build a blog with React and Express. Include:
- Markdown editor
- Post categories
- Search
- Pagination
Use Tailwind for styling and SQLite for data."

// ❌ Weak prompts
"Make me a blog"  // Too generic
"Build a social network like Facebook"  // Too ambitious
"Create an app with all features"  // Unspecified

Debugging

When something does not work:

Code
TEXT
// 1. Describe the problem precisely
"The delete button throws an error 'Cannot read property id of undefined'
when I try to delete a task"

// 2. Ask for debugging
"Add console.log statements to the deleteTask function
to help debug the undefined id error"

// 3. Ask for a fix with an explanation
"Fix the delete bug and explain what was wrong"

Performance optimization

Code
TEXT
// Ask for optimizations
"Optimize the app for better performance:
- Add React.memo to list items
- Implement debouncing on search
- Add loading states
- Lazy load heavy components"

Project export

To download the code:

  1. Click "Export" in the project menu
  2. Choose the format (ZIP or GitHub)
  3. The project is ready for further local development
Code
Bash
# After export
cd my-project
npm install
npm run dev

Bolt.new limitations

What will not work

Code
JavaScript
// ❌ Native binaries
const sharp = require('sharp')  // Does not work in WebContainers
const bcrypt = require('bcrypt')  // Use bcryptjs instead

// ❌ Large databases
const { Pool } = require('pg')  // PostgreSQL requires an external server
// ✅ Use SQLite or an external Supabase/Neon

// ❌ Native WebSockets
const WebSocket = require('ws')  // Limited support
// ✅ Use Server-Sent Events or polling

// ❌ Heavy frameworks
const { NestFactory } = require('@nestjs/core')  // May not fully work
// ✅ Use Express or Fastify

Alternatives for limitations

LimitationAlternative
PostgreSQLSQLite or external Supabase
WebSocketsServer-Sent Events
bcryptbcryptjs
sharpExternal API (Cloudinary)
File uploadsExternal storage (S3, Cloudinary)

FAQ - frequently asked questions

Can I use Bolt for production applications?

Yes, but with limitations. Bolt works great for:

  • Prototypes and MVPs
  • Internal tools
  • Simple CRUD applications
  • Landing pages with forms

For scalable production applications, consider exporting and continuing development locally.

How long are my projects stored?

  • Free: Projects may be deleted after 30 days of inactivity
  • Pro: Projects stored without a time limit

Can I import an existing project?

Currently Bolt focuses on generating new projects. However, you can:

  1. Describe your existing application
  2. Ask it to generate a similar structure
  3. Manually transfer specific code

How does Bolt handle large projects?

Bolt works best with small-to-medium projects. For large ones:

  • Split into smaller modules
  • Generate one feature at a time
  • Export and develop locally

Can I use my own npm packages?

Yes! Bolt supports most npm packages that work in Node.js without native binaries.

Code
TEXT
"Add these npm packages to the project:
- date-fns for date formatting
- zod for validation
- react-hot-toast for notifications"

Summary

Bolt.new is a powerful tool for rapid prototyping and building web applications:

  • Instant start - Zero configuration thanks to WebContainers
  • Complete applications - Frontend, backend, and database in one
  • Iterative development - Chat with AI and make changes
  • One-click deploy - Netlify integration out-of-the-box
  • Code export - Continue development locally

Ideal for prototypes, MVPs, internal tools, and learning programming.