Development Guidelines for the Alliance Business Suite
Version: 1.1
Date: 28/08/2023
Contributing to the Alliance Business Suite is a collaborative endeavor, and we appreciate your interest. This guide outlines the best practices and procedures to follow when developing features or fixing bugs for the platform.
Table of Contents
- Introduction
- Development Environment
- Branching Strategy
- Coding Standards
- Code Reviews
- Testing
- Deployment
- Documentation
Introduction
This guide serves as a comprehensive overview of the expectations and requirements for developers contributing to the Alliance Business Suite. Adherence to these guidelines ensures that our codebase remains maintainable, robust, and easy to understand.
Development Environment
Refer to the Dev Env Setup guide to set up your development environment. This guide outlines steps to RDP into the Corporate Server, clone the ABS repository via SSH, install VS Code, and configure posh-git and oh-my-posh.
Branching Strategy
We follow a modified Git Flow branching strategy that includes personal branches:
mainBranch: Contains the stable release.developBranch: Is for day-to-day development.feature/<feature-name>Branches: For new features.bugfix/<bug-name>Branches: For bug fixes.<username>/personalBranches: Personal branches named after the developer for experimenting or long-term work that will eventually be merged back intodevelop.
Personal Branches
-
Naming: These branches should be named with your username, followed by
/personal. For example, if your username isdaniel, then your personal branch should be nameddaniel/personal. -
Usage: Use your personal branch for prototyping, experimental features, or work-in-progress tasks that aren't ready to be shared with the team.
-
Merging: Code from personal branches should eventually be reviewed and merged into
developor appropriate feature branches. They should not be merged directly intomaster. -
Updates: Keep your personal branch up-to-date with the
developbranch to avoid merge conflicts.
By adhering to this branching strategy, including the use of personal branches, we aim to keep our workflow organized and our codebase clean and manageable.
Coding Standards
- Language Standards: Use consistent casing, indentation, and code organization.
- Comments: Add meaningful comments that clarify code purpose and behavior.
- Commit Messages: Use descriptive commit messages that reflect the changes made.
Code Reviews
- Peer Reviews: All pull requests should be reviewed by at least one other developer.
- Automated Checks: Ensure that automated checks (tests, linters, etc.) pass before merging.
- Conflict Resolution: Resolve all merge conflicts locally before submitting a PR.
Testing
- Unit Tests: Write unit tests for all new features and bug fixes.
- Integration Tests: Ensure that your code works well with existing features.
- Regression Testing: Run existing tests to ensure new code doesn't break existing functionality.
Deployment
- Staging: Test all changes in the staging environment before deploying to production.
- Rollback Plans: Have a plan in place for rolling back code in case of errors.
- Monitoring: Monitor application logs and performance metrics after deployment.
Documentation
- Code Comments: Inline comments should be used sparingly and only when necessary to explain complex logic.
- Documentation: Update relevant documentation to reflect changes.
- Release Notes: Maintain a log of all changes made for each release.