https://github.com/javiorfo/go-microservice
API Rest, Tracing, Auditory, Swagger and Keycloak
https://github.com/javiorfo/go-microservice
api fiber go golang gorm-orm keycloak microservice security tracing web
Last synced: 3 months ago
JSON representation
API Rest, Tracing, Auditory, Swagger and Keycloak
- Host: GitHub
- URL: https://github.com/javiorfo/go-microservice
- Owner: javiorfo
- License: mit
- Created: 2024-04-20T01:42:02.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-05-23T23:24:22.000Z (10 months ago)
- Last Synced: 2025-05-24T00:27:27.519Z (10 months ago)
- Topics: api, fiber, go, golang, gorm-orm, keycloak, microservice, security, tracing, web
- Language: Go
- Homepage:
- Size: 112 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-microservice
*Golang archetype oriented to microservices.*
## Dependencies
Golang, Docker, Make, [Swag tool](https://github.com/swaggo/swag)
## Features
- Architecture
- Handlers, respositories and services
- Custom Messages and Errors
- Pagination and Ordering
- DB Migrator
- Go 1.24 (at the moment)
- Libraries
- Web: Fiber
- ORM: Gorm
- OAuth2: Gocloak
- Validations: Go Playground Validator
- Unit Test: Testify
- DB: Postgres
- Tracing: Opentelemetry
- Test: Testcontainers
- OpenAPI: Fiber Swagger
- Environment: Godot
- Keycloak as Auth Server
- Distributed tracing
- OpenTelemetry, Micrometer and Jaeger
- Swagger
- Swaggo & Fiber Swagger
- Customized with command **make swagger** (OAuth2 server by parameter and not static)
- Auditory
- Gorm custom auditory
- Database
- Postgres for the app
- Testcontainers for testing
## Files
- [Dockerfile](https://github.com/javiorfo/go-microservice/tree/master/Dockerfile)
- [Ship files](https://github.com/javiorfo/go-microservice/tree/master/ships)
- For those using Neovim and [this plugin](https://github.com/javiorfo/nvim-ship)
## Usage
- Executing `make help` all the available commands will be listed.
- Also the standard Go commands could be used, like `go run main.go`
- To use this archetype with a different name, execute this command to replace the names:
```bash
find . -type f -exec sed -i 's/go-microservice/your-project-name/g' {} +
```
## MongoDB instead of Postgres
- [MongoDB repo](https://github.com/javiorfo/go-microservice-mongo) contains version with MongoDB
---
### Donate
- **Bitcoin** [(QR)](https://raw.githubusercontent.com/javiorfo/img/master/crypto/bitcoin.png) `1GqdJ63RDPE4eJKujHi166FAyigvHu5R7v`
- [Paypal](https://www.paypal.com/donate/?hosted_button_id=FA7SGLSCT2H8G)