Guidelines
Repositories
- All repositories should be named in lowercase and use kebab-case.
- To name a project, use the following format depending on the type of the project :
customer-api
/customer-client-web
/customer-client-mobile
- As a general rule, the last word should be the type of the project.
Branches
If you’re going to remember one thing in this guide, remember this : once a project has gone live, the main branch must always be stable.
It should be safe to deploy the main branch to production at all times. All branches are assumed to be active and inactive branches should get cleaned up accordingly.
- Projects that aren’t live yet have at least two branches :
main
anddevelop
. - You should NEVER commit directly on the
main
branch without authorization from the CEO or CTO. - Avoid as much as you can committing directly on the
develop
branch, always commit through pull requests.
We are using the GitFlow (without the release
branch) branching model. Here is a quick overview of the branches we use :
main
develop
staging
feature
hotfix
Pull requests
- Except for hotfixes (with CEO or CTO authorization), all changes to the codebase should be made through pull requests.
- Pull requests should be reviewed by at least one other developer before being merged.
- Always rebase your branch before creating a pull request.
Merges and rebases
- Rebase your branch regularly to reduce the chance of merge conflicts.
Commits
- All commits should be written in english and use this pattern :
<type>(<scope>): <description>
.- The
<type>
is required and should be one of those values :build
chore
ci
docs
feat
fix
perf
refactor
revert
style
test
- The
<scope>
is optional and is used to define the application scope you have worked on. - The
<description>
is required and describe in few words your work.
- The
- Here are few examples of commits :
chore(node): update dependencies
feat(user): add roles to user model
feat(categories,migrations): add many to many relation with tag model