This commit introduces a pre-push Git hook that prevents direct pushes to the `main` and `dev` branches. This enforces the use of pull requests for merging changes into these protected branches, promoting code review and maintaining branch stability. The changes include: - Adding a `install-git-hooks` target to the Makefile to symlink the pre-push script into the `.git/hooks/` directory. - Creating the `scripts/git-hooks/pre-push` script that checks the target branch and aborts the push if it matches a protected branch. - Updating the `CONTRIBUTING.md` file to instruct developers to install the Git hooks after setting up their development environment.
3.4 KiB
3.4 KiB
Contributing to KROW Workforce Platform
Welcome to the KROW Workforce development team! This guide will help you get set up and understand our development practices.
🚀 Getting Started & Setup Checklist
Follow these steps to set up your development environment and gain access to all necessary resources.
-
Access Google Chat Space:
- Ensure you have been invited to and joined our main Google Chat space for daily communication and quick questions.
-
GitHub Access & SSH Key:
- Confirm you have read/write access to this GitHub repository.
- Configure your SSH key for GitHub. Ensure your commits are verified (GPG signing is recommended).
-
Install & Configure Gemini CLI:
- Install the Gemini CLI on your local machine.
- Familiarize yourself with its usage, especially for documentation updates (refer to
docs/06-maintenance-guide.md).
-
Install & Configure Enpass:
- Install Enpass (our team's shared password manager).
- Ensure you have access to the shared KROW vault for all project credentials (API keys, service accounts, etc.).
-
Install Recommended Development Tools:
- IDE: We recommend VS Code or Vim/Neovim for development.
- Diagramming: Use MermaidChart.com for creating and editing diagrams (Mermaid syntax).
-
Local Development Environment Setup:
- Clone the monorepo:
git clone git@github.com:Oloodi/krow-workforce.git - Navigate to the project root:
cd krow-workforce - Install web frontend dependencies:
make install - (Mobile app dependencies will be installed within their respective directories later.)
- Clone the monorepo:
- Install Git Hooks:
- Run
make install-git-hooksto set up local safeguards that prevent direct pushes to protected branches (mainanddev). This is a mandatory step.
- Run
-
Firebase Project Access Validation (CTO will provide access):
- Confirm you have access to the
devFirebase/GCP project. - Verify you can run
firebase loginandgcloud auth loginsuccessfully.
- Confirm you have access to the
-
Understand the Monorepo Structure:
- Familiarize yourself with the project layout as described in the main
README.md.
- Familiarize yourself with the project layout as described in the main
💡 Development Guidelines
-
Branching Strategy:
- We adopt a feature branch workflow. All code modifications must be done on a new branch, linked to a GitHub Issue.
- The
mainanddevbranches are protected.
-
Commit Messages:
- Use Open Commit for intelligent and standardized Git commit messages.
-
Code Standards:
- Adhere to existing code style, formatting, and architectural patterns found in the codebase.
- Run linters and formatters before committing.
-
Documentation:
- Refer to the Documentation Overview in the main
README.mdfor all project documentation. - For Base44 integration specifics, see 06-maintenance-guide.md.
- Refer to the Documentation Overview in the main
-
Diagrams:
- All diagrams should be created using Mermaid syntax and stored in Markdown files.
🔗 Useful Links
- KROW Internal Launchpad: (Link will be provided after deployment to Firebase Hosting)
- Project Vision: docs/00-vision.md
- Technical Roadmap: docs/04-strategy-technical-roadmap.md
- Project Plan: docs/05-project-plan.md