// the find
AleksK1NG/Go-Clean-Architecture-REST-API
Golang Clean Architecture REST API example
A reference implementation of Clean Architecture in Go, built around a news/comments/user domain with PostgreSQL, Redis, and S3. Aimed at Go developers who want a concrete example of how to structure a layered API with proper separation between delivery, usecase, and repository concerns.
The layer separation is genuine — interfaces are defined per-domain and mocked per-layer, so you can actually swap implementations without touching business logic. The observability stack is unusually complete for a sample project: Jaeger tracing, Prometheus metrics, and Grafana are all wired up and running via docker-compose. Test coverage spans all three layers (handler, usecase, repository) with gomock, which is more than most 'clean architecture' examples bother with. The docker-compose setup includes hot reload and a Delve debugger variant, which makes it easy to actually work with locally.
It uses the deprecated `dgrijalva/jwt-go` package, which has known vulnerabilities and was abandoned years ago — anyone copying this into production needs to swap it for `golang-jwt/jwt` first. The 'clean architecture' folder structure has each domain as a flat package under `internal/`, which means the interfaces and their implementations live in the same package; this reduces the decoupling benefit in practice. Last pushed May 2024 and the go.mod is likely pulling older minor versions of several dependencies. SSL certs are committed to the repo, which is fine for local dev but easy to accidentally misuse.