diff --git a/.cursorrules b/.cursorrules
index 6d33701e..83b6c3da 100644
--- a/.cursorrules
+++ b/.cursorrules
@@ -8,6 +8,8 @@ bolt.diy (previously oTToDev) is an open-source AI-powered full-stack web develo
- Focus on best practices and clean code
- Provide clear explanations for code changes
- Maintain consistent code style with the existing codebase
+- Always write comments that are relevant to the code they describe
+- Always write a changelog what you did and save it in a file called changelog.md in the root of the project
# Techstack
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 8b66eb1b..5c8c6ad7 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,4 +1,4 @@
-name: "Bug report"
+name: 'Bug report'
description: Create a report to help us improve
body:
- type: markdown
diff --git a/.github/ISSUE_TEMPLATE/epic.md b/.github/ISSUE_TEMPLATE/epic.md
index 2727594f..e75eca01 100644
--- a/.github/ISSUE_TEMPLATE/epic.md
+++ b/.github/ISSUE_TEMPLATE/epic.md
@@ -19,5 +19,5 @@ Usual values: Software Developers using the IDE | Contributors -->
# Capabilities
-
diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md
index 8df8c321..3869b4d3 100644
--- a/.github/ISSUE_TEMPLATE/feature.md
+++ b/.github/ISSUE_TEMPLATE/feature.md
@@ -13,13 +13,13 @@ assignees: ''
# Scope
-
# Options
-
-
diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml
index d3bd2f1b..0b54001c 100644
--- a/.github/workflows/docker.yaml
+++ b/.github/workflows/docker.yaml
@@ -8,7 +8,7 @@ on:
- main
tags:
- v*
- - "*"
+ - '*'
permissions:
packages: write
@@ -57,7 +57,7 @@ jobs:
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} # ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.GITHUB_TOKEN }} # ${{ secrets.DOCKER_PASSWORD }}
+ password: ${{ secrets.GITHUB_TOKEN }} # ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
index 0691be2f..c0f117b7 100644
--- a/.github/workflows/docs.yaml
+++ b/.github/workflows/docs.yaml
@@ -5,7 +5,7 @@ on:
branches:
- main
paths:
- - 'docs/**' # This will only trigger the workflow when files in docs directory change
+ - 'docs/**' # This will only trigger the workflow when files in docs directory change
permissions:
contents: write
jobs:
@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
+ - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
@@ -32,4 +32,4 @@ jobs:
mkdocs-material-
- run: pip install mkdocs-material
- - run: mkdocs gh-deploy --force
\ No newline at end of file
+ - run: mkdocs gh-deploy --force
diff --git a/.github/workflows/pr-release-validation.yaml b/.github/workflows/pr-release-validation.yaml
index 99c57037..9c5787e2 100644
--- a/.github/workflows/pr-release-validation.yaml
+++ b/.github/workflows/pr-release-validation.yaml
@@ -9,10 +9,10 @@ on:
jobs:
validate:
runs-on: ubuntu-latest
-
+
steps:
- uses: actions/checkout@v4
-
+
- name: Validate PR Labels
run: |
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'stable-release') }}" == "true" ]]; then
@@ -28,4 +28,4 @@ jobs:
fi
else
echo "This PR doesn't have the stable-release label. No release will be created."
- fi
\ No newline at end of file
+ fi
diff --git a/.github/workflows/semantic-pr.yaml b/.github/workflows/semantic-pr.yaml
index b6d64c88..503b0455 100644
--- a/.github/workflows/semantic-pr.yaml
+++ b/.github/workflows/semantic-pr.yaml
@@ -29,4 +29,4 @@ jobs:
docs
refactor
revert
- test
\ No newline at end of file
+ test
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index c9eb890e..4b6fc78c 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -2,8 +2,8 @@ name: Mark Stale Issues and Pull Requests
on:
schedule:
- - cron: '0 2 * * *' # Runs daily at 2:00 AM UTC
- workflow_dispatch: # Allows manual triggering of the workflow
+ - cron: '0 2 * * *' # Runs daily at 2:00 AM UTC
+ workflow_dispatch: # Allows manual triggering of the workflow
jobs:
stale:
@@ -14,12 +14,12 @@ jobs:
uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- stale-issue-message: "This issue has been marked as stale due to inactivity. If no further activity occurs, it will be closed in 7 days."
- stale-pr-message: "This pull request has been marked as stale due to inactivity. If no further activity occurs, it will be closed in 7 days."
- days-before-stale: 10 # Number of days before marking an issue or PR as stale
- days-before-close: 4 # Number of days after being marked stale before closing
- stale-issue-label: "stale" # Label to apply to stale issues
- stale-pr-label: "stale" # Label to apply to stale pull requests
- exempt-issue-labels: "pinned,important" # Issues with these labels won't be marked stale
- exempt-pr-labels: "pinned,important" # PRs with these labels won't be marked stale
- operations-per-run: 75 # Limits the number of actions per run to avoid API rate limits
+ stale-issue-message: 'This issue has been marked as stale due to inactivity. If no further activity occurs, it will be closed in 7 days.'
+ stale-pr-message: 'This pull request has been marked as stale due to inactivity. If no further activity occurs, it will be closed in 7 days.'
+ days-before-stale: 10 # Number of days before marking an issue or PR as stale
+ days-before-close: 4 # Number of days after being marked stale before closing
+ stale-issue-label: 'stale' # Label to apply to stale issues
+ stale-pr-label: 'stale' # Label to apply to stale pull requests
+ exempt-issue-labels: 'pinned,important' # Issues with these labels won't be marked stale
+ exempt-pr-labels: 'pinned,important' # PRs with these labels won't be marked stale
+ operations-per-run: 75 # Limits the number of actions per run to avoid API rate limits
diff --git a/.github/workflows/update-stable.yml b/.github/workflows/update-stable.yml
index f7341c43..a867a4c4 100644
--- a/.github/workflows/update-stable.yml
+++ b/.github/workflows/update-stable.yml
@@ -7,12 +7,12 @@ on:
permissions:
contents: write
-
+
jobs:
prepare-release:
if: contains(github.event.head_commit.message, '#release')
runs-on: ubuntu-latest
-
+
steps:
- uses: actions/checkout@v4
with:
@@ -80,7 +80,6 @@ jobs:
NEW_VERSION=${{ steps.bump_version.outputs.new_version }}
pnpm version $NEW_VERSION --no-git-tag-version --allow-same-version
-
- name: Prepare changelog script
run: chmod +x .github/scripts/generate-changelog.sh
@@ -89,14 +88,14 @@ jobs:
env:
NEW_VERSION: ${{ steps.bump_version.outputs.new_version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
+
run: .github/scripts/generate-changelog.sh
- name: Get the latest commit hash and version tag
run: |
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "NEW_VERSION=${{ steps.bump_version.outputs.new_version }}" >> $GITHUB_ENV
-
+
- name: Commit and Tag Release
run: |
git pull
@@ -123,4 +122,4 @@ jobs:
gh release create "$VERSION" \
--title "Release $VERSION" \
--notes "${{ steps.changelog.outputs.content }}" \
- --target stable
\ No newline at end of file
+ --target stable
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0310b6d1..400bb32a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,15 +6,15 @@ Welcome! This guide provides all the details you need to contribute effectively
## π Table of Contents
-1. [Code of Conduct](#code-of-conduct)
-2. [How Can I Contribute?](#how-can-i-contribute)
-3. [Pull Request Guidelines](#pull-request-guidelines)
-4. [Coding Standards](#coding-standards)
-5. [Development Setup](#development-setup)
-6. [Testing](#testing)
-7. [Deployment](#deployment)
-8. [Docker Deployment](#docker-deployment)
-9. [VS Code Dev Containers Integration](#vs-code-dev-containers-integration)
+1. [Code of Conduct](#code-of-conduct)
+2. [How Can I Contribute?](#how-can-i-contribute)
+3. [Pull Request Guidelines](#pull-request-guidelines)
+4. [Coding Standards](#coding-standards)
+5. [Development Setup](#development-setup)
+6. [Testing](#testing)
+7. [Deployment](#deployment)
+8. [Docker Deployment](#docker-deployment)
+9. [VS Code Dev Containers Integration](#vs-code-dev-containers-integration)
---
@@ -27,60 +27,67 @@ This project is governed by our **Code of Conduct**. By participating, you agree
## π οΈ How Can I Contribute?
### 1οΈβ£ Reporting Bugs or Feature Requests
+
- Check the [issue tracker](#) to avoid duplicates.
-- Use issue templates (if available).
+- Use issue templates (if available).
- Provide detailed, relevant information and steps to reproduce bugs.
### 2οΈβ£ Code Contributions
-1. Fork the repository.
-2. Create a feature or fix branch.
-3. Write and test your code.
+
+1. Fork the repository.
+2. Create a feature or fix branch.
+3. Write and test your code.
4. Submit a pull request (PR).
-### 3οΈβ£ Join as a Core Contributor
+### 3οΈβ£ Join as a Core Contributor
+
Interested in maintaining and growing the project? Fill out our [Contributor Application Form](https://forms.gle/TBSteXSDCtBDwr5m7).
---
## β Pull Request Guidelines
-### PR Checklist
-- Branch from the **main** branch.
-- Update documentation, if needed.
-- Test all functionality manually.
-- Focus on one feature/bug per PR.
+### PR Checklist
-### Review Process
-1. Manual testing by reviewers.
-2. At least one maintainer review required.
-3. Address review comments.
+- Branch from the **main** branch.
+- Update documentation, if needed.
+- Test all functionality manually.
+- Focus on one feature/bug per PR.
+
+### Review Process
+
+1. Manual testing by reviewers.
+2. At least one maintainer review required.
+3. Address review comments.
4. Maintain a clean commit history.
---
## π Coding Standards
-### General Guidelines
-- Follow existing code style.
-- Comment complex logic.
-- Keep functions small and focused.
+### General Guidelines
+
+- Follow existing code style.
+- Comment complex logic.
+- Keep functions small and focused.
- Use meaningful variable names.
---
## π₯οΈ Development Setup
-### 1οΈβ£ Initial Setup
-- Clone the repository:
+### 1οΈβ£ Initial Setup
+
+- Clone the repository:
```bash
git clone https://github.com/stackblitz-labs/bolt.diy.git
```
-- Install dependencies:
+- Install dependencies:
```bash
pnpm install
```
-- Set up environment variables:
- 1. Rename `.env.example` to `.env.local`.
+- Set up environment variables:
+ 1. Rename `.env.example` to `.env.local`.
2. Add your API keys:
```bash
GROQ_API_KEY=XXX
@@ -88,23 +95,26 @@ Interested in maintaining and growing the project? Fill out our [Contributor App
OPENAI_API_KEY=XXX
...
```
- 3. Optionally set:
- - Debug level: `VITE_LOG_LEVEL=debug`
- - Context size: `DEFAULT_NUM_CTX=32768`
+ 3. Optionally set:
+ - Debug level: `VITE_LOG_LEVEL=debug`
+ - Context size: `DEFAULT_NUM_CTX=32768`
**Note**: Never commit your `.env.local` file to version control. Itβs already in `.gitignore`.
-### 2οΈβ£ Run Development Server
+### 2οΈβ£ Run Development Server
+
```bash
pnpm run dev
```
+
**Tip**: Use **Google Chrome Canary** for local testing.
---
## π§ͺ Testing
-Run the test suite with:
+Run the test suite with:
+
```bash
pnpm test
```
@@ -113,10 +123,12 @@ pnpm test
## π Deployment
-### Deploy to Cloudflare Pages
+### Deploy to Cloudflare Pages
+
```bash
pnpm run deploy
```
+
Ensure you have required permissions and that Wrangler is configured.
---
@@ -127,67 +139,76 @@ This section outlines the methods for deploying the application using Docker. Th
---
-### π§βπ» Development Environment
+### π§βπ» Development Environment
-#### Build Options
+#### Build Options
+
+**Option 1: Helper Scripts**
-**Option 1: Helper Scripts**
```bash
# Development build
npm run dockerbuild
```
-**Option 2: Direct Docker Build Command**
+**Option 2: Direct Docker Build Command**
+
```bash
docker build . --target bolt-ai-development
```
-**Option 3: Docker Compose Profile**
+**Option 3: Docker Compose Profile**
+
```bash
docker compose --profile development up
```
-#### Running the Development Container
+#### Running the Development Container
+
```bash
docker run -p 5173:5173 --env-file .env.local bolt-ai:development
```
---
-### π Production Environment
+### π Production Environment
-#### Build Options
+#### Build Options
+
+**Option 1: Helper Scripts**
-**Option 1: Helper Scripts**
```bash
# Production build
npm run dockerbuild:prod
```
-**Option 2: Direct Docker Build Command**
+**Option 2: Direct Docker Build Command**
+
```bash
docker build . --target bolt-ai-production
```
-**Option 3: Docker Compose Profile**
+**Option 3: Docker Compose Profile**
+
```bash
docker compose --profile production up
```
-#### Running the Production Container
+#### Running the Production Container
+
```bash
docker run -p 5173:5173 --env-file .env.local bolt-ai:production
```
---
-### Coolify Deployment
+### Coolify Deployment
-For an easy deployment process, use [Coolify](https://github.com/coollabsio/coolify):
-1. Import your Git repository into Coolify.
-2. Choose **Docker Compose** as the build pack.
-3. Configure environment variables (e.g., API keys).
-4. Set the start command:
+For an easy deployment process, use [Coolify](https://github.com/coollabsio/coolify):
+
+1. Import your Git repository into Coolify.
+2. Choose **Docker Compose** as the build pack.
+3. Configure environment variables (e.g., API keys).
+4. Set the start command:
```bash
docker compose --profile production up
```
@@ -200,20 +221,22 @@ The `docker-compose.yaml` configuration is compatible with **VS Code Dev Contain
### Steps to Use Dev Containers
-1. Open the command palette in VS Code (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS).
-2. Select **Dev Containers: Reopen in Container**.
-3. Choose the **development** profile when prompted.
+1. Open the command palette in VS Code (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS).
+2. Select **Dev Containers: Reopen in Container**.
+3. Choose the **development** profile when prompted.
4. VS Code will rebuild the container and open it with the pre-configured environment.
---
## π Environment Variables
-Ensure `.env.local` is configured correctly with:
-- API keys.
-- Context-specific configurations.
+Ensure `.env.local` is configured correctly with:
+
+- API keys.
+- Context-specific configurations.
+
+Example for the `DEFAULT_NUM_CTX` variable:
-Example for the `DEFAULT_NUM_CTX` variable:
```bash
DEFAULT_NUM_CTX=24576 # Uses 32GB VRAM
-```
\ No newline at end of file
+```
diff --git a/FAQ.md b/FAQ.md
index a09fae88..cf00f546 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -12,6 +12,7 @@ For the best experience with bolt.diy, we recommend using the following models:
- **Qwen 2.5 Coder 32b**: Best model for self-hosting with reasonable hardware requirements
**Note**: Models with less than 7b parameters typically lack the capability to properly interact with bolt!
+
@@ -21,20 +22,21 @@ For the best experience with bolt.diy, we recommend using the following models:
Mention the frameworks or libraries you want to use (e.g., Astro, Tailwind, ShadCN) in your initial prompt. This ensures that bolt.diy scaffolds the project according to your preferences.
- **Use the enhance prompt icon**:
- Before sending your prompt, click the *enhance* icon to let the AI refine your prompt. You can edit the suggested improvements before submitting.
+ Before sending your prompt, click the _enhance_ icon to let the AI refine your prompt. You can edit the suggested improvements before submitting.
- **Scaffold the basics first, then add features**:
Ensure the foundational structure of your application is in place before introducing advanced functionality. This helps bolt.diy establish a solid base to build on.
- **Batch simple instructions**:
- Combine simple tasks into a single prompt to save time and reduce API credit consumption. For example:
- *"Change the color scheme, add mobile responsiveness, and restart the dev server."*
+ Combine simple tasks into a single prompt to save time and reduce API credit consumption. For example:
+ _"Change the color scheme, add mobile responsiveness, and restart the dev server."_
How do I contribute to bolt.diy?
Check out our [Contribution Guide](CONTRIBUTING.md) for more details on how to get involved!
+
@@ -42,48 +44,60 @@ Check out our [Contribution Guide](CONTRIBUTING.md) for more details on how to g
Visit our [Roadmap](https://roadmap.sh/r/ottodev-roadmap-2ovzo) for the latest updates.
New features and improvements are on the way!
+
Why are there so many open issues/pull requests?
-bolt.diy began as a small showcase project on @ColeMedin's YouTube channel to explore editing open-source projects with local LLMs. However, it quickly grew into a massive community effort!
+bolt.diy began as a small showcase project on @ColeMedin's YouTube channel to explore editing open-source projects with local LLMs. However, it quickly grew into a massive community effort!
We're forming a team of maintainers to manage demand and streamline issue resolution. The maintainers are rockstars, and we're also exploring partnerships to help the project thrive.
+
How do local LLMs compare to larger models like Claude 3.5 Sonnet for bolt.diy?
While local LLMs are improving rapidly, larger models like GPT-4o, Claude 3.5 Sonnet, and DeepSeek Coder V2 236b still offer the best results for complex applications. Our ongoing focus is to improve prompts, agents, and the platform to better support smaller local LLMs.
+
Common Errors and Troubleshooting
### **"There was an error processing this request"**
+
This generic error message means something went wrong. Check both:
+
- The terminal (if you started the app with Docker or `pnpm`).
-- The developer console in your browser (press `F12` or right-click > *Inspect*, then go to the *Console* tab).
+- The developer console in your browser (press `F12` or right-click > _Inspect_, then go to the _Console_ tab).
### **"x-api-key header missing"**
+
This error is sometimes resolved by restarting the Docker container.
If that doesn't work, try switching from Docker to `pnpm` or vice versa. We're actively investigating this issue.
### **Blank preview when running the app**
+
A blank preview often occurs due to hallucinated bad code or incorrect commands.
To troubleshoot:
+
- Check the developer console for errors.
- Remember, previews are core functionality, so the app isn't broken! We're working on making these errors more transparent.
### **"Everything works, but the results are bad"**
+
Local LLMs like Qwen-2.5-Coder are powerful for small applications but still experimental for larger projects. For better results, consider using larger models like GPT-4o, Claude 3.5 Sonnet, or DeepSeek Coder V2 236b.
### **"Received structured exception #0xc0000005: access violation"**
+
If you are getting this, you are probably on Windows. The fix is generally to update the [Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170)
### **"Miniflare or Wrangler errors in Windows"**
+
You will need to make sure you have the latest version of Visual Studio C++ installed (14.40.33816), more information here https://github.com/stackblitz-labs/bolt.diy/issues/19.
+
---
diff --git a/PROJECT.md b/PROJECT.md
index 33e697ef..58d47089 100644
--- a/PROJECT.md
+++ b/PROJECT.md
@@ -31,7 +31,7 @@ and this way communicate where the focus currently is.
2. Grouping of features
-By linking features with epics, we can keep them together and document *why* we invest work into a particular thing.
+By linking features with epics, we can keep them together and document _why_ we invest work into a particular thing.
## Features (mid-term)
@@ -41,13 +41,13 @@ function, you name it).
However, we intentionally describe features in a more vague manner. Why? Everybody loves crisp, well-defined
acceptance-criteria, no? Well, every product owner loves it. because he knows what heβll get once itβs done.
-But: **here is no owner of this product**. Therefore, we grant *maximum flexibility to the developer contributing a feature* β so that he can bring in his ideas and have most fun implementing it.
+But: **here is no owner of this product**. Therefore, we grant _maximum flexibility to the developer contributing a feature_ β so that he can bring in his ideas and have most fun implementing it.
-The feature therefore tries to describe *what* should be improved but not in detail *how*.
+The feature therefore tries to describe _what_ should be improved but not in detail _how_.
## PRs as materialized features (short-term)
-Once a developer starts working on a feature, a draft-PR *can* be opened asap to share, describe and discuss, how the feature shall be implemented. But: this is not a must. It just helps to get early feedback and get other developers involved. Sometimes, the developer just wants to get started and then open a PR later.
+Once a developer starts working on a feature, a draft-PR _can_ be opened asap to share, describe and discuss, how the feature shall be implemented. But: this is not a must. It just helps to get early feedback and get other developers involved. Sometimes, the developer just wants to get started and then open a PR later.
In a loosely organized project, it may as well happen that multiple PRs are opened for the same feature. This is no real issue: Usually, peoply being passionate about a solution are willing to join forces and get it done together. And if a second developer was just faster getting the same feature realized: Be happy that it's been done, close the PR and look out for the next feature to implement π€
diff --git a/README.md b/README.md
index 4da9c4d1..20a8d962 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,12 @@
Welcome to bolt.diy, the official open source version of Bolt.new (previously known as oTToDev and bolt.new ANY LLM), which allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, LMStudio, Mistral, xAI, HuggingFace, DeepSeek, or Groq models - and it is easily extended to use any other model supported by the Vercel AI SDK! See the instructions below for running this locally and extending it to include more models.
------
+---
+
Check the [bolt.diy Docs](https://stackblitz-labs.github.io/bolt.diy/) for more offical installation instructions and more informations.
------
+---
+
Also [this pinned post in our community](https://thinktank.ottomator.ai/t/videos-tutorial-helpful-content/3243) has a bunch of incredible resources for running and deploying bolt.diy yourself!
We have also launched an experimental agent called the "bolt.diy Expert" that can answer common questions about bolt.diy. Find it here on the [oTTomator Live Agent Studio](https://studio.ottomator.ai/).
diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx
index 4bfc038c..ee082d1f 100644
--- a/app/components/chat/BaseChat.tsx
+++ b/app/components/chat/BaseChat.tsx
@@ -572,8 +572,10 @@ export const BaseChat = React.forwardRef(