Introduction#
This guide provides the coding conventions used in our development process. Adhering to these conventions is vital for maintaining code quality, readability, and consistency across the codebase. We follow the Conventional Commits specification for commit messages, which is instrumental in auto-generating a clear and detailed changelog.Each commit message should be structured as follows:<type>(<scope>): <description>
The <type> and <description> fields are mandatory, the optional scope is encouraged for additional context, and the body and footer are optional.Types#
build: Changes that affect the build system or dependencies (e.g., gulp, npm).
chore: Maintenance changes that don't modify src or test files.
ci: Updates to CI configuration files and scripts (e.g., GitHub Actions workflows).
docs: Documentation-only changes.
feat: Introduces a new feature to the codebase.
fix: Patches a bug in your codebase.
perf: Improvements to code performance.
refactor: Code changes that neither fix a bug nor add a feature.
revert: Reverts a previous commit.
style: Changes that do not affect the meaning of the code (formatting, missing semi-colons, etc).
test: Adds missing tests or corrects existing tests.
Scope#
The scope is optional and should be included if the change affects a specific segment of the codebase. It provides additional contextual information on the commit.Description#
The description contains a succinct explanation of the change:Use the imperative, present tense: "change" not "changed" nor "changes".
Do not capitalize the first letter.
Examples#
Here are some examples of Conventional Commits:Introduces a new feature to the codebase.feat(MAI-001): implement OAuth 2.0
Patches a bug in your codebase.fix(MAI-002): handle CORS issues
Improvements to code performance.perf(MAI-003): optimize query performance
Documentation-only changes.docs(MAI-004): update installation instructions
Changes that do not affect the meaning of the code (formatting, missing semi-colons, etc).style(MAI-005): run Pint to format code
Adds missing tests or corrects existing tests.test(MAI-006): add tests for user service
Best Practices#
Write Clear Descriptions: Ensure your commit messages are clear and descriptive of the changes you've made.
Small Commits: Make small, atomic commits that make the commit history easier to understand.
Prefix Appropriately: Use the correct prefix for your commit messages so that the changelog can be accurately generated.
Include Ticket Numbers: If the commit pertains to a particular task or issue, include the ticket number in the commit footer.
Modified at 2026-02-26 23:41:34