Microservices boilerplate built using Hexagonal architecture, DDD principles & SOLID.
It was built in a Monorepo structure where all the services are part of a big repository, even though they're still running independently.
This project has been automated with Makefile to simplify the configuration and how to run the services. To execute the
functions bellow, it's required that you CD at the project root folder -> microservices-boilerplate
.
The application depends on Kong API Gateway
to manage the microservices. It's important to configure everything
before executing the API itself. Spoiler: Kong will take care of the service discovery, defining routes and set a JWT
authentication method.
To install and configure the app, run make install
.
This command will start the API by executing the docker-compose files. Make sure you have installed the application before executing the running step.
To execute the app, run make run
.
You can run make stop
to stop the application and shut down the docker containers.
This command executes all test cases in coverage mode and generates an HTML page with the output. The files generated
with this command will be at test/coverage
.
Run make tests
to execute all tests.
Ref: https://github.com/onsi/ginkgo/v2
Ref: https://github.com/onsi/gomega
Ref: https://github.com/stretchr/testify
Ref: https://github.com/vektra/mockery
Ref: https://gorm.io/
Ref: https://github.com/gomodule/redigo/redis
Ref: https://github.com/satori/go.uuid
Ref: https://github.com/itsjamie/gin-cors
Ref: https://grafana.com/ Ref: https://prometheus.io/
Ref: https://github.com/swaggo/gin-swagger
Ref: https://github.com/swaggo/files