golang-rest-api-template
Ready to Use Golang Template for REST API with mysql database, basic authentication, logging and cache
godockergolangtemplateboilerplatemicroserviceprometheusrestapigorilla-muxgo-restfulexample-apijaeger
FreeRepo
Overview
This is a Go REST API template repository that provides a complete project structure with built-in logging, middleware, database migrations, testing and deployment configurations. It uses gorilla/mux for routing, MySQL with sqlx for database access, Swagger for API documentation and includes Docker setup, GitHub Actions CI/CD, Prometheus metrics and distributed tracing with Jaeger for production-ready API development.
Features
structured-loggingmiddlewarecorsrequest-validationdatabase-migrationsapi-documentationdocker-setupci-cd-pipelinemakefileprometheus-metricsdistributed-tracingcachingsql-builder
Feature Flags
authenticationnotificationsapiDocscachingloggingmonitoringcitestingdocker
Recommended Use Cases
rest-api-developmentmicroservice-architecturebackend-serviceapi-boilerplate
Frontend
None
Backend
gogorilla-muxgo-restfulsqlxsquirrelmigrate
Auth Providers
basic-auth
Deployment Targets
docker
Payment Providers
None
Quick Facts
โญ Stars
9
๐ด Forks
2
๐งพ License
mit
๐ Active
Yes
๐ Last Commit
2025-08-08T12:46:39Z
Stack
Language
go
Database
mysql
Auth
basic-auth
Testing
testify, mockery
Monitoring
prometheus, jaeger, otel
Logging
zap
CI
github-actions
Data Layer
Databases
mysql, redis
UI Stack
Developer Experience
Docker
Yes
Tests
Yes
Quickstart
Yes
env.example
Yes
CI
github-actions
Pricing
Classification
free
Selected
โ
Notes
Open source template under MIT license