Contributing to DevBox
May 16, 2026 ยท View on GitHub
Thank you for your interest in contributing to DevBox. This document provides guidelines for contributing to the project.
Table of Contents
- Code of Conduct
- How to Contribute
- Development Setup
- Coding Standards
- Commit Guidelines
- Pull Request Process
- Testing
- Documentation
Code of Conduct
- Be respectful and inclusive
- Focus on constructive feedback
- Help maintain a welcoming environment for all contributors
How to Contribute
Reporting Issues
Before creating an issue:
- Search existing issues to avoid duplicates
- Use the issue templates if available
- Include relevant details:
- Operating system and version
- Docker version
- Steps to reproduce
- Expected vs actual behavior
- Error messages and logs
Suggesting Features
- Open an issue with the "feature request" label
- Describe the use case and benefits
- Consider implementation complexity
Submitting Changes
- Fork the repository
- Create a feature branch from
main - Make your changes
- Test your changes
- Submit a pull request
Development Setup
Prerequisites
- Ubuntu 24.04 (or compatible Linux distribution)
- Docker and Docker Compose
- Git
- Bash 5.0 or later
Local Development
# Clone your fork
git clone https://github.com/gl0bal01/devbox.git
cd devbox
# Create a feature branch
git checkout -b feature/your-feature-name
# Make changes and test
./setup.sh # Test on a development VPS
Testing Environment
For testing, use a fresh VPS instance:
- Hostinger, Hetzner, DigitalOcean, or similar
- Ubuntu 24.04 with Docker pre-installed
- Minimum 4GB RAM
Coding Standards
Shell Scripts
Follow these conventions for shell scripts:
- Shebang: Use
#!/usr/bin/env bash - Error handling: Use
set -euo pipefail - Quoting: Always quote variables:
"$variable" - Functions: Use lowercase with underscores:
my_function() - Constants: Use uppercase:
MY_CONSTANT
Example:
#!/usr/bin/env bash
set -euo pipefail
MY_CONSTANT="value"
my_function() {
local input="\$1"
echo "Processing: $input"
}
main() {
my_function "$MY_CONSTANT"
}
main "$@"
Documentation
- Use Markdown for all documentation
- Follow the structure in existing docs
- Use clear, simple language
- Include code examples where helpful
- Avoid jargon and idioms
Docker Compose Files
- Use version 3.8 or later syntax
- Include health checks for all services
- Apply security hardening (no-new-privileges, cap_drop)
- Use resource limits
- Document with comments
Commit Guidelines
Commit Message Format
type: short description
Longer description if needed.
- Detail 1
- Detail 2
Commit Types
| Type | Description |
|---|---|
| feat | New feature |
| fix | Bug fix |
| docs | Documentation changes |
| style | Formatting, no code change |
| refactor | Code restructuring |
| test | Adding tests |
| chore | Maintenance tasks |
Examples
feat: add GPU detection for Ollama
Automatically detects NVIDIA GPUs and configures
Ollama to use GPU acceleration.
- Added nvidia-smi check
- Updated docker-compose for GPU passthrough
fix: correct SSH port in firewall rules
UFW rules were using port 22 instead of configured
SSH_PORT variable.
docs: add troubleshooting section for VPN issues
Pull Request Process
Before Submitting
- Test your changes on a fresh VPS
- Update documentation if needed
- Ensure no sensitive data is included (IPs, keys, passwords)
- Run shellcheck on shell scripts:
shellcheck setup.sh
Pull Request Template
When creating a pull request, include:
- Description: What does this change do?
- Motivation: Why is this change needed?
- Testing: How was this tested?
- Checklist:
- Tested on fresh Ubuntu 24.04 VPS
- Documentation updated
- No hardcoded secrets or IPs
- Shell scripts pass shellcheck
Review Process
- Maintainers will review within 1-2 weeks
- Address feedback promptly
- Keep discussions focused and constructive
Testing
Manual Testing Checklist
Test these scenarios before submitting:
- Fresh installation: Run setup.sh on new VPS
- Idempotency: Run setup.sh twice, verify no errors
- Services: Verify all services start and are accessible
- Security: Run security-check.sh
- AI tools: Test install-ai-dev-stack.sh
Security Testing
Always verify:
- No secrets in logs or output
- Correct file permissions (600 for sensitive files)
- Services only accessible via Tailscale
- UFW rules correct
Documentation
Where to Document
| Change Type | Documentation Location |
|---|---|
| New feature | README.md, relevant docs/ file |
| Configuration | README.md Configuration section |
| Troubleshooting | docs/troubleshooting.md |
| Commands | README.md (Operator commands) + Makefile make help |
Documentation Standards
- Use present tense ("Add feature" not "Added feature")
- Be concise and clear
- Include examples for complex features
- Update the "Last updated" date
Questions
For questions about contributing:
- Check existing documentation
- Search closed issues
- Open a new issue with the "question" label
Thank you for contributing to DevBox.