Thank you for your interest in contributing to BetterMITM! This document provides guidelines and instructions for contributing to the project.
We welcome contributions in many forms:
- 🐛 Bug Reports: Help us identify and fix issues
- ✨ Feature Requests: Suggest new features or improvements
- 💻 Code Contributions: Submit pull requests with code changes
- 📝 Documentation: Improve documentation and examples
- 🎨 UI/UX: Enhance the user interface and user experience
- 🧪 Testing: Add tests or improve test coverage
- 🌍 Translation: Help translate BetterMITM to other languages
-
Clone the repository:
git clone https://github.com/BetterMint/BetterMITM.git cd BetterMITM -
Install dependencies:
Windows:
run.bat
Linux/MacOS:
chmod +x run.sh ./run.sh
This will install
uv(if needed), Python dependencies, and build the web frontend. -
Set up development environment:
# Activate the virtual environment # Windows: .venv\Scripts\activate # Linux/MacOS:
source .venv/bin/activate
4. **Verify installation**:
```bash
uv run mitmweb --version
BetterMITM uses tox for testing. To run all tests:
uv run toxTo run tests for a specific environment:
uv run tox -e py312To run individual test files:
cd test/BetterMITM/addons
uv run pytest --cov BetterMITM.addons.advanced_interceptor --cov-report term-missing test_advanced_interceptor.pyWe enforce code style consistency. Before submitting a PR, run:
uv run tox -e lintThis will check:
- Python code style (ruff, mypy)
- TypeScript/JavaScript code style (ESLint, Prettier)
If linting errors are detected, the automated checks will fail and block merging.
When reporting a bug, please include:
- Clear description of the issue
- Steps to reproduce the problem
- Expected behavior vs actual behavior
- Environment details:
- Operating system
- Python version
- Node.js version
- BetterMITM version
- Screenshots (if applicable)
- Error messages or logs
When requesting a feature:
- Clear description of the feature
- Use case - why is this feature needed?
- Proposed implementation (if you have ideas)
- Examples of how it would be used
Check FEATURE_IDEAS.md to see if your idea is already planned.
-
Fork the repository and create a branch:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes:
- Write clear, readable code
- Add comments where necessary
- Follow existing code style
- Add tests for new features
- Update documentation
-
Test your changes:
uv run tox uv run tox -e lint
-
Commit your changes:
git add . git commit -m "Description of your changes"
Use clear, descriptive commit messages. Follow the format:
feat: Add new featurefix: Fix bug descriptiondocs: Update documentationstyle: Code style changesrefactor: Code refactoringtest: Add tests
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request:
- Provide a clear title and description
- Reference any related issues
- Include screenshots for UI changes
- Ensure all tests pass
- Follow PEP 8 style guide
- Use type hints where appropriate
- Keep functions focused and small
- Add docstrings for public functions/classes
- Remove all comments (project requirement)
- Follow ESLint and Prettier configurations
- Use TypeScript for type safety
- Follow React best practices
- Remove all comments (project requirement)
- Write clear, self-documenting code
- Add tests for new functionality
- Update documentation for user-facing changes
- Keep commits focused and atomic
- 🐛 Bug fixes
- ✨ Advanced Interceptor improvements
- 🎨 UI/UX enhancements
- 📝 Documentation improvements
- 🧪 Test coverage
- 🔧 Performance optimizations
- 🌐 Internationalization
- 📊 Analytics features
- 🔐 Security enhancements
If you want to work on a larger feature:
- Check FEATURE_IDEAS.md for planned features
- Open an issue to discuss your approach
- Get feedback before starting implementation
- Create a draft PR for early feedback
- Add tests for new features
- Ensure existing tests still pass
- Aim for good test coverage
- Test edge cases
- Python tests:
test/BetterMITM/ - Frontend tests:
web/src/js/__tests__/ - Integration tests:
test/integration/
- Update
docs.mdfor user-facing changes - Update
README.mdfor major features - Add code comments (though comments are removed in final code)
- Update inline help text in the UI
- Use clear, concise language
- Include examples where helpful
- Keep formatting consistent
- Link to related sections
Do not open public issues for security vulnerabilities. Instead:
- Email security concerns to the maintainers
- Wait for a response before disclosing publicly
- Follow responsible disclosure practices
- Discord: Join our Discord server for real-time help
- GitHub Discussions: Use GitHub Discussions for questions
- Issues: Open an issue for bugs or feature requests
- Code follows style guidelines
- Tests pass (
uv run tox) - Linting passes (
uv run tox -e lint) - Documentation updated (if needed)
- Commit messages are clear
- PR description is complete
- No merge conflicts
Contributors will be:
- Listed in the project's contributors
- Credited in release notes
- Appreciated by the community! 🙏
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Help maintain a positive community
Thank you for contributing to BetterMITM! 🚀