Thank you for your interest in contributing to SecureChat! This document provides guidelines and information for contributors.
- C++20 compatible compiler (GCC 10+, Clang 12+, MSVC 2019+)
- CMake 3.20+
- Qt 6.2+ (for GUI client)
- OpenSSL 3.0+
- Docker & Docker Compose
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/securechat.git cd securechat - Install dependencies:
# Ubuntu/Debian sudo apt-get install build-essential cmake libssl-dev libpq-dev qt6-base-dev # macOS brew install cmake openssl qt@6
- Build the project:
mkdir build && cd build cmake .. make -j$(nproc)
- Use GitHub Issues to report bugs
- Include system information, steps to reproduce, and expected behavior
- For security issues, please email security@securechat.org instead
- Open a GitHub Issue with the "enhancement" label
- Describe the feature, use case, and potential implementation
- Discuss the feature before starting implementation
git checkout -b feature/your-feature-name
# or
git checkout -b bugfix/issue-description- Follow the coding standards (see below)
- Add tests for new functionality
- Update documentation as needed
- Ensure all tests pass
git add .
git commit -m "feat: add new feature description
- Detailed description of changes
- Any breaking changes
- Closes #issue-number"git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
- Follow modern C++20 practices
- Use RAII for resource management
- Prefer smart pointers over raw pointers
- Use const correctness
- Follow the Google C++ Style Guide with these exceptions:
- Use 4 spaces for indentation
- Line length limit: 100 characters
# Format code with clang-format
find src include -name "*.cpp" -o -name "*.hpp" | xargs clang-format -i- Classes: PascalCase (
MessageHandler) - Functions/Methods: camelCase (
sendMessage) - Variables: snake_case (
message_count) - Constants: UPPER_SNAKE_CASE (
MAX_CONNECTIONS) - Namespaces: lowercase (
securechat::network)
- Use Doxygen comments for public APIs
- Include examples in documentation
- Update README.md for significant changes
# Build with tests
cmake -DENABLE_TESTS=ON ..
make -j$(nproc)
# Run all tests
ctest --verbose
# Run specific test
./bin/test_encryption- Use Google Test framework
- Test both positive and negative cases
- Include performance tests for critical paths
- Mock external dependencies
# Generate coverage report
cmake -DENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug ..
make -j$(nproc)
make test
make coverage- Never commit secrets, keys, or passwords
- Use secure coding practices
- Validate all inputs
- Follow OWASP guidelines
- Report security issues privately
- Use established libraries (OpenSSL)
- Don't implement custom crypto
- Follow current best practices
- Include security tests
- Code follows style guidelines
- Tests pass locally
- Documentation updated
- No merge conflicts
- Commit messages are clear
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests pass
- [ ] Manual testing completed
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changes (or documented)Use conventional commits:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentationstyle: Formattingrefactor: Code restructuringtest: Adding testschore: Maintenance
Examples:
feat(encryption): add AES-256 support
fix(network): resolve connection timeout issue
docs(readme): update build instructions
Contributors will be recognized in:
- CONTRIBUTORS.md file
- Release notes
- Project documentation
- GitHub Discussions for questions
- Discord server: [invite-link]
- Email: dev@securechat.org
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to SecureChat! π