An API to interact with users data.
- Create, update, search, and delete user records.
- View users individually or in bulk.
- OpenAPI (Swagger) documentation available.
- Built-in tracing (via OpenTelemetry).
- Docker & Docker Compose.
- Go 1.23.9 and PostgreSQL 16 (if running locally without containers).
Copy the .env.sample
file to .env
to set up environment variables:
cp .env.sample .env
docker-compose up --build
This will spin up:
- The API server.
- A PostgreSQL database (with user table migrations applied).
- Swagger documentation at: http://localhost:3001/company/docs/index.html.
Build docs manually:
make generate-openapi
Run tests:
make test
Lint your code:
make lint
This project is a great entry point to:
- Structuring Go apps using Clean Architecture.
- Writing APIs with Gin.
- Integrating Postgres using sqlc.
- Observability with OpenTelemetry.
Thank you for considering contributing to this project. It's awesome of you!