Thank you for considering contributing to KadeDB! We welcome all contributions, whether they're bug reports, feature requests, documentation improvements, or code contributions.
- Code of Conduct
- Getting Started
- Development Workflow
- Development Setup
- Coding Standards
- Testing
- Code Review Process
- Issue Reporting
- Pull Requests
- Release Process
- Community
- License
By participating in this project, you agree to abide by our Code of Conduct. Please read it before making any contributions.
- Fork the repository on GitHub
- Clone your fork locally
git clone https://github.com/your-username/KadeDB.git cd KadeDB git submodule update --init --recursive - Set up the development environment (see Development Setup below)
- Create a new branch for your changes
git checkout -b type/scope/short-description # Example: git checkout -b feat/storage/add-new-engine - Make your changes and commit them following our commit message guidelines
- Push your changes to your fork
- Open a Pull Request following our PR guidelines
Use the following format for branch names:
type/scope/short-description
Where type is one of:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style/formattingrefactor: Code changes that neither fix bugs nor add featuresperf: Performance improvementstest: Adding or modifying testschore: Maintenance tasks
Example: feat/storage/add-rocksdb-backend
We follow the Conventional Commits specification:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Example:
feat(storage): add support for RocksDB backend
- Implement RocksDB storage engine
- Add configuration options
- Update documentation
Closes #123
- C++17 compatible compiler (GCC 9+, Clang 10+, MSVC 2019+)
- CMake 3.14+
- Git
- Python 3.8+ (for build scripts)
- Conan (C++ package manager)
- Docker (optional, for containerized development)
# Clone the repository
$ git clone --recurse-submodules https://github.com/your-username/KadeDB.git
$ cd KadeDB
# Set up development environment (Linux/macOS)
$ ./scripts/setup_dev_env.sh
# Or on Windows
> .\scripts\setup_dev_env.ps1
# Build the project
$ mkdir -p build && cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
$ cmake --build . -j$(nproc)
# Run tests
$ ctest --output-on-failure- Install the following extensions:
- C/C++
- CMake Tools
- CMake Language Support
- clangd
- Open the project folder
- Select the
clangdconfiguration (bottom-right) - Use the CMake extension to configure and build
- Open the project folder
- Select the
clangorgcctoolchain - Let CLion index the project
- Use the built-in CMake tools to build and run
We follow the Google C++ Style Guide with the following additions:
- Line length: 100 characters
- Use
#pragma oncefor include guards - Prefer
constexprover#definefor constants - Use
nullptrinstead ofNULL - Use
autowhen the type is obvious from the context
We use clang-format for code formatting. The configuration is in .clang-format.
To format your code:
# Format all source files
$ ./scripts/format.sh
# Format only changed files
$ ./scripts/format-changed.sh- Document all public APIs using Doxygen-style comments
- Keep documentation up-to-date with code changes
- Add examples for complex functionality
- Document design decisions in the code or ADRs (Architecture Decision Records)
- Write unit tests for all new features
- Keep tests focused and independent
- Use test fixtures for common setup/teardown
- Follow the Testing Guidelines
# Run all tests
$ cd build && ctest --output-on-failure
# Run specific test
$ cd build && ctest -R test_name
# Run tests with debug output
$ cd build && ctest --verbose
# Run tests in parallel
$ cd build && ctest --output-on-failure -j$(nproc)- Create a draft PR early for feedback
- Request reviews from relevant team members
- Address all review comments
- Ensure all CI checks pass
- Get at least one approval before merging
- Squash and merge PRs with a descriptive commit message
When reporting issues, please include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected vs. actual behavior
- Environment details:
- OS and version
- Compiler version
- KadeDB version or commit hash
- Any relevant logs or error messages
- Screenshots if applicable
-
Before submitting a PR:
- Ensure your branch is up-to-date with
main - Run all tests locally
- Update documentation if needed
- Ensure code is properly formatted
- Ensure your branch is up-to-date with
-
PR Guidelines:
- Keep PRs focused on a single feature or bugfix
- Reference related issues using keywords (e.g.,
Closes #123) - Follow the PR template
- Include tests for new features
- Update documentation as needed
-
After submission:
- Address all CI failures
- Respond to code review comments
- Update the PR with any requested changes
-
Update version numbers in:
CMakeLists.txtinclude/kadedb/version.h- Documentation
-
Create a release branch:
git checkout -b release/vX.Y.Z
-
Update CHANGELOG.md with release notes
-
Create a signed tag:
git tag -s vX.Y.Z -m "Release vX.Y.Z" git push origin vX.Y.Z -
Create a GitHub release with the release notes
-
Merge the release branch into
mainanddevelop
- Join our Discord/Slack for discussions
- Follow us on Twitter
- Check out our blog for updates
By contributing to KadeDB, you agree that your contributions will be licensed under the Apache License 2.0.
Thank you for your interest in contributing to KadeDB! Your contributions help make this project better for everyone.