Product reviews and star ratings — the only writer of the reviews table, and
the read path that serves them to the storefront and to product-service.
- Owns: reviews and their star ratings, one per product per user, and the two read surfaces that expose them.
- Does not own: products (
product-service), identity or token issuance (auth-service,user-service), and rating aggregation — no average is computed here. Reviews are also write-once: there is no update or delete path.
| Area | Technology |
|---|---|
| Runtime | Go 1.27 |
| Transports | HTTP (public read, private write) · gRPC (east-west read) |
| Data | PostgreSQL — one table, reviews |
| Platform libraries | authmw, dbx, grpcx, httpx, logger/zapx, migratex, obsx, proto |
- Canonical contract:
homelab/docs/api/review.md - Shared conventions:
homelab/docs/api/api.md - Surfaces: a public HTTP read and a JWT-protected HTTP write, plus
review.v1.ReviewServicefor east-west reads — product-service calls it to put reviews on a product page. HTTP:8080also carries/healthand/ready.
Routes, payloads and error codes live in the contract, so there is one place to change when they change.
Prefer the homelab local-stack — reviews are most useful with a product catalog and a signed token in front of them.
Standalone you need PostgreSQL reachable through the DB_* variables:
go run cmd/main.go migrate # apply schema migrations
go run cmd/main.go seed # demo reviews — development only, refuses production
go run cmd/main.go # serve HTTP :8080 + gRPC :9090The commands CI runs, so a green local run means a green pipeline:
go build ./...
go test -race ./...
go test -tags=integration ./internal/core/repository/... # needs Docker (testcontainers)
golangci-lint runMIT