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
@@ -26,6 +26,49 @@ Prerequisites
26
26
## Installation
27
27
This service has been tested on Wildfly as the application server. To install the admin module, kindly refer to Installation Guide for [API Repository](https://piramal-swasthya.gitbook.io/amrit/developer-guide/development-environment-setup/installation-instructions/for-api-repositories) for guidance.
28
28
29
+
## Setting Up Commit Hooks
30
+
31
+
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:
32
+
33
+
### Prerequisites
34
+
- Node.js (v18 or later)
35
+
- npm (comes with Node.js)
36
+
37
+
### Setup Steps
38
+
39
+
1.**Install Node.js and npm**
40
+
- Download and install from [nodejs.org](https://nodejs.org/)
41
+
- Verify installation with:
42
+
```
43
+
node --version
44
+
npm --version
45
+
```
46
+
2. **Install dependencies**
47
+
- From the project root directory, run:
48
+
```
49
+
npm ci
50
+
```
51
+
- This will install all required dependencies including Husky and commitlint
52
+
3. **Verify hooks installation**
53
+
- The hooks should be automatically installed by Husky
54
+
- You can verify by checking if the `.husky` directory contains executable hooks
55
+
### Commit Message Convention
56
+
This project follows a specific commit message format:
57
+
- Format: `type(scope): subject`
58
+
- Example: `feat(login): add remember me functionality`
59
+
Types include:
60
+
- `feat`: A new feature
61
+
- `fix`: A bug fix
62
+
- `docs`: Documentation changes
63
+
- `style`: Code style changes (formatting, etc.)
64
+
- `refactor`: Code changes that neither fix bugs nor add features
65
+
- `perf`: Performance improvements
66
+
- `test`: Adding or fixing tests
67
+
- `build`: Changes to build process or tools
68
+
- `ci`: Changes to CI configuration
69
+
- `chore`: Other changes (e.g., maintenance tasks, dependencies)
70
+
Your commit messages will be automatically validated when you commit, ensuring project consistency.
71
+
29
72
## Usage
30
73
All the features have been exposed as REST endpoints.
31
74
Refer to the SWAGGER API specification for details.
0 commit comments