Files
support_backend/CONTRIBUTING.md
T

66 lines
1.7 KiB
Markdown
Raw Normal View History

2026-08-19 16:29:17 +05:30
# Contributing to SupportHub API
Thank you for contributing to SupportHub API. Please review the following guidelines before submitting changes.
---
## Branch Naming Convention
- `feature/<short-description>`: New domain feature or infrastructure addition
- `bugfix/<short-description>`: Bug fix
- `refactor/<short-description>`: Code restructuring without functional changes
- `chore/<short-description>`: Tooling, dependency, or documentation updates
---
## Commit Message Format
Use Conventional Commits:
```text
<type>(<scope>): <short summary>
[optional body]
```
Examples:
- `feat(ticketing): add ticket priority calculator strategy`
- `fix(queue): resolve BullMQ connection leak on shutdown`
- `chore(deps): update fastify to 4.26.2`
---
## Architecture Rules
1. **Self-Contained Modules**: Every domain feature belongs in `src/modules/<group>/<module>`.
2. **Public Boundary**: Expose public domain interfaces strictly via `index.ts`. Deep cross-module imports are prohibited.
3. **Layer Isolation**:
- `HTTP Route / Controller` -> Calls `Service`
- `Service` -> Calls `Repository` / `Engine`
- `Repository` -> Calls `PrismaClient` / `Database`
- Controllers **MUST NOT** directly query Prisma.
4. **Architecture Check**: Run `npm run architecture:check` before committing.
---
## Code Quality & Verification Gates
Before submitting a Pull Request, all of the following local commands must pass:
```bash
npm run typecheck
npm run architecture:check
npm run lint
npm run format:check
npm run test
npm run build
```
---
## Pull Request Guidelines
1. Create a PR against `main`.
2. Provide a clear description of changes and design decisions.
3. Ensure CI pipeline checks pass completely.