Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

awesome #1715

Open
wants to merge 127 commits into
base: main
Choose a base branch
from
Open

awesome #1715

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
2806a65
Create bug_report.yml
apai4 Oct 3, 2024
4cf007b
fix: update README.md (#3)
samdenty Oct 3, 2024
dfebd40
Update README.md
kc0tlh Oct 3, 2024
3181d50
Update README.md
kc0tlh Oct 3, 2024
72df4b8
Update README.md
kc0tlh Oct 3, 2024
36f219f
Update README.md
kc0tlh Oct 3, 2024
84c5da8
Update README.md
kc0tlh Oct 3, 2024
dbef8c1
Create MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
efac3a7
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
bf65a7e
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
85d2b6f
feat: add readme image (#4)
samdenty Oct 3, 2024
5580ab9
fix: typo
samdenty Oct 3, 2024
14da2f0
fix: remove duplicated bug_report template
samdenty Oct 3, 2024
9a1ab23
fix: update links
samdenty Oct 3, 2024
8840d00
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
fc82dda
Rename README.md to CONTRIBUTING.md
kc0tlh Oct 3, 2024
292e923
Rename MAIN-FOLDER-README.md to README.md
kc0tlh Oct 3, 2024
c85fd80
Update README.md
kc0tlh Oct 3, 2024
506ed1d
Update CONTRIBUTING.md
kc0tlh Oct 3, 2024
aa6148f
Update CONTRIBUTING.md
kc0tlh Oct 3, 2024
537389e
Update README.md
kc0tlh Oct 3, 2024
6694e14
Update README.md (#7)
buntured Oct 3, 2024
f6d79c5
fix: add screen recordings section to bug_report.yml
samdenty Oct 3, 2024
6a9cb78
fix(browser-extensions): don't render directly in body
samdenty Oct 4, 2024
816d6d5
Add support for docker dev in bolt
Oct 6, 2024
f90f60b
Update node version and enable host network
Oct 6, 2024
71c4398
Merge branch 'main' into add-docker-support
d3lm Oct 7, 2024
5f62d1f
Merge branch 'main' into add-docker-support
bhardwajRahul Oct 8, 2024
65629d0
Update Dockerfile
bhardwajRahul Oct 10, 2024
a4a722b
Add corepack to setup pnpm
Oct 10, 2024
90a206f
Added the ability to use practically any LLM you can dream of within …
coleam00 Oct 13, 2024
4f7a06f
Added the OpenRouter provider and a few models from OpenRouter (easil…
coleam00 Oct 15, 2024
3e47275
Add provider filtering on model list
jasonm23 Oct 15, 2024
68d8c74
Set default provider from constants
jasonm23 Oct 15, 2024
8701be2
added Google Generative AI (gemini) integration
jonathands Oct 15, 2024
0d77763
let the ollama models be auto generated from ollama api
mosquet Oct 18, 2024
21dbd42
added download code button
fabwaseem Oct 19, 2024
f240d56
Merge pull request #1 from ocodo/main
coleam00 Oct 19, 2024
01c7655
Merge pull request #2 from jonathands/main
coleam00 Oct 19, 2024
44788fc
Merge branch 'main' into main
coleam00 Oct 19, 2024
fc6356c
Merge pull request #5 from yunatamos/main
coleam00 Oct 19, 2024
c31c37f
Merge pull request #6 from fabwaseem/download-code
coleam00 Oct 19, 2024
d7bda6f
Fixing up codebase after merging pull requests
coleam00 Oct 19, 2024
8c4933d
Updated README with new providers and a running list of features to a…
coleam00 Oct 19, 2024
cd4ddfd
Adding together to the list of integration requests
coleam00 Oct 20, 2024
d31abc9
fix: don't always show scrollbars (#548)
friuns2 Oct 16, 2024
c872f22
added Google Generative AI (gemini) integration
jonathands Oct 15, 2024
6eea1a9
Update README.md
yunatamos Oct 21, 2024
1766dd5
Update README.md
kofi-bhr Oct 21, 2024
f9021d3
feat(prompt): add planning step + organize shell commands
kofi-bhr Oct 21, 2024
5b35213
Update prompts.ts
kofi-bhr Oct 21, 2024
f761509
Update max_tokens in constants.ts
fernsdavid25 Oct 21, 2024
121ea7e
More feature requests!!
coleam00 Oct 21, 2024
50a501e
Merge pull request #7 from ocodo/main
coleam00 Oct 21, 2024
0ef3096
Docker Additions
aaronbolton Oct 21, 2024
059933a
Added GitHub push functionality
goncaloalves Oct 21, 2024
7424bff
Create github-build-push.yml
aaronbolton Oct 21, 2024
fc688ec
moved action
aaronbolton Oct 21, 2024
21a0a07
Update github-build-push.yml
aaronbolton Oct 21, 2024
8150f6f
Update github-build-push.yml
aaronbolton Oct 21, 2024
1799636
Update github-build-push.yml
aaronbolton Oct 21, 2024
29f8797
Update github-build-push.yml
aaronbolton Oct 21, 2024
6c8616b
Update README.md
kofi-bhr Oct 21, 2024
49217f2
feat: added sync files to selected local folder function is created. …
muzafferkadir Oct 21, 2024
cf76e4d
Merge pull request #28 from kofi-bhr/patch-1
coleam00 Oct 21, 2024
dd4dd2c
Merge pull request #8 from yunatamos/patch-1
coleam00 Oct 21, 2024
5e8a0b0
add mistral models
ArulGandhi Oct 22, 2024
1b1cd18
mistral models added
ArulGandhi Oct 22, 2024
285a955
removed pixtral
ArulGandhi Oct 22, 2024
da29a79
Merge branch 'coleam00:main' into main
aaronbolton Oct 22, 2024
34ead80
Update types.ts
TarekS93 Oct 22, 2024
f706523
Update constants.ts
TarekS93 Oct 22, 2024
8fb0248
Merge branch 'main' into add-docker-support
bhardwajRahul Oct 22, 2024
3b90afb
Added deepseek models
zenith110 Oct 22, 2024
a6e6619
Merge branch 'main' of https://github.com/zenith110/bolt.new-any-llm
zenith110 Oct 22, 2024
e13790c
Added more instructions for newbs
mayurjobanputra Oct 23, 2024
0089d5c
Merge pull request #1 from mayurjobanputra/mayurjobanputra-patch-1
mayurjobanputra Oct 23, 2024
9ca017c
Update docker-compose.yml
aaronbolton Oct 23, 2024
30dfa4f
chore: Add environment variables for OpenAI API Like integration
ZerxZ Oct 23, 2024
9f2db7b
chore: Update environment variable names for OpenAI Like integration
ZerxZ Oct 23, 2024
05c0137
chore: Update environment variable names for OpenAI Like integration
ZerxZ Oct 23, 2024
7448666
Merge branch 'main' from coleam00 into add-docker-support
Oct 24, 2024
94fa108
Merge pull request #1 from ZerxZ/main
noobydp Oct 24, 2024
fdc2f6c
Enabled boh dev and production docker images. Added convenience scrip…
Oct 24, 2024
8ce82b5
updated ollama to use defined base URL for model calls
noobydp Oct 24, 2024
8ac7931
Adding CONTRIBUTING.md specifically for this fork.
coleam00 Oct 24, 2024
9b38dbd
Merge branch 'main' into main
coleam00 Oct 24, 2024
62e5091
Merge pull request #11 from kofi-bhr/main
coleam00 Oct 24, 2024
69aceea
Merge pull request #12 from fernsdavid25/patch-1
coleam00 Oct 24, 2024
47a7932
Merge pull request #23 from aaronbolton/main
coleam00 Oct 24, 2024
5a10894
Merge pull request #24 from goncaloalves/main
coleam00 Oct 24, 2024
368022d
Merge branch 'main' into main
coleam00 Oct 24, 2024
d40be24
Merge pull request #30 from muzafferkadir/main
coleam00 Oct 24, 2024
5d70255
Merge pull request #36 from ArulGandhi/main
coleam00 Oct 24, 2024
65cf12d
Merge pull request #44 from TarekS93/main
coleam00 Oct 24, 2024
d999e9e
Merge branch 'main' into main
coleam00 Oct 24, 2024
ca99ed5
Merge pull request #51 from zenith110/main
coleam00 Oct 24, 2024
4660e5b
Merge branch 'main' into main
coleam00 Oct 24, 2024
5f6a595
Merge pull request #60 from ZerxZ/main
coleam00 Oct 24, 2024
f1b8c02
Merge branch 'main' into main
coleam00 Oct 24, 2024
b21b145
Merge pull request #64 from noobydp/main
coleam00 Oct 24, 2024
8ab8e67
Cleanup and fixing Ollama models not showing up after merging changes
coleam00 Oct 24, 2024
7b28a75
Updating README with finished implementations and reorder the list of…
coleam00 Oct 24, 2024
4c25af9
Update constants.ts
ArulGandhi Oct 24, 2024
2773a7e
Enhancing Dockerfile to use a staged build, and docker-compose-yaml t…
Oct 24, 2024
2620b3d
Corrected nixpacks.toml filename
Oct 24, 2024
8e7220e
Merge pull request #70 from ArulGandhi/main
coleam00 Oct 24, 2024
25ac7f8
Corrected nixpacks.toml filename
Oct 24, 2024
36cc601
Merge branch 'add-docker-support' of github.com:hillct/bolt.new-any-l…
Oct 24, 2024
87ef835
Adding hints for Coolify config into docker-compose.yaml
Oct 24, 2024
5ec2b12
Adding full suffix o cocker-compose.yaml for ompatibiliy
Oct 24, 2024
8d48cf9
Merge branch 'main' into add-docker-support
Oct 24, 2024
a69ce87
Corrected oudated docker build convenience script target
Oct 24, 2024
92a19bf
create .dockerignore file
ajshovon Oct 25, 2024
c116338
Added Docker Deployment documentation to CONTRIBUTING.md
hillct Oct 26, 2024
065be0f
Added DEEPSEEK_API_KEY to .env.example
coleam00 Oct 28, 2024
2feeb18
More feature requests! Will look at pull requests soon
coleam00 Oct 31, 2024
3cbe207
Merge pull request #55 from mayurjobanputra/main
coleam00 Oct 31, 2024
349c5d5
Merge pull request #71 from hillct/add-docker-support
coleam00 Oct 31, 2024
22ae9d8
Fixing up Docker Compose to work with hot reloads in development and …
coleam00 Nov 1, 2024
a265d72
Merge pull request #77 from ajshovon/main
coleam00 Nov 1, 2024
7fe66ae
Fixing up setup + installation instructions in README
coleam00 Nov 1, 2024
64e95a0
Small mention of hot reloading even when running in container
coleam00 Nov 1, 2024
e7ce257
Instructions on making Ollama models work well
coleam00 Nov 3, 2024
a6d81b1
Making Ollama work within the Docker container, very important fix
coleam00 Nov 5, 2024
9ca4438
Merge pull request #1 from coleam00/main
primemerchantapp Nov 7, 2024
9d7af7c
Rename docker-compose.yaml to docker-compose.yml
primemerchantapp Nov 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Ignore Git and GitHub files
.git
.github/

# Ignore Husky configuration files
.husky/

# Ignore documentation and metadata files
CONTRIBUTING.md
LICENSE
README.md

# Ignore environment examples and sensitive info
.env
*.local
*.example

# Ignore node modules, logs and cache files
**/*.log
**/node_modules
**/dist
**/build
**/.cache
logs
dist-ssr
.DS_Store
47 changes: 47 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Rename this file to .env once you have filled in the below environment variables!

# Get your GROQ API Key here -
# https://console.groq.com/keys
# You only need this environment variable set if you want to use Groq models
GROQ_API_KEY=

# Get your Open AI API Key by following these instructions -
# https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key
# You only need this environment variable set if you want to use GPT models
OPENAI_API_KEY=

# Get your Anthropic API Key in your account settings -
# https://console.anthropic.com/settings/keys
# You only need this environment variable set if you want to use Claude models
ANTHROPIC_API_KEY=

# Get your OpenRouter API Key in your account settings -
# https://openrouter.ai/settings/keys
# You only need this environment variable set if you want to use OpenRouter models
OPEN_ROUTER_API_KEY=

# Get your Google Generative AI API Key by following these instructions -
# https://console.cloud.google.com/apis/credentials
# You only need this environment variable set if you want to use Google Generative AI models
GOOGLE_GENERATIVE_AI_API_KEY=

# You only need this environment variable set if you want to use oLLAMA models
# EXAMPLE http://localhost:11434
OLLAMA_API_BASE_URL=

# You only need this environment variable set if you want to use OpenAI Like models
OPENAI_LIKE_API_BASE_URL=

# You only need this environment variable set if you want to use DeepSeek models through their API
DEEPSEEK_API_KEY=

# Get your OpenAI Like API Key
OPENAI_LIKE_API_KEY=

# Get your Mistral API Key by following these instructions -
# https://console.mistral.ai/api-keys/
# You only need this environment variable set if you want to use Mistral models
MISTRAL_API_KEY=

# Include this environment variable if you want more logging for debugging locally
VITE_LOG_LEVEL=debug
39 changes: 39 additions & 0 deletions .github/workflows/github-build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Push Container

on:
push:
branches:
- main
# paths:
# - 'Dockerfile'
workflow_dispatch:
jobs:
build-and-push:
runs-on: [ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Containers
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha }}
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dist-ssr
*.local

.vscode/*
!.vscode/launch.json
.vscode/launch.json
!.vscode/extensions.json
.idea
.DS_Store
Expand All @@ -24,7 +24,10 @@ dist-ssr

/.cache
/build
.env*
.env.local
.env
*.vars
.wrangler
_worker.bundle

Modelfile
209 changes: 150 additions & 59 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,95 +1,93 @@
[![Bolt Open Source Codebase](./public/social_preview_index.jpg)](https://bolt.new)
# Contributing to Bolt.new Fork

> Welcome to the **Bolt** open-source codebase! This repo contains a simple example app using the core components from bolt.new to help you get started building **AI-powered software development tools** powered by StackBlitz’s **WebContainer API**.
First off, thank you for considering contributing to Bolt.new! This fork aims to expand the capabilities of the original project by integrating multiple LLM providers and enhancing functionality. Every contribution helps make Bolt.new a better tool for developers worldwide.

### Why Build with Bolt + WebContainer API
## 📋 Table of Contents
- [Code of Conduct](#code-of-conduct)
- [How Can I Contribute?](#how-can-i-contribute)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Coding Standards](#coding-standards)
- [Development Setup](#development-setup)
- [Deploymnt with Docker](#docker-deployment-documentation)
- [Project Structure](#project-structure)

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.
## Code of Conduct

### What’s the Difference Between Bolt (This Repo) and [Bolt.new](https://bolt.new)?
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.

- **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.new) and powered by the StackBlitz **WebContainer API**.
## How Can I Contribute?

- **Bolt (This Repo)**: This open-source repository provides the core components used to make **Bolt.new**. This repo 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.
### 🐞 Reporting Bugs and Feature Requests
- Check the issue tracker to avoid duplicates
- Use the issue templates when available
- Include as much relevant information as possible
- For bugs, add steps to reproduce the issue

# Get Started Building with Bolt
### 🔧 Code Contributions
1. Fork the repository
2. Create a new branch for your feature/fix
3. Write your code
4. Submit a pull request

Bolt combines the capabilities of AI with sandboxed development environments to create a collaborative experience where code can be developed by the assistant and the programmer together. Bolt combines [WebContainer API](https://webcontainers.io/api) with [Claude Sonnet 3.5](https://www.anthropic.com/news/claude-3-5-sonnet) using [Remix](https://remix.run/) and the [AI SDK](https://sdk.vercel.ai/).
### ✨ Becoming a Core Contributor
We're looking for dedicated contributors to help maintain and grow this project. If you're interested in becoming a core contributor, please fill out our [Contributor Application Form](https://forms.gle/TBSteXSDCtBDwr5m7).

### WebContainer API
## Pull Request Guidelines

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). WebContainers 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.
### 📝 PR Checklist
- [ ] Branch from the main branch
- [ ] Update documentation if needed
- [ ] Manually verify all new functionality works as expected
- [ ] Keep PRs focused and atomic

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).
### 👀 Review Process
1. Manually test the changes
2. At least one maintainer review required
3. Address all review comments
4. Maintain clean commit history

### Remix App
## Coding Standards

Bolt is built with [Remix](https://remix.run/) and
deployed using [CloudFlare Pages](https://pages.cloudflare.com/) and
[CloudFlare Workers](https://workers.cloudflare.com/).
### 💻 General Guidelines
- Follow existing code style
- Comment complex logic
- Keep functions focused and small
- Use meaningful variable names

### AI SDK Integration

Bolt uses the [AI SDK](https://github.com/vercel/ai) to integrate with AI
models. At this time, Bolt supports using Anthropic's Claude Sonnet 3.5.
You can get an API key from the [Anthropic API Console](https://console.anthropic.com/) to use with Bolt.
Take a look at how [Bolt uses the AI SDK](https://github.com/stackblitz/bolt.new/tree/main/app/lib/.server/llm)

## 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):
## Development Setup

### 🔄 Initial Setup
1. Clone the repository:
```bash
git clone https://github.com/stackblitz/bolt.new.git
git clone https://github.com/coleam00/bolt.new-any-llm.git
```

2. Install dependencies:

```bash
pnpm install
```

3. Create a `.env.local` file in the root directory and add your Anthropic API key:

```
3. Set up environment variables:
- Rename `.env.example` to `.env.local`
- Add your LLM API keys (only set the ones you plan to use):
```bash
GROQ_API_KEY=XXX
OPENAI_API_KEY=XXX
ANTHROPIC_API_KEY=XXX
...
```

Optionally, you can set the debug level:

```
- Optionally set debug level:
```bash
VITE_LOG_LEVEL=debug
```

**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:

### 🚀 Running the Development Server
```bash
pnpm run dev
```

This will start the Remix Vite development server.
**Note**: You will need Google Chrome Canary to run this locally if you use Chrome! It's an easy install and a good browser for web development anyway.

## Testing

Expand All @@ -108,3 +106,96 @@ pnpm run deploy
```

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

# Docker Deployment Documentation

This guide outlines various methods for building and deploying the application using Docker.

## Build Methods

### 1. Using Helper Scripts

NPM scripts are provided for convenient building:

```bash
# Development build
npm run dockerbuild

# Production build
npm run dockerbuild:prod
```

### 2. Direct Docker Build Commands

You can use Docker's target feature to specify the build environment:

```bash
# Development build
docker build . --target bolt-ai-development

# Production build
docker build . --target bolt-ai-production
```

### 3. Docker Compose with Profiles

Use Docker Compose profiles to manage different environments:

```bash
# Development environment
docker-compose --profile development up

# Production environment
docker-compose --profile production up
```

## Running the Application

After building using any of the methods above, run the container with:

```bash
# Development
docker run -p 5173:5173 --env-file .env.local bolt-ai:development

# Production
docker run -p 5173:5173 --env-file .env.local bolt-ai:production
```

## Deployment with Coolify

[Coolify](https://github.com/coollabsio/coolify) provides a straightforward deployment process:

1. Import your Git repository as a new project
2. Select your target environment (development/production)
3. Choose "Docker Compose" as the Build Pack
4. Configure deployment domains
5. Set the custom start command:
```bash
docker compose --profile production up
```
6. Configure environment variables
- Add necessary AI API keys
- Adjust other environment variables as needed
7. Deploy the application

## VS Code Integration

The `docker-compose.yaml` configuration is compatible with VS Code dev containers:

1. Open the command palette in VS Code
2. Select the dev container configuration
3. Choose the "development" profile from the context menu

## Environment Files

Ensure you have the appropriate `.env.local` file configured before running the containers. This file should contain:
- API keys
- Environment-specific configurations
- Other required environment variables

## Notes

- Port 5173 is exposed and mapped for both development and production environments
- Environment variables are loaded from `.env.local`
- Different profiles (development/production) can be used for different deployment scenarios
- The configuration supports both local development and production deployment
Loading
Loading