Go User Service
A user-service API built with Go and Gin, documented with Swagger.

Overview
Go User Service is a focused backend exercise: a standalone user service with a small, well-defined HTTP surface. It was built to explore Go’s concurrency model and the conventions of a production-shaped service outside the Python ecosystem I usually work in.
The result is an API that handles user records and exposes its contract through Swagger documentation.
The brief
- Build a compact service with a clear separation between routing, handlers and data access.
- Keep request validation and error responses consistent.
- Document the API so it can be consumed without reading the source.
- Make the service easy to run in a container alongside other services.
Approach
I kept the layers thin. Gin handles routing and request binding, handlers own the HTTP contract, and the data layer is isolated behind a small interface. That structure makes the service easy to test and leaves room to swap the storage implementation later.
Errors follow one shape across endpoints, which matters more than it sounds: clients should not need a different error parser for every route. Swagger annotations describe the request and response models, and the generated spec doubles as a manual testing surface.
The service was built with Go modules and container-friendly configuration so it can run as part of a larger backend without special setup.
Stack
Go for the service and Gin for routing and middleware, with Swagger for the API contract.
Outcome
Go User Service is a compact reference for how I structure a Go API: explicit layers, consistent contracts and documentation that ships with the code.