- Go 1.26+
- Docker & Docker Compose
- Task —
go install github.com/go-task/task/v3/cmd/task@latest - Buf —
brew install bufbuild/buf/buf protoc-gen-goandprotoc-gen-go-grpc:go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
git clone https://github.com/ipedrazas/pulse.git
cd pulse
# Generate protobuf stubs
task proto
# Build everything
task build
# Run tests (unit tests only, no Docker required)
task test
# Run integration tests (requires Docker)
go test github.com/ipedrazas/pulse/api/internal/integration -v -timeout 120sThis is a Go workspace with three modules:
| Module | Purpose |
|---|---|
proto/ |
Protobuf definitions and generated Go code |
api/ |
Hub API server (gRPC + REST + migrations) |
agent/ |
Edge agent (Docker poller + gRPC client) |
- Make changes
- Run
task lintto check for issues - Run
task testto run unit tests - Run integration tests if touching gRPC handlers, REST endpoints, or migrations
- Run
task dockerto verify Docker builds
When modifying proto/monitor/v1/monitor.proto:
- Run
task prototo regenerate Go stubs - Update both
api/andagent/code to match the new definitions - Run
task testto verify nothing breaks
- Use
log/slogfor structured logging - Keep packages small and focused under
internal/ - Follow existing patterns for error handling and context propagation
- Tests go next to the code they test (
_test.gosuffix)