go-rest-api-example
Enterprise ready REST API microservice in golang
goapigolangboilerplatemongodbdocker-composeowaspsample-appapi-restapi-frameworkexample-apprest-apis
FreeRepo
Overview
This is a production-ready REST API microservice template written in Go that demonstrates best practices for building secure, scalable web services. It includes MongoDB integration, comprehensive middleware for logging and authentication, health checks, structured error handling, API versioning and a complete development toolchain with Docker, automated testing and GitHub Actions CI/CD.
Features
rest-apimicroservicehealth-checksrequest-loggingauthenticationrequest-tracingpanic-recoverysecurity-headersinput-validationgzip-compressionerror-handlingapi-versioninggraceful-shutdownconnection-poolingdatabase-indexingstructured-loggingsecrets-managementdependency-injectionunit-testingdocker-supportopenapi-specificationpostman-collection
Feature Flags
userDashboardauthenticationecommerceauthorizationloggingErrorTrackingjobsQueuenotificationsapiDocscachingrateLimitingformsValidation
Recommended Use Cases
rest-api-microserviceenterprise-backenddata-management-apiproduction-ready-service
Frontend
None
Backend
goginmongodbzerolog
Auth Providers
None
Deployment Targets
docker
Payment Providers
None
Quick Facts
โญ Stars
287
๐ด Forks
34
๐ Active
Yes
๐ Last Commit
2025-10-27T21:28:31.000Z
Stack
Framework
gin
Language
go
Database
mongodb
Logging
zerolog
CI
github-actions
Data Layer
Databases
postgresql, mongodb, redis
UI Stack
Developer Experience
Docker
Yes
Tests
Yes
Quickstart
Yes
env.example
Yes
CI
github-actions
Pricing
Classification
free
Selected
โ
Notes
Open source repository