Git Workflow
Branching Model
Trunk-based development with main as the protected branch. All changes go through Merge Requests.
Branch Naming
Feature branches are named after the Jira ticket:
INV-001
INV-042-add-pdf-generation
Commit Format
<type>(<scope>): <description> [INV-XXX]
Types
| Type | Description |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
refactor | Code restructuring |
test | Adding or updating tests |
chore | Build, tooling, dependencies |
perf | Performance improvement |
style | Formatting, no logic change |
ci | CI/CD pipeline changes |
Scopes
| Scope | Description |
|---|---|
backend | Go backend code |
frontend | React frontend code |
db | Database migrations |
invoice | Invoice-specific changes |
calculator | Pricing calculator |
pdf | PDF generation |
integration | External service integrations |
clickhouse | ClickHouse queries/client |
infra | Infrastructure, Docker, deployment |
Examples
feat(backend): add prefill pipeline for invoice generation [INV-001]
fix(frontend): correct overtime calculation display [INV-042]
test(backend): add handler tests for invoice endpoints [INV-001]
docs(backend): update API documentation
refactor(invoice): extract rate tier calculation [INV-015]
Changelog
Changes tagged with feat, fix, refactor, or perf require a CHANGELOG.md update. Add [skip-changelog] to bypass:
chore(deps): update Go dependencies [skip-changelog]
Pre-Commit Hooks
The following checks run before each commit:
gofmt— Go formattinggolangci-lint— Go lintingeslint— TypeScript lintingprettier— Frontend formatting- Changelog validation
Code Review
- All changes via MR to
main - At least one approval required
- CI must pass (lint + test + build)
- Squash merge preferred for clean history