Contributing to Chamber ๐ค
August 9, 2025 ยท View on GitHub
Thank you for your interest in contributing to Chamber! We welcome contributions from everyone, whether you're fixing bugs, adding features, improving documentation, or helping with testing.
๐ Table of Contents
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Development Guidelines
- Testing
- Documentation
- Security Considerations
- Pull Request Process
- Community
๐ Code of Conduct
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
๐ Getting Started
Prerequisites
Before you begin, ensure you have the following installed:
- Rust 1.89.0 or newer: Install via rustup
- Git: For version control
- A modern terminal: For testing the TUI components
Development Dependencies
Install additional development tools:
# Essential tools
cargo install cargo-nextest # Better test runner
cargo install cargo-watch # File watching
cargo install cargo-tarpaulin # Code coverage
cargo install cargo-audit # Security auditing
cargo install cargo-deny # License and dependency checking
# Optional but recommended
cargo install cargo-machete # Find unused dependencies
cargo install cargo-outdated # Check for outdated dependencies
cargo install flamegraph # Performance profiling
## ๐ ๏ธ Development Setup
1. **Fork and clone the repository**:
``` bash
git clone https://github.com/your-username/chamber.git
cd chamber
- Set up the development environment:
# Check that everything compiles
cargo check --all-targets --all-features
# Run the test suite
cargo test
# Format code
cargo fmt
# Run linter
cargo clippy --all-targets --all-features -- -D warnings
- Verify the setup:
# Build and test the project
cargo build
cargo test --all-features
# Try running Chamber
cargo run -- --help
๐ค How to Contribute
Ways to Contribute
- ๐ Bug Reports: Found a bug? Please report it!
- ๐ก Feature Requests: Have an idea? We'd love to hear it!
- ๐ง Bug Fixes: Fix bugs and submit pull requests
- โจ New Features: Implement new functionality
- ๐ Documentation: Improve docs, add examples
- ๐งช Testing: Add tests, improve test coverage
- ๐จ UI/UX: Improve the terminal interface
- ๐ Security: Security reviews and improvements
Finding Work
- Check the Issues page
- Look for issues labeled
good first issueorhelp wanted - Check the project roadmap
- Improve documentation or add examples
๐ Development Guidelines
Code Style
We follow standard Rust conventions:
# Format your code
cargo fmt
# Check for common mistakes
cargo clippy --all-targets --all-features -- -D warnings
# Check for typos
typos
# Ensure documentation builds
cargo doc --no-deps --all-features
Coding Standards
- Error Handling: Use for application errors, specific error types for library code
anyhow - Documentation: All public APIs must have documentation
- Testing: New features require tests
- Security: Security-sensitive code needs extra attention and review
- Performance: Consider performance implications, especially for crypto operations
Project Structure
chamber/
โโโ crates/
โ โโโ vault/ # Core vault logic and cryptography
โ โโโ cli/ # Command-line interface
โ โโโ tui/ # Terminal user interface
โ โโโ import-export/ # Data serialization and migration
โโโ src/ # Main binary and application logic
โโโ tests/ # Integration tests
โโโ benches/ # Performance benchmarks
โโโ docs/ # Additional documentation
โโโ examples/ # Usage examples
Commit Messages
Use conventional commit format:
type(scope): description
[optional body]
[optional footer]
Types: feat, , docs, test, refactor, perf, chore, ci fix
Examples:
feat(vault): add master password rotation
fix(cli): handle empty vault gracefully
docs: update installation instructions
test(crypto): add ChaCha20 test vectors
๐งช Testing
Running Tests
# Run all tests
cargo test
# Run with nextest (faster, better output)
cargo nextest run
# Run specific test suite
cargo test --package chamber-vault
# Run integration tests
cargo test --test integration_tests
# Run with coverage
cargo tarpaulin --out html
Test Categories
- Unit Tests: Test individual functions and modules
- Integration Tests: Test component interactions
- Crypto Tests: Verify cryptographic implementations
- CLI Tests: Test command-line interface behavior
- Database Tests: Test SQLite operations and migrations
Writing Tests
- Add unit tests in the same file as the code (using
#[cfg(test)]) - Add integration tests in the
tests/directory - Use descriptive test names:
test_vault_creation_with_strong_password - Test both success and error cases
- For crypto code, include test vectors when possible
Benchmarks
# Run benchmarks
cargo bench
# Profile with flamegraph
cargo flamegraph --bench crypto_bench
๐ Documentation
Documentation Standards
- Public APIs: Must have rustdoc comments
- Examples: Include usage examples in doc comments
- README: Keep README.md up to date
- Architecture: Document design decisions
Building Documentation
# Build documentation
cargo doc --no-deps --all-features --open
# Check for broken links
cargo doc --no-deps --all-features 2>&1 | grep warning
๐ Security Considerations
Chamber is a security-critical application. Please keep these guidelines in mind:
Security Review Process
- Crypto Changes: All cryptographic code changes require thorough review
- Memory Safety: Be mindful of sensitive data in memory
- Dependencies: New dependencies require security review
- Input Validation: Validate all user input rigorously
Security Testing
# Audit dependencies
cargo audit
# Check for security advisories
cargo deny check advisories
# Run security-focused tests
cargo test --features security-tests
Reporting Security Issues
๐จ Do not report security vulnerabilities through public GitHub issues. Instead, please email security issues to: security@chamber-project.org Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)
๐ Pull Request Process
Before Submitting
- Create an issue (for non-trivial changes)
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Add tests for new functionality
- Update documentation if needed
Pre-submission Checklist
- Code compiles without warnings:
cargo build - All tests pass:
cargo test - Code is formatted:
cargo fmt - No clippy warnings:
cargo clippy --all-targets --all-features -- -D warnings - Documentation builds:
cargo doc --no-deps - Security audit passes:
cargo audit - Commit messages follow conventions
Submission Process
- Push your branch:
git push origin feature/my-feature - Create a Pull Request through GitHub
- Fill out the PR template completely
- Wait for review and address feedback
- Merge (will be done by maintainers)
PR Template
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Tests added/updated
- [ ] All tests pass
- [ ] Manual testing completed
## Security
- [ ] No new security vulnerabilities introduced
- [ ] Security-sensitive changes reviewed
## Documentation
- [ ] Documentation updated
- [ ] Examples added/updated
๐ฏ Review Process
What We Look For
- Correctness: Does the code work as intended?
- Security: Are there any security implications?
- Performance: Is the performance impact acceptable?
- Maintainability: Is the code easy to understand and maintain?
- Testing: Are there adequate tests?
- Documentation: Is the code properly documented?
Review Timeline
- Initial Response: Within 48 hours
- Full Review: Within 1 week for most PRs
- Security Reviews: May take longer due to additional scrutiny
๐ Development Workflow
Recommended Workflow
# Stay up to date
git checkout main
git pull upstream main
# Create feature branch
git checkout -b feature/my-awesome-feature
# Make changes and test frequently
cargo watch -x "test --all-features"
# Before committing
cargo fmt
cargo clippy --all-targets --all-features -- -D warnings
cargo test
# Commit with conventional format
git commit -m "feat(vault): add password strength validation"
# Push and create PR
git push origin feature/my-awesome-feature
Continuous Integration
Our CI pipeline runs:
- Tests: All test suites across multiple platforms
- Linting: Format and clippy checks
- Security: Dependency auditing
- Coverage: Code coverage analysis
- Documentation: Doc generation and link checking
๐ Community
Getting Help
- GitHub Discussions: For questions and general discussion
- Issues: For bug reports and feature requests
- Discord/Matrix: Real-time chat (links in README)
Code of Conduct
We are committed to providing a welcoming and inclusive environment. Please read our Code of Conduct.
Recognition
Contributors are recognized in:
- : Active contributors list README.md
- Releases: Changelog mentions
- All Contributors: Comprehensive contributor recognition
๐ Getting in Touch
- Maintainers: @mikeleppane
- General Questions: GitHub Discussions
- Security Issues: security@chamber-project.org
๐ License
By contributing to Chamber, you agree that your contributions will be licensed under the MIT License. Thank you for contributing to Chamber! Your help makes this project better for everyone. ๐