You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,49 @@ Detailed information on API endpoints can be found in the [API Guide](https://pi
40
40
## Integrations
41
41
* RMNCH (Reproductive, Maternal, Newborn, and Child Health)
42
42
43
+
## Setting Up Commit Hooks
44
+
45
+
This project uses Git hooks to enforce consistent code quality and commit message standards. Even though this is a Java project, the hooks are powered by Node.js. Follow these steps to set up the hooks locally:
46
+
47
+
### Prerequisites
48
+
- Node.js (v14 or later)
49
+
- npm (comes with Node.js)
50
+
51
+
### Setup Steps
52
+
53
+
1.**Install Node.js and npm**
54
+
- Download and install from [nodejs.org](https://nodejs.org/)
55
+
- Verify installation with:
56
+
```
57
+
node --version
58
+
npm --version
59
+
```
60
+
2. **Install dependencies**
61
+
- From the project root directory, run:
62
+
```
63
+
npm ci
64
+
```
65
+
- This will install all required dependencies including Husky and commitlint
66
+
3. **Verify hooks installation**
67
+
- The hooks should be automatically installed by Husky
68
+
- You can verify by checking if the `.husky` directory contains executable hooks
69
+
### Commit Message Convention
70
+
This project follows a specific commit message format:
71
+
- Format: `type(scope): subject`
72
+
- Example: `feat(login): add remember me functionality`
73
+
Types include:
74
+
- `feat`: A new feature
75
+
- `fix`: A bug fix
76
+
- `docs`: Documentation changes
77
+
- `style`: Code style changes (formatting, etc.)
78
+
- `refactor`: Code changes that neither fix bugs nor add features
79
+
- `perf`: Performance improvements
80
+
- `test`: Adding or fixing tests
81
+
- `build`: Changes to build process or tools
82
+
- `ci`: Changes to CI configuration
83
+
- `chore`: Other changes (e.g., maintenance tasks, dependencies)
84
+
Your commit messages will be automatically validated when you commit, ensuring project consistency.
85
+
43
86
## Usage
44
87
All features have been exposed as REST endpoints. Refer to the SWAGGER API specification for details.
0 commit comments