Skip to content

Commit 7afd654

Browse files
authored
Merge pull request #845 from dustinwloring1988/docs/updated-docs
docs: updated Docs
2 parents d8a277f + 6145c60 commit 7afd654

File tree

5 files changed

+465
-441
lines changed

5 files changed

+465
-441
lines changed

CONTRIBUTING.md

Lines changed: 159 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -1,217 +1,219 @@
1-
# Contributing to bolt.diy
1+
# Contribution Guidelines
22

3-
First off, thank you for considering contributing to bolt.diy! This fork aims to expand the capabilities of the original project by integrating multiple LLM providers and enhancing functionality. Every contribution helps make bolt.diy a better tool for developers worldwide.
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+
---
46

57
## 📋 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-
```
668

67-
2. Install dependencies:
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
6898
```bash
69-
pnpm install
99+
pnpm run dev
70100
```
101+
**Tip**: Use **Google Chrome Canary** for local testing.
71102

72-
3. Set up environment variables:
73-
- Rename `.env.example` to `.env.local`
74-
- Add your LLM API keys (only set the ones you plan to use):
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-
```
103+
---
104+
105+
## 🧪 Testing
86106

87-
- Optionally set context size:
107+
Run the test suite with:
88108
```bash
89-
DEFAULT_NUM_CTX=32768
109+
pnpm test
90110
```
91111

92-
Some Example Context Values for the qwen2.5-coder:32b models are.
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
112+
---
98113

99-
**Important**: Never commit your `.env.local` file to version control. It's already included in .gitignore.
114+
## 🚀 Deployment
100115

101-
### 🚀 Running the Development Server
116+
### Deploy to Cloudflare Pages
102117
```bash
103-
pnpm run dev
118+
pnpm run deploy
104119
```
120+
Ensure you have required permissions and that Wrangler is configured.
105121

106-
**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.
122+
---
107123

108-
## Testing
124+
## 🐳 Docker Deployment
109125

110-
Run the test suite with:
126+
This section outlines the methods for deploying the application using Docker. The processes for **Development** and **Production** are provided separately for clarity.
111127

112-
```bash
113-
pnpm test
114-
```
128+
---
115129

116-
## Deployment
130+
### 🧑‍💻 Development Environment
117131

118-
To deploy the application to Cloudflare Pages:
132+
#### Build Options
119133

134+
**Option 1: Helper Scripts**
120135
```bash
121-
pnpm run deploy
136+
# Development build
137+
npm run dockerbuild
122138
```
123139

124-
Make sure you have the necessary permissions and Wrangler is correctly configured for your Cloudflare account.
140+
**Option 2: Direct Docker Build Command**
141+
```bash
142+
docker build . --target bolt-ai-development
143+
```
125144

126-
# Docker Deployment Documentation
145+
**Option 3: Docker Compose Profile**
146+
```bash
147+
docker-compose --profile development up
148+
```
127149

128-
This guide outlines various methods for building and deploying the application using Docker.
150+
#### Running the Development Container
151+
```bash
152+
docker run -p 5173:5173 --env-file .env.local bolt-ai:development
153+
```
129154

130-
## Build Methods
155+
---
131156

132-
### 1. Using Helper Scripts
157+
### 🏭 Production Environment
133158

134-
NPM scripts are provided for convenient building:
159+
#### Build Options
135160

161+
**Option 1: Helper Scripts**
136162
```bash
137-
# Development build
138-
npm run dockerbuild
139-
140163
# Production build
141164
npm run dockerbuild:prod
142165
```
143166

144-
### 2. Direct Docker Build Commands
145-
146-
You can use Docker's target feature to specify the build environment:
147-
167+
**Option 2: Direct Docker Build Command**
148168
```bash
149-
# Development build
150-
docker build . --target bolt-ai-development
151-
152-
# Production build
153169
docker build . --target bolt-ai-production
154170
```
155171

156-
### 3. Docker Compose with Profiles
157-
158-
Use Docker Compose profiles to manage different environments:
159-
172+
**Option 3: Docker Compose Profile**
160173
```bash
161-
# Development environment
162-
docker-compose --profile development up
163-
164-
# Production environment
165174
docker-compose --profile production up
166175
```
167176

168-
## Running the Application
169-
170-
After building using any of the methods above, run the container with:
171-
177+
#### Running the Production Container
172178
```bash
173-
# Development
174-
docker run -p 5173:5173 --env-file .env.local bolt-ai:development
175-
176-
# Production
177179
docker run -p 5173:5173 --env-file .env.local bolt-ai:production
178180
```
179181

180-
## Deployment with Coolify
182+
---
181183

182-
[Coolify](https://github.com/coollabsio/coolify) provides a straightforward deployment process:
184+
### Coolify Deployment
183185

184-
1. Import your Git repository as a new project
185-
2. Select your target environment (development/production)
186-
3. Choose "Docker Compose" as the Build Pack
187-
4. Configure deployment domains
188-
5. Set the custom start command:
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:
189191
```bash
190192
docker compose --profile production up
191193
```
192-
6. Configure environment variables
193-
- Add necessary AI API keys
194-
- Adjust other environment variables as needed
195-
7. Deploy the application
196194

197-
## VS Code Integration
195+
---
196+
197+
## 🛠️ VS Code Dev Containers Integration
198198

199-
The `docker-compose.yaml` configuration is compatible with VS Code dev containers:
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.
200200

201-
1. Open the command palette in VS Code
202-
2. Select the dev container configuration
203-
3. Choose the "development" profile from the context menu
201+
### Steps to Use Dev Containers
204202

205-
## Environment Files
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.
206207

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

212-
## Notes
210+
## 🔑 Environment Variables
213211

214-
- Port 5173 is exposed and mapped for both development and production environments
215-
- Environment variables are loaded from `.env.local`
216-
- Different profiles (development/production) can be used for different deployment scenarios
217-
- The configuration supports both local development and production deployment
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+
```

0 commit comments

Comments
 (0)