This document provides guidelines to help maintain a clear and efficient workflow for all contributors. Please read and follow these guidelines when contributing to the repository. 🚀
🌟 We use a consistent branch naming structure to ensure clarity and organization. Below is the naming convention for different types of branches:
| Branch Type | Format | Branch Origin | Description |
|---|---|---|---|
| Main | main |
- (root branch) | Stable branch containing production-ready code. |
| Development | dev |
main |
Central branch for integrating ongoing development. |
| Feature | feature/<user>/<short-description> |
dev |
For developing new features or enhancements. |
| Fix | fix/<user>/<short-description> |
dev |
For resolving non-critical bugs or issues. |
| Hotfix | hotfix/<short-description> |
main |
For addressing critical issues in production. |
| Chore | chore/<user>/<short-description> |
dev |
For refactoring, dependency updates, or other minor tasks. |
| Release | release/<version> |
dev |
Used to prepare code for production deployment. |
| Experimental | experiment/<short-description> |
dev or independent |
For testing new ideas or proof-of-concept implementations. |
- Always branch off from
devunless you are creating a hotfix frommain. - Keep PRs small and focused—ideally one logical change per PR.
- Provide a clear title and concise description of what the PR does.
- Link related issues using keywords (e.g.,
Fixes #42). - Ensure your branch is up-to-date with
devbefore submitting a PR. - Add relevant unit/integration tests for any new functionality or fixes.
- All PRs must pass CI checks (linting, formatting, tests) before merging.
-
Follow the existing code style and structure.
-
Ensure consistent naming for classes, variables, and methods.
-
Document public methods, endpoints, and major architectural decisions.
-
Avoid committing commented-out or dead code.
-
Prefer descriptive commit messages, e.g.:
feat(user): add JWT-based authentication fix(db): resolve connection leak in user repository chore(ci): update GitHub Actions build pipeline
Follow Conventional Commits:
<type>(<scope>): <short summary>
Common types:
feat– New feature or enhancementfix– Bug fixchore– Maintenance or tooling changesdocs– Documentation updatesrefactor– Code change that neither fixes a bug nor adds a featuretest– Adding or updating testsci– Continuous integration or deployment-related changes
-
Fork the repository (if external contributor).
-
Clone your fork and create a branch from
dev:git checkout dev git pull origin dev git checkout -b feature/<user>/<short-description>
-
Implement your changes.
-
Run tests and linters to ensure code quality.
-
Commit with a meaningful message.
-
Push your branch and open a Pull Request against
dev. -
Wait for review and approval before merging.
- Avoid making direct commits to
mainordev. - Large or structural changes should first be proposed via a discussion or issue.
- Tag your PR as
feature,bug,chore, orrefactorto improve visibility. - Write tests for all critical logic to maintain stability.
- Ensure no sensitive data (tokens, keys, passwords) is committed.
Open a GitHub Discussion or reach out via an issue. Your feedback and contributions help make HeapDog better for everyone. ❤️