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

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
  1. 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
  1. 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 issue or help 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

  1. Unit Tests: Test individual functions and modules
  2. Integration Tests: Test component interactions
  3. Crypto Tests: Verify cryptographic implementations
  4. CLI Tests: Test command-line interface behavior
  5. 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

  1. Crypto Changes: All cryptographic code changes require thorough review
  2. Memory Safety: Be mindful of sensitive data in memory
  3. Dependencies: New dependencies require security review
  4. 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

  1. Create an issue (for non-trivial changes)
  2. Fork the repository
  3. Create a feature branch: git checkout -b feature/my-feature
  4. Make your changes
  5. Add tests for new functionality
  6. 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

  1. Push your branch: git push origin feature/my-feature
  2. Create a Pull Request through GitHub
  3. Fill out the PR template completely
  4. Wait for review and address feedback
  5. 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

# 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

๐Ÿ“ 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. ๐Ÿ™