Conversation
📝 WalkthroughWalkthroughAdds Lefthook-based pre-commit and pre-push hooks, Justfile targets to run linters/formatters on staged files (backend/frontend), a Lefthook config, minor docs formatting, a Go module visibility change, and a trivial whitespace edit in a controller file. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Git as Git
participant LH as Lefthook
participant Just as Justfile
participant Tools as Linters/Formatters/Tests
Dev->>Git: git commit / git push
Git->>LH: invoke pre-commit / pre-push
LH->>Just: run configured job(s) (lint-be-staged, format-be-staged, lint-fe-staged, format-fe-staged, test-be)
Just->>Tools: execute linter/formatter/test commands (OS-aware, staged files)
Tools-->>Just: result (pass/fail)
Just-->>LH: job success/failure
LH-->>Git: allow or block commit/push
Git-->>Dev: success or error message
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
CONTRIBUTING.md (1)
35-42:⚠️ Potential issue | 🟡 MinorFix table linting and the Lefthook link.
Line 41 is missing a trailing pipe and the table is not surrounded by blank lines, which triggers markdownlint (MD055/MD058). Also, the Lefthook link lacks a scheme and is likely treated as a relative URL.
Proposed fix
### General - | Tool | Description | Installation | |------|-------------|--------------| | Docker | Containerization | [docker.com](https://www.docker.com/products/docker-desktop/) | | Doppler | Secrets management | [doppler.com/docs/install-cli](https://docs.doppler.com/docs/install-cli) | | Figma | Design tool | [figma.com](https://www.figma.com/downloads/) | | Just | CLI tool build with Rust | [Just](https://github.com/casey/just) | -| Lefthook | Pre-commit Tooling | [Lefthook](lefthook.dev) +| Lefthook | Pre-commit Tooling | [Lefthook](https://lefthook.dev/) | + > [!TIP]
Description
Install lefthook via homebrew or chocolatey/scoop.
then try committing.
as of right now, if backend changes were made, runs backend-test on push. otherwise, lints and formats staged files on commit.
How has this been tested?
Checklist
Changes by Category
Features
Infra
Improvements
Author Contribution (lines)
| File | Added | Removed |
| lefthook.yml | 30 | 0 |
| justfile | 34 | 0 |
| backend/go.mod | 1 | 1 |
| CONTRIBUTING.md | 1 | 1 |
| docs/REALTIME.md | 1 | 1 |
| backend/internal/controllers/users.go | 0 | 1 |
| Total | 67 | 4 |