Merge pull request #845 from dustinwloring1988/docs/updated-docs
Browse files- CONTRIBUTING.md +159 -157
- FAQ.md +56 -28
- README.md +1 -3
- docs/docs/CONTRIBUTING.md +128 -155
- docs/docs/index.md +121 -98
CONTRIBUTING.md
CHANGED
@@ -1,217 +1,219 @@
|
|
1 |
-
#
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
## π Table of Contents
|
6 |
-
- [Code of Conduct](#code-of-conduct)
|
7 |
-
- [How Can I Contribute?](#how-can-i-contribute)
|
8 |
-
- [Pull Request Guidelines](#pull-request-guidelines)
|
9 |
-
- [Coding Standards](#coding-standards)
|
10 |
-
- [Development Setup](#development-setup)
|
11 |
-
- [Deploymnt with Docker](#docker-deployment-documentation)
|
12 |
-
- [Project Structure](#project-structure)
|
13 |
-
|
14 |
-
## Code of Conduct
|
15 |
-
|
16 |
-
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.
|
17 |
-
|
18 |
-
## How Can I Contribute?
|
19 |
-
|
20 |
-
### π Reporting Bugs and Feature Requests
|
21 |
-
- Check the issue tracker to avoid duplicates
|
22 |
-
- Use the issue templates when available
|
23 |
-
- Include as much relevant information as possible
|
24 |
-
- For bugs, add steps to reproduce the issue
|
25 |
-
|
26 |
-
### π§ Code Contributions
|
27 |
-
1. Fork the repository
|
28 |
-
2. Create a new branch for your feature/fix
|
29 |
-
3. Write your code
|
30 |
-
4. Submit a pull request
|
31 |
-
|
32 |
-
### β¨ Becoming a Core Contributor
|
33 |
-
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).
|
34 |
-
|
35 |
-
## Pull Request Guidelines
|
36 |
-
|
37 |
-
### π PR Checklist
|
38 |
-
- [ ] Branch from the main branch
|
39 |
-
- [ ] Update documentation if needed
|
40 |
-
- [ ] Manually verify all new functionality works as expected
|
41 |
-
- [ ] Keep PRs focused and atomic
|
42 |
-
|
43 |
-
### π Review Process
|
44 |
-
1. Manually test the changes
|
45 |
-
2. At least one maintainer review required
|
46 |
-
3. Address all review comments
|
47 |
-
4. Maintain clean commit history
|
48 |
-
|
49 |
-
## Coding Standards
|
50 |
-
|
51 |
-
### π» General Guidelines
|
52 |
-
- Follow existing code style
|
53 |
-
- Comment complex logic
|
54 |
-
- Keep functions focused and small
|
55 |
-
- Use meaningful variable names
|
56 |
-
- Lint your code. This repo contains a pre-commit-hook that will verify your code is linted properly,
|
57 |
-
so set up your IDE to do that for you!
|
58 |
-
|
59 |
-
## Development Setup
|
60 |
-
|
61 |
-
### π Initial Setup
|
62 |
-
1. Clone the repository:
|
63 |
-
```bash
|
64 |
-
git clone https://github.com/coleam00/bolt.new-any-llm.git
|
65 |
-
```
|
66 |
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
```bash
|
69 |
-
pnpm
|
70 |
```
|
|
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
```bash
|
76 |
-
GROQ_API_KEY=XXX
|
77 |
-
HuggingFace_API_KEY=XXX
|
78 |
-
OPENAI_API_KEY=XXX
|
79 |
-
ANTHROPIC_API_KEY=XXX
|
80 |
-
...
|
81 |
-
```
|
82 |
-
- Optionally set debug level:
|
83 |
-
```bash
|
84 |
-
VITE_LOG_LEVEL=debug
|
85 |
-
```
|
86 |
|
87 |
-
|
88 |
```bash
|
89 |
-
|
90 |
```
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
* DEFAULT_NUM_CTX=32768 - Consumes 36GB of VRAM
|
95 |
-
* DEFAULT_NUM_CTX=24576 - Consumes 32GB of VRAM
|
96 |
-
* DEFAULT_NUM_CTX=12288 - Consumes 26GB of VRAM
|
97 |
-
* DEFAULT_NUM_CTX=6144 - Consumes 24GB of VRAM
|
98 |
|
99 |
-
|
100 |
|
101 |
-
###
|
102 |
```bash
|
103 |
-
pnpm run
|
104 |
```
|
|
|
105 |
|
106 |
-
|
107 |
|
108 |
-
##
|
109 |
|
110 |
-
|
111 |
|
112 |
-
|
113 |
-
pnpm test
|
114 |
-
```
|
115 |
|
116 |
-
|
117 |
|
118 |
-
|
119 |
|
|
|
120 |
```bash
|
121 |
-
|
|
|
122 |
```
|
123 |
|
124 |
-
|
|
|
|
|
|
|
125 |
|
126 |
-
|
|
|
|
|
|
|
127 |
|
128 |
-
|
|
|
|
|
|
|
129 |
|
130 |
-
|
131 |
|
132 |
-
###
|
133 |
|
134 |
-
|
135 |
|
|
|
136 |
```bash
|
137 |
-
# Development build
|
138 |
-
npm run dockerbuild
|
139 |
-
|
140 |
# Production build
|
141 |
npm run dockerbuild:prod
|
142 |
```
|
143 |
|
144 |
-
|
145 |
-
|
146 |
-
You can use Docker's target feature to specify the build environment:
|
147 |
-
|
148 |
```bash
|
149 |
-
# Development build
|
150 |
-
docker build . --target bolt-ai-development
|
151 |
-
|
152 |
-
# Production build
|
153 |
docker build . --target bolt-ai-production
|
154 |
```
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
Use Docker Compose profiles to manage different environments:
|
159 |
-
|
160 |
```bash
|
161 |
-
# Development environment
|
162 |
-
docker-compose --profile development up
|
163 |
-
|
164 |
-
# Production environment
|
165 |
docker-compose --profile production up
|
166 |
```
|
167 |
|
168 |
-
|
169 |
-
|
170 |
-
After building using any of the methods above, run the container with:
|
171 |
-
|
172 |
```bash
|
173 |
-
# Development
|
174 |
-
docker run -p 5173:5173 --env-file .env.local bolt-ai:development
|
175 |
-
|
176 |
-
# Production
|
177 |
docker run -p 5173:5173 --env-file .env.local bolt-ai:production
|
178 |
```
|
179 |
|
180 |
-
|
181 |
|
182 |
-
|
183 |
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
```bash
|
190 |
docker compose --profile production up
|
191 |
```
|
192 |
-
6. Configure environment variables
|
193 |
-
- Add necessary AI API keys
|
194 |
-
- Adjust other environment variables as needed
|
195 |
-
7. Deploy the application
|
196 |
|
197 |
-
|
|
|
|
|
198 |
|
199 |
-
The `docker-compose.yaml` configuration is compatible with VS Code
|
200 |
|
201 |
-
|
202 |
-
2. Select the dev container configuration
|
203 |
-
3. Choose the "development" profile from the context menu
|
204 |
|
205 |
-
|
|
|
|
|
|
|
206 |
|
207 |
-
|
208 |
-
- API keys
|
209 |
-
- Environment-specific configurations
|
210 |
-
- Other required environment variables
|
211 |
|
212 |
-
##
|
213 |
|
214 |
-
|
215 |
-
-
|
216 |
-
-
|
217 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
# Contribution Guidelines
|
2 |
|
3 |
+
Welcome! This guide provides all the details you need to contribute effectively to the project. Thank you for helping us make **bolt.diy** a better tool for developers worldwide. π‘
|
4 |
+
|
5 |
+
---
|
6 |
|
7 |
## π Table of Contents
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
1. [Code of Conduct](#code-of-conduct)
|
10 |
+
2. [How Can I Contribute?](#how-can-i-contribute)
|
11 |
+
3. [Pull Request Guidelines](#pull-request-guidelines)
|
12 |
+
4. [Coding Standards](#coding-standards)
|
13 |
+
5. [Development Setup](#development-setup)
|
14 |
+
6. [Testing](#testing)
|
15 |
+
7. [Deployment](#deployment)
|
16 |
+
8. [Docker Deployment](#docker-deployment)
|
17 |
+
9. [VS Code Dev Containers Integration](#vs-code-dev-containers-integration)
|
18 |
+
|
19 |
+
---
|
20 |
+
|
21 |
+
## π‘οΈ Code of Conduct
|
22 |
+
|
23 |
+
This project is governed by our **Code of Conduct**. By participating, you agree to uphold this code. Report unacceptable behavior to the project maintainers.
|
24 |
+
|
25 |
+
---
|
26 |
+
|
27 |
+
## π οΈ How Can I Contribute?
|
28 |
+
|
29 |
+
### 1οΈβ£ Reporting Bugs or Feature Requests
|
30 |
+
- Check the [issue tracker](#) to avoid duplicates.
|
31 |
+
- Use issue templates (if available).
|
32 |
+
- Provide detailed, relevant information and steps to reproduce bugs.
|
33 |
+
|
34 |
+
### 2οΈβ£ Code Contributions
|
35 |
+
1. Fork the repository.
|
36 |
+
2. Create a feature or fix branch.
|
37 |
+
3. Write and test your code.
|
38 |
+
4. Submit a pull request (PR).
|
39 |
+
|
40 |
+
### 3οΈβ£ Join as a Core Contributor
|
41 |
+
Interested in maintaining and growing the project? Fill out our [Contributor Application Form](https://forms.gle/TBSteXSDCtBDwr5m7).
|
42 |
+
|
43 |
+
---
|
44 |
+
|
45 |
+
## β
Pull Request Guidelines
|
46 |
+
|
47 |
+
### PR Checklist
|
48 |
+
- Branch from the **main** branch.
|
49 |
+
- Update documentation, if needed.
|
50 |
+
- Test all functionality manually.
|
51 |
+
- Focus on one feature/bug per PR.
|
52 |
+
|
53 |
+
### Review Process
|
54 |
+
1. Manual testing by reviewers.
|
55 |
+
2. At least one maintainer review required.
|
56 |
+
3. Address review comments.
|
57 |
+
4. Maintain a clean commit history.
|
58 |
+
|
59 |
+
---
|
60 |
+
|
61 |
+
## π Coding Standards
|
62 |
+
|
63 |
+
### General Guidelines
|
64 |
+
- Follow existing code style.
|
65 |
+
- Comment complex logic.
|
66 |
+
- Keep functions small and focused.
|
67 |
+
- Use meaningful variable names.
|
68 |
+
|
69 |
+
---
|
70 |
+
|
71 |
+
## π₯οΈ Development Setup
|
72 |
+
|
73 |
+
### 1οΈβ£ Initial Setup
|
74 |
+
- Clone the repository:
|
75 |
+
```bash
|
76 |
+
git clone https://github.com/stackblitz-labs/bolt.diy.git
|
77 |
+
```
|
78 |
+
- Install dependencies:
|
79 |
+
```bash
|
80 |
+
pnpm install
|
81 |
+
```
|
82 |
+
- Set up environment variables:
|
83 |
+
1. Rename `.env.example` to `.env.local`.
|
84 |
+
2. Add your API keys:
|
85 |
+
```bash
|
86 |
+
GROQ_API_KEY=XXX
|
87 |
+
HuggingFace_API_KEY=XXX
|
88 |
+
OPENAI_API_KEY=XXX
|
89 |
+
...
|
90 |
+
```
|
91 |
+
3. Optionally set:
|
92 |
+
- Debug level: `VITE_LOG_LEVEL=debug`
|
93 |
+
- Context size: `DEFAULT_NUM_CTX=32768`
|
94 |
+
|
95 |
+
**Note**: Never commit your `.env.local` file to version control. Itβs already in `.gitignore`.
|
96 |
+
|
97 |
+
### 2οΈβ£ Run Development Server
|
98 |
```bash
|
99 |
+
pnpm run dev
|
100 |
```
|
101 |
+
**Tip**: Use **Google Chrome Canary** for local testing.
|
102 |
|
103 |
+
---
|
104 |
+
|
105 |
+
## π§ͺ Testing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
+
Run the test suite with:
|
108 |
```bash
|
109 |
+
pnpm test
|
110 |
```
|
111 |
|
112 |
+
---
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
+
## π Deployment
|
115 |
|
116 |
+
### Deploy to Cloudflare Pages
|
117 |
```bash
|
118 |
+
pnpm run deploy
|
119 |
```
|
120 |
+
Ensure you have required permissions and that Wrangler is configured.
|
121 |
|
122 |
+
---
|
123 |
|
124 |
+
## π³ Docker Deployment
|
125 |
|
126 |
+
This section outlines the methods for deploying the application using Docker. The processes for **Development** and **Production** are provided separately for clarity.
|
127 |
|
128 |
+
---
|
|
|
|
|
129 |
|
130 |
+
### π§βπ» Development Environment
|
131 |
|
132 |
+
#### Build Options
|
133 |
|
134 |
+
**Option 1: Helper Scripts**
|
135 |
```bash
|
136 |
+
# Development build
|
137 |
+
npm run dockerbuild
|
138 |
```
|
139 |
|
140 |
+
**Option 2: Direct Docker Build Command**
|
141 |
+
```bash
|
142 |
+
docker build . --target bolt-ai-development
|
143 |
+
```
|
144 |
|
145 |
+
**Option 3: Docker Compose Profile**
|
146 |
+
```bash
|
147 |
+
docker-compose --profile development up
|
148 |
+
```
|
149 |
|
150 |
+
#### Running the Development Container
|
151 |
+
```bash
|
152 |
+
docker run -p 5173:5173 --env-file .env.local bolt-ai:development
|
153 |
+
```
|
154 |
|
155 |
+
---
|
156 |
|
157 |
+
### π Production Environment
|
158 |
|
159 |
+
#### Build Options
|
160 |
|
161 |
+
**Option 1: Helper Scripts**
|
162 |
```bash
|
|
|
|
|
|
|
163 |
# Production build
|
164 |
npm run dockerbuild:prod
|
165 |
```
|
166 |
|
167 |
+
**Option 2: Direct Docker Build Command**
|
|
|
|
|
|
|
168 |
```bash
|
|
|
|
|
|
|
|
|
169 |
docker build . --target bolt-ai-production
|
170 |
```
|
171 |
|
172 |
+
**Option 3: Docker Compose Profile**
|
|
|
|
|
|
|
173 |
```bash
|
|
|
|
|
|
|
|
|
174 |
docker-compose --profile production up
|
175 |
```
|
176 |
|
177 |
+
#### Running the Production Container
|
|
|
|
|
|
|
178 |
```bash
|
|
|
|
|
|
|
|
|
179 |
docker run -p 5173:5173 --env-file .env.local bolt-ai:production
|
180 |
```
|
181 |
|
182 |
+
---
|
183 |
|
184 |
+
### Coolify Deployment
|
185 |
|
186 |
+
For an easy deployment process, use [Coolify](https://github.com/coollabsio/coolify):
|
187 |
+
1. Import your Git repository into Coolify.
|
188 |
+
2. Choose **Docker Compose** as the build pack.
|
189 |
+
3. Configure environment variables (e.g., API keys).
|
190 |
+
4. Set the start command:
|
191 |
```bash
|
192 |
docker compose --profile production up
|
193 |
```
|
|
|
|
|
|
|
|
|
194 |
|
195 |
+
---
|
196 |
+
|
197 |
+
## π οΈ VS Code Dev Containers Integration
|
198 |
|
199 |
+
The `docker-compose.yaml` configuration is compatible with **VS Code Dev Containers**, making it easy to set up a development environment directly in Visual Studio Code.
|
200 |
|
201 |
+
### Steps to Use Dev Containers
|
|
|
|
|
202 |
|
203 |
+
1. Open the command palette in VS Code (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS).
|
204 |
+
2. Select **Dev Containers: Reopen in Container**.
|
205 |
+
3. Choose the **development** profile when prompted.
|
206 |
+
4. VS Code will rebuild the container and open it with the pre-configured environment.
|
207 |
|
208 |
+
---
|
|
|
|
|
|
|
209 |
|
210 |
+
## π Environment Variables
|
211 |
|
212 |
+
Ensure `.env.local` is configured correctly with:
|
213 |
+
- API keys.
|
214 |
+
- Context-specific configurations.
|
215 |
+
|
216 |
+
Example for the `DEFAULT_NUM_CTX` variable:
|
217 |
+
```bash
|
218 |
+
DEFAULT_NUM_CTX=24576 # Uses 32GB VRAM
|
219 |
+
```
|
FAQ.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
-
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
## Recommended Models for bolt.diy
|
6 |
|
7 |
For the best experience with bolt.diy, we recommend using the following models:
|
8 |
|
@@ -13,51 +12,80 @@ For the best experience with bolt.diy, we recommend using the following models:
|
|
13 |
- **Qwen 2.5 Coder 32b**: Best model for self-hosting with reasonable hardware requirements
|
14 |
|
15 |
**Note**: Models with less than 7b parameters typically lack the capability to properly interact with bolt!
|
|
|
16 |
|
17 |
-
|
|
|
18 |
|
19 |
-
|
|
|
20 |
|
21 |
-
- **
|
|
|
22 |
|
23 |
-
- **
|
|
|
24 |
|
25 |
-
- **
|
|
|
|
|
|
|
26 |
|
27 |
-
|
|
|
28 |
|
29 |
-
|
|
|
30 |
|
31 |
-
|
|
|
32 |
|
33 |
-
|
|
|
|
|
34 |
|
35 |
-
|
|
|
36 |
|
37 |
-
|
38 |
|
39 |
-
|
|
|
40 |
|
41 |
-
|
|
|
42 |
|
43 |
-
|
|
|
44 |
|
45 |
-
|
|
|
46 |
|
47 |
-
|
|
|
|
|
|
|
48 |
|
49 |
-
###
|
|
|
|
|
50 |
|
51 |
-
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
###
|
|
|
54 |
|
|
|
55 |
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)
|
56 |
|
57 |
-
###
|
58 |
-
|
59 |
-
|
60 |
|
61 |
-
|
62 |
|
63 |
-
|
|
|
1 |
+
# Frequently Asked Questions (FAQ)
|
2 |
|
3 |
+
<details>
|
4 |
+
<summary><strong>What are the best models for bolt.diy?</strong></summary>
|
|
|
5 |
|
6 |
For the best experience with bolt.diy, we recommend using the following models:
|
7 |
|
|
|
12 |
- **Qwen 2.5 Coder 32b**: Best model for self-hosting with reasonable hardware requirements
|
13 |
|
14 |
**Note**: Models with less than 7b parameters typically lack the capability to properly interact with bolt!
|
15 |
+
</details>
|
16 |
|
17 |
+
<details>
|
18 |
+
<summary><strong>How do I get the best results with bolt.diy?</strong></summary>
|
19 |
|
20 |
+
- **Be specific about your stack**:
|
21 |
+
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.
|
22 |
|
23 |
+
- **Use the enhance prompt icon**:
|
24 |
+
Before sending your prompt, click the *enhance* icon to let the AI refine your prompt. You can edit the suggested improvements before submitting.
|
25 |
|
26 |
+
- **Scaffold the basics first, then add features**:
|
27 |
+
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.
|
28 |
|
29 |
+
- **Batch simple instructions**:
|
30 |
+
Combine simple tasks into a single prompt to save time and reduce API credit consumption. For example:
|
31 |
+
*"Change the color scheme, add mobile responsiveness, and restart the dev server."*
|
32 |
+
</details>
|
33 |
|
34 |
+
<details>
|
35 |
+
<summary><strong>How do I contribute to bolt.diy?</strong></summary>
|
36 |
|
37 |
+
Check out our [Contribution Guide](CONTRIBUTING.md) for more details on how to get involved!
|
38 |
+
</details>
|
39 |
|
40 |
+
<details>
|
41 |
+
<summary><strong>What are the future plans for bolt.diy?</strong></summary>
|
42 |
|
43 |
+
Visit our [Roadmap](https://roadmap.sh/r/ottodev-roadmap-2ovzo) for the latest updates.
|
44 |
+
New features and improvements are on the way!
|
45 |
+
</details>
|
46 |
|
47 |
+
<details>
|
48 |
+
<summary><strong>Why are there so many open issues/pull requests?</strong></summary>
|
49 |
|
50 |
+
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!
|
51 |
|
52 |
+
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.
|
53 |
+
</details>
|
54 |
|
55 |
+
<details>
|
56 |
+
<summary><strong>How do local LLMs compare to larger models like Claude 3.5 Sonnet for bolt.diy?</strong></summary>
|
57 |
|
58 |
+
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.
|
59 |
+
</details>
|
60 |
|
61 |
+
<details>
|
62 |
+
<summary><strong>Common Errors and Troubleshooting</strong></summary>
|
63 |
|
64 |
+
### **"There was an error processing this request"**
|
65 |
+
This generic error message means something went wrong. Check both:
|
66 |
+
- The terminal (if you started the app with Docker or `pnpm`).
|
67 |
+
- The developer console in your browser (press `F12` or right-click > *Inspect*, then go to the *Console* tab).
|
68 |
|
69 |
+
### **"x-api-key header missing"**
|
70 |
+
This error is sometimes resolved by restarting the Docker container.
|
71 |
+
If that doesn't work, try switching from Docker to `pnpm` or vice versa. We're actively investigating this issue.
|
72 |
|
73 |
+
### **Blank preview when running the app**
|
74 |
+
A blank preview often occurs due to hallucinated bad code or incorrect commands.
|
75 |
+
To troubleshoot:
|
76 |
+
- Check the developer console for errors.
|
77 |
+
- Remember, previews are core functionality, so the app isn't broken! We're working on making these errors more transparent.
|
78 |
|
79 |
+
### **"Everything works, but the results are bad"**
|
80 |
+
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.
|
81 |
|
82 |
+
### **"Received structured exception #0xc0000005: access violation"**
|
83 |
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)
|
84 |
|
85 |
+
### **"Miniflare or Wrangler errors in Windows"**
|
86 |
+
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.
|
87 |
+
</details>
|
88 |
|
89 |
+
---
|
90 |
|
91 |
+
Got more questions? Feel free to reach out or open an issue in our GitHub repo!
|
README.md
CHANGED
@@ -93,6 +93,7 @@ Let's get you up and running with the stable version of Bolt.DIY!
|
|
93 |
|
94 |
[](https://github.com/stackblitz-labs/bolt.diy/releases/latest/download/bolt.diy.zip) β Click here to download the latest version!
|
95 |
|
|
|
96 |
## Prerequisites
|
97 |
|
98 |
Before you begin, you'll need to install two important pieces of software:
|
@@ -199,8 +200,6 @@ For providers that support custom base URLs (such as Ollama or LM Studio), follo
|
|
199 |
- LM Studio
|
200 |
- OpenAILike
|
201 |
|
202 |
-
|
203 |
-
|
204 |
## Setup Using Git (For Developers only)
|
205 |
|
206 |
This method is recommended for developers who want to:
|
@@ -229,7 +228,6 @@ This method is recommended for developers who want to:
|
|
229 |
```bash
|
230 |
git checkout main
|
231 |
```
|
232 |
-
|
233 |
4. **Install Dependencies**:
|
234 |
```bash
|
235 |
pnpm install
|
|
|
93 |
|
94 |
[](https://github.com/stackblitz-labs/bolt.diy/releases/latest/download/bolt.diy.zip) β Click here to download the latest version!
|
95 |
|
96 |
+
|
97 |
## Prerequisites
|
98 |
|
99 |
Before you begin, you'll need to install two important pieces of software:
|
|
|
200 |
- LM Studio
|
201 |
- OpenAILike
|
202 |
|
|
|
|
|
203 |
## Setup Using Git (For Developers only)
|
204 |
|
205 |
This method is recommended for developers who want to:
|
|
|
228 |
```bash
|
229 |
git checkout main
|
230 |
```
|
|
|
231 |
4. **Install Dependencies**:
|
232 |
```bash
|
233 |
pnpm install
|
docs/docs/CONTRIBUTING.md
CHANGED
@@ -1,246 +1,219 @@
|
|
1 |
# Contribution Guidelines
|
2 |
|
3 |
-
|
4 |
-
- [Code of Conduct](#code-of-conduct)
|
5 |
-
- [How Can I Contribute?](#how-can-i-contribute)
|
6 |
-
- [Pull Request Guidelines](#pull-request-guidelines)
|
7 |
-
- [Coding Standards](#coding-standards)
|
8 |
-
- [Development Setup](#development-setup)
|
9 |
-
- [Deploymnt with Docker](#docker-deployment-documentation)
|
10 |
|
11 |
---
|
12 |
|
13 |
-
##
|
14 |
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
---
|
18 |
|
19 |
-
##
|
20 |
-
|
21 |
-
### π Reporting Bugs and Feature Requests
|
22 |
-
- Check the issue tracker to avoid duplicates
|
23 |
-
- Use the issue templates when available
|
24 |
-
- Include as much relevant information as possible
|
25 |
-
- For bugs, add steps to reproduce the issue
|
26 |
-
|
27 |
-
### π§ Code Contributions
|
28 |
-
1. Fork the repository
|
29 |
-
2. Create a new branch for your feature/fix
|
30 |
-
3. Write your code
|
31 |
-
4. Submit a pull request
|
32 |
|
33 |
-
|
34 |
-
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).
|
35 |
|
36 |
---
|
37 |
|
38 |
-
##
|
39 |
|
40 |
-
###
|
41 |
-
- [ ]
|
42 |
-
-
|
43 |
-
-
|
44 |
-
- [ ] Keep PRs focused and atomic
|
45 |
|
46 |
-
###
|
47 |
-
1.
|
48 |
-
2.
|
49 |
-
3.
|
50 |
-
4.
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
## Coding Standards
|
55 |
-
|
56 |
-
### π» General Guidelines
|
57 |
-
- Follow existing code style
|
58 |
-
- Comment complex logic
|
59 |
-
- Keep functions focused and small
|
60 |
-
- Use meaningful variable names
|
61 |
|
62 |
---
|
63 |
|
64 |
-
##
|
65 |
|
66 |
-
###
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
76 |
|
77 |
-
|
78 |
-
- Rename `.env.example` to `.env.local`
|
79 |
-
- Add your LLM API keys (only set the ones you plan to use):
|
80 |
-
```bash
|
81 |
-
GROQ_API_KEY=XXX
|
82 |
-
HuggingFace_API_KEY=XXX
|
83 |
-
OPENAI_API_KEY=XXX
|
84 |
-
ANTHROPIC_API_KEY=XXX
|
85 |
-
...
|
86 |
-
```
|
87 |
-
- Optionally set debug level:
|
88 |
-
```bash
|
89 |
-
VITE_LOG_LEVEL=debug
|
90 |
-
```
|
91 |
|
92 |
-
|
93 |
-
```bash
|
94 |
-
DEFAULT_NUM_CTX=32768
|
95 |
-
```
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
* DEFAULT_NUM_CTX=6144 - Consumes 24GB of VRAM
|
103 |
|
104 |
-
|
105 |
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
```bash
|
108 |
pnpm run dev
|
109 |
```
|
110 |
-
|
111 |
-
**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.
|
112 |
|
113 |
---
|
114 |
|
115 |
-
## Testing
|
116 |
-
|
117 |
-
Run the test suite with:
|
118 |
|
|
|
119 |
```bash
|
120 |
pnpm test
|
121 |
```
|
122 |
|
123 |
---
|
124 |
|
125 |
-
## Deployment
|
126 |
-
|
127 |
-
To deploy the application to Cloudflare Pages:
|
128 |
|
|
|
129 |
```bash
|
130 |
pnpm run deploy
|
131 |
```
|
132 |
-
|
133 |
-
Make sure you have the necessary permissions and Wrangler is correctly configured for your Cloudflare account.
|
134 |
|
135 |
---
|
136 |
|
137 |
-
|
138 |
|
139 |
-
This
|
140 |
|
141 |
-
|
142 |
|
143 |
-
###
|
144 |
|
145 |
-
|
146 |
|
|
|
147 |
```bash
|
148 |
# Development build
|
149 |
npm run dockerbuild
|
150 |
-
|
151 |
-
# Production build
|
152 |
-
npm run dockerbuild:prod
|
153 |
```
|
154 |
|
155 |
-
|
156 |
-
|
157 |
-
You can use Docker's target feature to specify the build environment:
|
158 |
-
|
159 |
```bash
|
160 |
-
# Development build
|
161 |
docker build . --target bolt-ai-development
|
162 |
-
|
163 |
-
# Production build
|
164 |
-
docker build . --target bolt-ai-production
|
165 |
```
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
Use Docker Compose profiles to manage different environments:
|
170 |
-
|
171 |
```bash
|
172 |
-
# Development environment
|
173 |
docker-compose --profile development up
|
|
|
174 |
|
175 |
-
|
176 |
-
|
|
|
177 |
```
|
178 |
|
179 |
---
|
180 |
|
181 |
-
|
182 |
|
183 |
-
|
184 |
|
|
|
185 |
```bash
|
186 |
-
#
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
-
|
|
|
190 |
docker run -p 5173:5173 --env-file .env.local bolt-ai:production
|
191 |
```
|
192 |
|
193 |
---
|
194 |
|
195 |
-
|
196 |
|
197 |
-
[Coolify](https://github.com/coollabsio/coolify)
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
4. Configure deployment domains
|
203 |
-
5. Set the custom start command:
|
204 |
```bash
|
205 |
docker compose --profile production up
|
206 |
```
|
207 |
-
6. Configure environment variables
|
208 |
-
- Add necessary AI API keys
|
209 |
-
- Adjust other environment variables as needed
|
210 |
-
7. Deploy the application
|
211 |
|
212 |
---
|
213 |
|
214 |
-
## VS Code Integration
|
215 |
|
216 |
-
The `docker-compose.yaml` configuration is compatible with VS Code
|
217 |
|
218 |
-
|
219 |
-
2. Select the dev container configuration
|
220 |
-
3. Choose the "development" profile from the context menu
|
221 |
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
Ensure you have the appropriate `.env.local` file configured before running the containers. This file should contain:
|
227 |
-
- API keys
|
228 |
-
- Environment-specific configurations
|
229 |
-
- Other required environment variables
|
230 |
|
231 |
---
|
232 |
|
233 |
-
##
|
234 |
|
235 |
-
|
|
|
|
|
236 |
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
## Notes
|
242 |
-
|
243 |
-
- Port 5173 is exposed and mapped for both development and production environments
|
244 |
-
- Environment variables are loaded from `.env.local`
|
245 |
-
- Different profiles (development/production) can be used for different deployment scenarios
|
246 |
-
- The configuration supports both local development and production deployment
|
|
|
1 |
# Contribution Guidelines
|
2 |
|
3 |
+
Welcome! This guide provides all the details you need to contribute effectively to the project. Thank you for helping us make **bolt.diy** a better tool for developers worldwide. π‘
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
---
|
6 |
|
7 |
+
## π Table of Contents
|
8 |
|
9 |
+
1. [Code of Conduct](#code-of-conduct)
|
10 |
+
2. [How Can I Contribute?](#how-can-i-contribute)
|
11 |
+
3. [Pull Request Guidelines](#pull-request-guidelines)
|
12 |
+
4. [Coding Standards](#coding-standards)
|
13 |
+
5. [Development Setup](#development-setup)
|
14 |
+
6. [Testing](#testing)
|
15 |
+
7. [Deployment](#deployment)
|
16 |
+
8. [Docker Deployment](#docker-deployment)
|
17 |
+
9. [VS Code Dev Containers Integration](#vs-code-dev-containers-integration)
|
18 |
|
19 |
---
|
20 |
|
21 |
+
## π‘οΈ Code of Conduct
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
This project is governed by our **Code of Conduct**. By participating, you agree to uphold this code. Report unacceptable behavior to the project maintainers.
|
|
|
24 |
|
25 |
---
|
26 |
|
27 |
+
## π οΈ How Can I Contribute?
|
28 |
|
29 |
+
### 1οΈβ£ Reporting Bugs or Feature Requests
|
30 |
+
- Check the [issue tracker](#) to avoid duplicates.
|
31 |
+
- Use issue templates (if available).
|
32 |
+
- Provide detailed, relevant information and steps to reproduce bugs.
|
|
|
33 |
|
34 |
+
### 2οΈβ£ Code Contributions
|
35 |
+
1. Fork the repository.
|
36 |
+
2. Create a feature or fix branch.
|
37 |
+
3. Write and test your code.
|
38 |
+
4. Submit a pull request (PR).
|
39 |
|
40 |
+
### 3οΈβ£ Join as a Core Contributor
|
41 |
+
Interested in maintaining and growing the project? Fill out our [Contributor Application Form](https://forms.gle/TBSteXSDCtBDwr5m7).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
---
|
44 |
|
45 |
+
## β
Pull Request Guidelines
|
46 |
|
47 |
+
### PR Checklist
|
48 |
+
- Branch from the **main** branch.
|
49 |
+
- Update documentation, if needed.
|
50 |
+
- Test all functionality manually.
|
51 |
+
- Focus on one feature/bug per PR.
|
52 |
|
53 |
+
### Review Process
|
54 |
+
1. Manual testing by reviewers.
|
55 |
+
2. At least one maintainer review required.
|
56 |
+
3. Address review comments.
|
57 |
+
4. Maintain a clean commit history.
|
58 |
|
59 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
+
## π Coding Standards
|
|
|
|
|
|
|
62 |
|
63 |
+
### General Guidelines
|
64 |
+
- Follow existing code style.
|
65 |
+
- Comment complex logic.
|
66 |
+
- Keep functions small and focused.
|
67 |
+
- Use meaningful variable names.
|
|
|
68 |
|
69 |
+
---
|
70 |
|
71 |
+
## π₯οΈ Development Setup
|
72 |
+
|
73 |
+
### 1οΈβ£ Initial Setup
|
74 |
+
- Clone the repository:
|
75 |
+
```bash
|
76 |
+
git clone https://github.com/stackblitz-labs/bolt.diy.git
|
77 |
+
```
|
78 |
+
- Install dependencies:
|
79 |
+
```bash
|
80 |
+
pnpm install
|
81 |
+
```
|
82 |
+
- Set up environment variables:
|
83 |
+
1. Rename `.env.example` to `.env.local`.
|
84 |
+
2. Add your API keys:
|
85 |
+
```bash
|
86 |
+
GROQ_API_KEY=XXX
|
87 |
+
HuggingFace_API_KEY=XXX
|
88 |
+
OPENAI_API_KEY=XXX
|
89 |
+
...
|
90 |
+
```
|
91 |
+
3. Optionally set:
|
92 |
+
- Debug level: `VITE_LOG_LEVEL=debug`
|
93 |
+
- Context size: `DEFAULT_NUM_CTX=32768`
|
94 |
+
|
95 |
+
**Note**: Never commit your `.env.local` file to version control. Itβs already in `.gitignore`.
|
96 |
+
|
97 |
+
### 2οΈβ£ Run Development Server
|
98 |
```bash
|
99 |
pnpm run dev
|
100 |
```
|
101 |
+
**Tip**: Use **Google Chrome Canary** for local testing.
|
|
|
102 |
|
103 |
---
|
104 |
|
105 |
+
## π§ͺ Testing
|
|
|
|
|
106 |
|
107 |
+
Run the test suite with:
|
108 |
```bash
|
109 |
pnpm test
|
110 |
```
|
111 |
|
112 |
---
|
113 |
|
114 |
+
## π Deployment
|
|
|
|
|
115 |
|
116 |
+
### Deploy to Cloudflare Pages
|
117 |
```bash
|
118 |
pnpm run deploy
|
119 |
```
|
120 |
+
Ensure you have required permissions and that Wrangler is configured.
|
|
|
121 |
|
122 |
---
|
123 |
|
124 |
+
## π³ Docker Deployment
|
125 |
|
126 |
+
This section outlines the methods for deploying the application using Docker. The processes for **Development** and **Production** are provided separately for clarity.
|
127 |
|
128 |
+
---
|
129 |
|
130 |
+
### π§βπ» Development Environment
|
131 |
|
132 |
+
#### Build Options
|
133 |
|
134 |
+
**Option 1: Helper Scripts**
|
135 |
```bash
|
136 |
# Development build
|
137 |
npm run dockerbuild
|
|
|
|
|
|
|
138 |
```
|
139 |
|
140 |
+
**Option 2: Direct Docker Build Command**
|
|
|
|
|
|
|
141 |
```bash
|
|
|
142 |
docker build . --target bolt-ai-development
|
|
|
|
|
|
|
143 |
```
|
144 |
|
145 |
+
**Option 3: Docker Compose Profile**
|
|
|
|
|
|
|
146 |
```bash
|
|
|
147 |
docker-compose --profile development up
|
148 |
+
```
|
149 |
|
150 |
+
#### Running the Development Container
|
151 |
+
```bash
|
152 |
+
docker run -p 5173:5173 --env-file .env.local bolt-ai:development
|
153 |
```
|
154 |
|
155 |
---
|
156 |
|
157 |
+
### π Production Environment
|
158 |
|
159 |
+
#### Build Options
|
160 |
|
161 |
+
**Option 1: Helper Scripts**
|
162 |
```bash
|
163 |
+
# Production build
|
164 |
+
npm run dockerbuild:prod
|
165 |
+
```
|
166 |
+
|
167 |
+
**Option 2: Direct Docker Build Command**
|
168 |
+
```bash
|
169 |
+
docker build . --target bolt-ai-production
|
170 |
+
```
|
171 |
+
|
172 |
+
**Option 3: Docker Compose Profile**
|
173 |
+
```bash
|
174 |
+
docker-compose --profile production up
|
175 |
+
```
|
176 |
|
177 |
+
#### Running the Production Container
|
178 |
+
```bash
|
179 |
docker run -p 5173:5173 --env-file .env.local bolt-ai:production
|
180 |
```
|
181 |
|
182 |
---
|
183 |
|
184 |
+
### Coolify Deployment
|
185 |
|
186 |
+
For an easy deployment process, use [Coolify](https://github.com/coollabsio/coolify):
|
187 |
+
1. Import your Git repository into Coolify.
|
188 |
+
2. Choose **Docker Compose** as the build pack.
|
189 |
+
3. Configure environment variables (e.g., API keys).
|
190 |
+
4. Set the start command:
|
|
|
|
|
191 |
```bash
|
192 |
docker compose --profile production up
|
193 |
```
|
|
|
|
|
|
|
|
|
194 |
|
195 |
---
|
196 |
|
197 |
+
## π οΈ VS Code Dev Containers Integration
|
198 |
|
199 |
+
The `docker-compose.yaml` configuration is compatible with **VS Code Dev Containers**, making it easy to set up a development environment directly in Visual Studio Code.
|
200 |
|
201 |
+
### Steps to Use Dev Containers
|
|
|
|
|
202 |
|
203 |
+
1. Open the command palette in VS Code (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS).
|
204 |
+
2. Select **Dev Containers: Reopen in Container**.
|
205 |
+
3. Choose the **development** profile when prompted.
|
206 |
+
4. VS Code will rebuild the container and open it with the pre-configured environment.
|
|
|
|
|
|
|
|
|
207 |
|
208 |
---
|
209 |
|
210 |
+
## π Environment Variables
|
211 |
|
212 |
+
Ensure `.env.local` is configured correctly with:
|
213 |
+
- API keys.
|
214 |
+
- Context-specific configurations.
|
215 |
|
216 |
+
Example for the `DEFAULT_NUM_CTX` variable:
|
217 |
+
```bash
|
218 |
+
DEFAULT_NUM_CTX=24576 # Uses 32GB VRAM
|
219 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
docs/docs/index.md
CHANGED
@@ -3,14 +3,17 @@ bolt.diy allows you to choose the LLM that you use for each prompt! Currently, y
|
|
3 |
|
4 |
## Table of Contents
|
5 |
- [Join the community!](#join-the-community)
|
6 |
-
- [
|
7 |
-
- [What Makes bolt.diy Different](#what-makes-boltdiy-different)
|
8 |
- [Setup](#setup)
|
9 |
-
- [
|
10 |
-
- [
|
11 |
-
- [
|
12 |
-
|
13 |
-
- [
|
|
|
|
|
|
|
|
|
14 |
- [Adding New LLMs](#adding-new-llms)
|
15 |
- [Available Scripts](#available-scripts)
|
16 |
- [Development](#development)
|
@@ -24,72 +27,65 @@ bolt.diy allows you to choose the LLM that you use for each prompt! Currently, y
|
|
24 |
|
25 |
---
|
26 |
|
27 |
-
##
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
---
|
32 |
|
33 |
-
##
|
34 |
|
35 |
-
|
36 |
|
37 |
-
|
38 |
-
- Install and run npm tools and libraries (like Vite, Next.js, and more)
|
39 |
-
- Run Node.js servers
|
40 |
-
- Interact with third-party APIs
|
41 |
-
- Deploy to production from chat
|
42 |
-
- Share your work via a URL
|
43 |
|
44 |
-
|
|
|
45 |
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
## Setup
|
53 |
-
|
54 |
-
Many of you are new users to installing software from Github. If you have any installation troubles reach out and submit an "issue" using the links above, or feel free to enhance this documentation by forking, editing the instructions, and doing a pull request.
|
55 |
-
|
56 |
-
1. [Install Git from](https://git-scm.com/downloads)
|
57 |
-
|
58 |
-
2. [Install Node.js from](https://nodejs.org/en/download/)
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
```
|
65 |
-
echo $PATHΒ .
|
66 |
```
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
-
git clone https://github.com/stackblitz-labs/bolt.diy.git
|
74 |
-
```
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
79 |
|
80 |
-
|
|
|
81 |
|
82 |
-
|
|
|
|
|
83 |
defaults write com.apple.finder AppleShowAllFiles YES
|
84 |
```
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
[Get your GROQ API Key here](https://console.groq.com/keys)
|
89 |
-
|
90 |
-
[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)
|
91 |
-
|
92 |
-
Get your Anthropic API Key in your [account settings](https://console.anthropic.com/settings/keys)
|
93 |
|
94 |
```
|
95 |
GROQ_API_KEY=XXX
|
@@ -97,81 +93,108 @@ OPENAI_API_KEY=XXX
|
|
97 |
ANTHROPIC_API_KEY=XXX
|
98 |
```
|
99 |
|
100 |
-
|
101 |
|
102 |
-
|
103 |
-
VITE_LOG_LEVEL=debug
|
104 |
-
```
|
105 |
|
106 |
-
|
107 |
|
108 |
-
|
109 |
|
110 |
-
|
|
|
|
|
|
|
111 |
|
112 |
-
|
113 |
|
114 |
-
|
115 |
|
116 |
-
NPM scripts are provided for convenient building:
|
117 |
|
118 |
-
|
119 |
-
# Development build
|
120 |
-
npm run dockerbuild
|
121 |
|
122 |
-
|
123 |
-
npm run dockerbuild:prod
|
124 |
-
```
|
125 |
|
126 |
-
###
|
127 |
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
133 |
|
134 |
-
|
135 |
-
docker build . --target bolt-ai-production
|
136 |
-
```
|
137 |
|
138 |
-
|
|
|
139 |
|
140 |
-
|
141 |
|
142 |
-
|
143 |
-
# Development environment
|
144 |
-
docker-compose --profile development up
|
145 |
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
-
|
151 |
-
make on your machine to the code will automatically be reflected in the site running
|
152 |
-
on the container (i.e. hot reloading still applies!).
|
153 |
|
154 |
---
|
155 |
|
156 |
-
|
157 |
|
158 |
-
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
```
|
163 |
|
164 |
-
|
|
|
165 |
|
166 |
-
```
|
167 |
-
|
168 |
-
```
|
169 |
|
170 |
-
|
|
|
171 |
|
172 |
-
```bash
|
173 |
-
pnpm
|
174 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
---
|
177 |
|
|
|
3 |
|
4 |
## Table of Contents
|
5 |
- [Join the community!](#join-the-community)
|
6 |
+
- [Features](#features)
|
|
|
7 |
- [Setup](#setup)
|
8 |
+
- [Prerequisites](#prerequisites)
|
9 |
+
- [Clone the Repository](#clone-the-repository)
|
10 |
+
- [Entering API Keys](#entering-api-keys)
|
11 |
+
- [1. Set API Keys in the `.env.local` File](#1-set-api-keys-in-the-envlocal-file)
|
12 |
+
- [2. Configure API Keys Directly in the Application](#2-configure-api-keys-directly-in-the-application)
|
13 |
+
- [Run the Application](#run-the-application)
|
14 |
+
- [Option 1: Without Docker](#option-1-without-docker)
|
15 |
+
- [Option 2: With Docker](#option-2-with-docker)
|
16 |
+
- [Update Your Local Version to the Latest](#update-your-local-version-to-the-latest)
|
17 |
- [Adding New LLMs](#adding-new-llms)
|
18 |
- [Available Scripts](#available-scripts)
|
19 |
- [Development](#development)
|
|
|
27 |
|
28 |
---
|
29 |
|
30 |
+
## Features
|
31 |
|
32 |
+
- **AI-powered full-stack web development** directly in your browser.
|
33 |
+
- **Support for multiple LLMs** with an extensible architecture to integrate additional models.
|
34 |
+
- **Attach images to prompts** for better contextual understanding.
|
35 |
+
- **Integrated terminal** to view output of LLM-run commands.
|
36 |
+
- **Revert code to earlier versions** for easier debugging and quicker changes.
|
37 |
+
- **Download projects as ZIP** for easy portability.
|
38 |
+
- **Integration-ready Docker support** for a hassle-free setup.
|
39 |
|
40 |
---
|
41 |
|
42 |
+
## Setup
|
43 |
|
44 |
+
If you're new to installing software from GitHub, don't worry! If you encounter any issues, feel free to submit an "issue" using the provided links or improve this documentation by forking the repository, editing the instructions, and submitting a pull request. The following instruction will help you get the stable branch up and running on your local machine in no time.
|
45 |
|
46 |
+
### Prerequisites
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
+
1. **Install Git**: [Download Git](https://git-scm.com/downloads)
|
49 |
+
2. **Install Node.js**: [Download Node.js](https://nodejs.org/en/download/)
|
50 |
|
51 |
+
- After installation, the Node.js path is usually added to your system automatically. To verify:
|
52 |
+
- **Windows**: Search for "Edit the system environment variables," click "Environment Variables," and check if `Node.js` is in the `Path` variable.
|
53 |
+
- **Mac/Linux**: Open a terminal and run:
|
54 |
+
```bash
|
55 |
+
echo $PATH
|
56 |
+
```
|
57 |
+
Look for `/usr/local/bin` in the output.
|
58 |
|
59 |
+
### Clone the Repository
|
60 |
|
61 |
+
Alternatively, you can download the latest version of the project directly from the [Releases Page](https://github.com/stackblitz-labs/bolt.diy/releases/latest). Simply download the .zip file, extract it, and proceed with the setup instructions below. If you are comfertiable using git then run the command below.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
+
Clone the repository using Git:
|
64 |
|
65 |
+
```bash
|
66 |
+
git clone -b stable https://github.com/stackblitz-labs/bolt.diy
|
|
|
|
|
67 |
```
|
68 |
|
69 |
+
---
|
70 |
|
71 |
+
### Entering API Keys
|
72 |
|
73 |
+
There are two ways to configure your API keys in bolt.diy:
|
|
|
|
|
74 |
|
75 |
+
#### 1. Set API Keys in the `.env.local` File
|
76 |
|
77 |
+
When setting up the application, you will need to add your API keys for the LLMs you wish to use. You can do this by renaming the `.env.example` file to `.env.local` and adding your API keys there.
|
78 |
|
79 |
+
- On **Mac**, you can find the file at `[your name]/bolt.diy/.env.example`.
|
80 |
+
- On **Windows/Linux**, the path will be similar.
|
81 |
|
82 |
+
If you can't see the file, it's likely because hidden files are not being shown. On **Mac**, open a Terminal window and enter the following command to show hidden files:
|
83 |
+
|
84 |
+
```bash
|
85 |
defaults write com.apple.finder AppleShowAllFiles YES
|
86 |
```
|
87 |
|
88 |
+
Make sure to add your API keys for each provider you want to use, for example:
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
```
|
91 |
GROQ_API_KEY=XXX
|
|
|
93 |
ANTHROPIC_API_KEY=XXX
|
94 |
```
|
95 |
|
96 |
+
Once you've set your keys, you can proceed with running the app. You will set these keys up during the initial setup, and you can revisit and update them later after the app is running.
|
97 |
|
98 |
+
**Note**: Never commit your `.env.local` file to version control. Itβs already included in the `.gitignore`.
|
|
|
|
|
99 |
|
100 |
+
#### 2. Configure API Keys Directly in the Application
|
101 |
|
102 |
+
Alternatively, you can configure your API keys directly in the application once it's running. To do this:
|
103 |
|
104 |
+
1. Launch the application and navigate to the provider selection dropdown.
|
105 |
+
2. Select the provider you wish to configure.
|
106 |
+
3. Click the pencil icon next to the selected provider.
|
107 |
+
4. Enter your API key in the provided field.
|
108 |
|
109 |
+
This method allows you to easily add or update your keys without needing to modify files directly.
|
110 |
|
111 |
+
Once you've configured your keys, the application will be ready to use the selected LLMs.
|
112 |
|
|
|
113 |
|
114 |
+
---
|
|
|
|
|
115 |
|
116 |
+
## Run the Application
|
|
|
|
|
117 |
|
118 |
+
### Option 1: Without Docker
|
119 |
|
120 |
+
1. **Install Dependencies**:
|
121 |
+
```bash
|
122 |
+
pnpm install
|
123 |
+
```
|
124 |
+
If `pnpm` is not installed, install it using:
|
125 |
+
```bash
|
126 |
+
sudo npm install -g pnpm
|
127 |
+
```
|
128 |
|
129 |
+
2. **Start the Application**:
|
130 |
+
```bash
|
131 |
+
pnpm run dev
|
132 |
+
```
|
133 |
+
This will start the Remix Vite development server. 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.
|
134 |
|
135 |
+
### Option 2: With Docker
|
|
|
|
|
136 |
|
137 |
+
#### Prerequisites
|
138 |
+
- Ensure Git, Node.js, and Docker are installed: [Download Docker](https://www.docker.com/)
|
139 |
|
140 |
+
#### Steps
|
141 |
|
142 |
+
1. **Build the Docker Image**:
|
|
|
|
|
143 |
|
144 |
+
Use the provided NPM scripts:
|
145 |
+
```bash
|
146 |
+
npm run dockerbuild
|
147 |
+
```
|
148 |
+
|
149 |
+
Alternatively, use Docker commands directly:
|
150 |
+
```bash
|
151 |
+
docker build . --target bolt-ai-development
|
152 |
+
```
|
153 |
+
|
154 |
+
2. **Run the Container**:
|
155 |
+
Use Docker Compose profiles to manage environments:
|
156 |
+
```bash
|
157 |
+
docker-compose --profile development up
|
158 |
+
```
|
159 |
|
160 |
+
- With the development profile, changes to your code will automatically reflect in the running container (hot reloading).
|
|
|
|
|
161 |
|
162 |
---
|
163 |
|
164 |
+
### Update Your Local Version to the Latest
|
165 |
|
166 |
+
To keep your local version of bolt.diy up to date with the latest changes, follow these steps for your operating system:
|
167 |
|
168 |
+
#### 1. **Navigate to your project folder**
|
169 |
+
Navigate to the directory where you cloned the repository and open a terminal:
|
|
|
170 |
|
171 |
+
#### 2. **Fetch the Latest Changes**
|
172 |
+
Use Git to pull the latest changes from the main repository:
|
173 |
|
174 |
+
```bash
|
175 |
+
git pull origin main
|
176 |
+
```
|
177 |
|
178 |
+
#### 3. **Update Dependencies**
|
179 |
+
After pulling the latest changes, update the project dependencies by running the following command:
|
180 |
|
181 |
+
```bash
|
182 |
+
pnpm install
|
183 |
+
```
|
184 |
+
|
185 |
+
#### 4. **Rebuild and Start the Application**
|
186 |
+
|
187 |
+
- **If using Docker**, ensure you rebuild the Docker image to avoid using a cached version:
|
188 |
+
```bash
|
189 |
+
docker-compose --profile development up --build
|
190 |
+
```
|
191 |
+
|
192 |
+
- **If not using Docker**, you can start the application as usual with:
|
193 |
+
```bash
|
194 |
+
pnpm run dev
|
195 |
+
```
|
196 |
+
|
197 |
+
This ensures that you're running the latest version of bolt.diy and can take advantage of all the newest features and bug fixes.
|
198 |
|
199 |
---
|
200 |
|