bolt.new/packages/bolt
2024-08-20 18:35:44 +02:00
..
app feat: add file tree breadcrumb (#40) 2024-08-20 18:35:44 +02:00
functions fix: do not use path mapping for worker function 2024-07-25 18:04:36 +02:00
icons feat: implement light and dark theme (#30) 2024-08-08 15:56:36 +02:00
public feat: implement light and dark theme (#30) 2024-08-08 15:56:36 +02:00
types feat: submit file changes to the llm (#11) 2024-07-25 17:28:23 +02:00
.gitignore chore: update gitignore 2024-07-29 14:50:56 +02:00
bindings.sh feat: initial commit 2024-07-11 16:20:57 +02:00
load-context.ts feat: initial commit 2024-07-11 16:20:57 +02:00
package.json feat: add file tree breadcrumb (#40) 2024-08-20 18:35:44 +02:00
README.md chore: better clarify readme (#41) 2024-08-19 19:16:47 +02:00
tsconfig.json feat: initial commit 2024-07-11 16:20:57 +02:00
uno.config.ts chore: disable css shorthand to avoid conflicts 2024-08-15 07:30:39 +02:00
vite.config.ts feat: submit file changes to the llm (#11) 2024-07-25 17:28:23 +02:00
worker-configuration.d.ts feat(session): encrypt data and fix renewal (#38) 2024-08-19 17:39:37 +02:00
wrangler.toml feat: initial commit 2024-07-11 16:20:57 +02:00

Bolt

Bolt is an AI assistant developed by StackBlitz. This package contains the UI interface for Bolt as well as the server components, built using Remix Run.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v20.15.1)
  • pnpm (v9.4.0)

Setup

  1. Clone the repository (if you haven't already):
git clone https://github.com/stackblitz/bolt.git
cd bolt
  1. Install dependencies:
pnpm install
  1. Create a .env.local file in the current packages/bolt directory and add your Anthropic API key:
ANTHROPIC_API_KEY=XXX

Optionally, you an set the debug level or disable authentication:

VITE_LOG_LEVEL=debug
VITE_DISABLE_AUTH=1

If you want to run authentication against a local StackBlitz instance, add:

VITE_CLIENT_ORIGIN=https://local.stackblitz.com:3000

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.

Development

To start the development server:

pnpm run dev

This will start the Remix Vite development server.

Testing

Run the test suite with:

pnpm test

Deployment

To deploy the application to Cloudflare Pages:

pnpm run deploy

Make sure you have the necessary permissions and Wrangler is correctly configured for your Cloudflare account.