A simple and idiomatic REST API boilerplate in Go using Chi, designed for clarity, modularity and extensibility.
Includes Swagger documentation, basic validation and a clean separation of concerns.
- ๐งฑ Modular project structure (
cmd/,internal/) - ๐ Routing and middleware with
chi - ๐ Swagger UI documentation (
/docs) - โ
Request validation with
go-playground/validator - ๐งช Unit-test friendly structure
- ๐ณ Minimal Docker support
- ๐งฐ Designed as a reusable starter template
- Go 1.22+
- chi v5
- logrus
- swaggo/swag for Swagger
- go-playground/validator
# Install swag if not already installed
go install github.com/swaggo/swag/cmd/swag@latest
# Generate Swagger docs
swag init -g cmd/server/main.go
# Run the server
go run ./cmd/server