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. 💡
- Code of Conduct
- How Can I Contribute?
- Pull Request Guidelines
- Coding Standards
- Development Setup
- Testing
- Deployment
- Docker Deployment
- VS Code Dev Containers Integration
This project is governed by our Code of Conduct. By participating, you agree to uphold this code. Report unacceptable behavior to the project maintainers.
- Check the issue tracker to avoid duplicates.
- Use issue templates (if available).
- Provide detailed, relevant information and steps to reproduce bugs.
- Fork the repository.
- Create a feature or fix branch.
- Write and test your code.
- Submit a pull request (PR).
Interested in maintaining and growing the project? Fill out our Contributor Application Form.
- Branch from the main branch.
- Update documentation, if needed.
- Test all functionality manually.
- Focus on one feature/bug per PR.
- Manual testing by reviewers.
- At least one maintainer review required.
- Address review comments.
- Maintain a clean commit history.
- Follow existing code style.
- Comment complex logic.
- Keep functions small and focused.
- Use meaningful variable names.
- Clone the repository:
git clone https://github.com/stackblitz-labs/bolt.diy.git
- Install dependencies:
pnpm install
- Set up environment variables:
- Rename
.env.example
to.env.local
. - Add your API keys:
GROQ_API_KEY=XXX HuggingFace_API_KEY=XXX OPENAI_API_KEY=XXX ...
- Optionally set:
- Debug level:
VITE_LOG_LEVEL=debug
- Context size:
DEFAULT_NUM_CTX=32768
- Debug level:
- Rename
Note: Never commit your .env.local
file to version control. It’s already in .gitignore
.
pnpm run dev
Tip: Use Google Chrome Canary for local testing.
Run the test suite with:
pnpm test
pnpm run deploy
Ensure you have required permissions and that Wrangler is configured.
This section outlines the methods for deploying the application using Docker. The processes for Development and Production are provided separately for clarity.
Option 1: Helper Scripts
# Development build
npm run dockerbuild
Option 2: Direct Docker Build Command
docker build . --target bolt-ai-development
Option 3: Docker Compose Profile
docker-compose --profile development up
docker run -p 5173:5173 --env-file .env.local bolt-ai:development
Option 1: Helper Scripts
# Production build
npm run dockerbuild:prod
Option 2: Direct Docker Build Command
docker build . --target bolt-ai-production
Option 3: Docker Compose Profile
docker-compose --profile production up
docker run -p 5173:5173 --env-file .env.local bolt-ai:production
For an easy deployment process, use Coolify:
- Import your Git repository into Coolify.
- Choose Docker Compose as the build pack.
- Configure environment variables (e.g., API keys).
- Set the start command:
docker compose --profile production up
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.
- Open the command palette in VS Code (
Ctrl+Shift+P
orCmd+Shift+P
on macOS). - Select Dev Containers: Reopen in Container.
- Choose the development profile when prompted.
- VS Code will rebuild the container and open it with the pre-configured environment.
Ensure .env.local
is configured correctly with:
- API keys.
- Context-specific configurations.
Example for the DEFAULT_NUM_CTX
variable:
DEFAULT_NUM_CTX=24576 # Uses 32GB VRAM