Welcome to the **Bolt** open-source repository! This repo provides everything you need to start building **AI-powered software development tools** powered by StackBlitz’s **WebContainer API**.
By building with the Bolt + WebContainer API you can create browser-based applications that let users **prompt, run, edit, and deploy** full-stack web apps directly in the browser, without the need for virtual machines. With WebContainer API, you can build apps that give AI direct access and full control over a **Node.js server**, **filesystem**, **package manager** and **dev terminal** inside your users browser tab. This powerful combination allows you to create a new class of development tools that support all major javascript libraries and node packages right out of the box, all without remote environments or local installs.
### What’s the Difference Between Bolt (This Repo) and [Bolt.new](https://bolt.new)?
- **Bolt.new**: This is the **commercial product** from StackBlitz—a hosted, browser-based AI development tool that enables users to prompt, run, edit, and deploy full-stack web applications directly in the browser. Built on top of the [Bolt open-source repo](https://github.com/stackblitz/bolt) and powered by the StackBlitz **WebContainer API**, it offers non-technical users the ability to create production-grade apps using AI.
- **Bolt (This Repo)**: This open-source repository provides the building blocks behind **Bolt.new**. This package contains the UI interface for Bolt as well as the server components, built using [Remix Run](https://remix.run/). By leveraging this repo and StackBlitz’s **WebContainer API**, you can create your own AI-powered development tools and full-stack applications that run entirely in the browser. This code allows you to customize and expand use cases, integrating AI and WebContainers into your own unique applications.
The [WebContainer API](https://webcontainers.io) is free for personal and open source usage. If you're building an application for commercial usage, you can learn more about our [WebContainer API commercial usage pricing here](https://stackblitz.com/pricing#webcontainer-api).
**Important**: Never commit your `.env.local` file to version control. It's already included in .gitignore.
## Available Scripts
-`pnpm run dev`: Starts the development server.
-`pnpm run build`: Builds the project.
-`pnpm run start`: Runs the built application locally using Wrangler Pages. This script uses `bindings.sh` to set up necessary bindings so you don't have to duplicate environment variables.
-`pnpm run preview`: Builds the project and then starts it locally, useful for testing the production build. Note, HTTP streaming currently doesn't work as expected with `wrangler pages dev`.
-`pnpm test:` Runs the test suite using Vitest.
-`pnpm run typecheck`: Runs TypeScript type checking.
-`pnpm run typegen`: Generates TypeScript types using Wrangler.
-`pnpm run deploy`: Builds the project and deploys it to Cloudflare Pages.
using [Remix](https://remix.run/) and the [AI SDK](https://sdk.vercel.ai/).
### WebContainer API
Bolt uses [WebContainers](https://webcontainers.io/) to run generated code in
the browser. WebContainers provide Bolt with a full-stack sandbox environment
using [WebContainer API](https://webcontainers.io/api). WebContainer run full-
stack applications directly in the browser without the cost and security
concerns of cloud hosted AI agents. WebContainers are interactive and editable,
and enables Bolt's AI to run code and understand any changes from the user.
Take a look at how [Bolt integrates with WebContainer API](https://github.com/search?q=repo%3Astackblitz%2Fbolt-oss%20%40webcontainer%2Fapi&type=code).
### Remix App
Bolt is built with [Remix](https://remix.run/) and
deployed using [CloudFlare Pages](https://pages.cloudflare.com/) and