An event-driven microservices social application has been written in Golang
- Infrastructure
- PostgreSQL
- RabbitMQ
- Docker and Docker-compose
- Redis
No. | Service | URL |
---|---|---|
1 | gRPC Gateway | http://localhost:5000 |
2 | Mail Service | http://localhost:5001 |
3 | Web | loading... |
- Clean Architecture is a multi-layered architecture.
- Isolate Business Rules. Similar to Hexagonal and Onion architecture.
- The concentric circles represent layers, the closer to the center the more abstract (high level), and the further out the more detailed (low level).
- Dependency Inversion (DI) in SOLID High level will not depend on low level, both depend on abstraction/interface. Abstraction does not depend on details but vice versa.
- ---> In Clean Architecture arrows is Dependency Direction , not call direction.
Docker Desktop for Mac
TablePlus or pgAdmin4
Golang
Migrate
- Mac OS
brew install golang-migrate
- Linux
curl -L https://packagecloud.io/golang-migrate/migrate/gpgkey | apt-key add -
echo "deb https://packagecloud.io/golang-migrate/migrate/ubuntu/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/migrate.list
apt-get update
apt-get install -y migrate
npm install -g dbdocs
dbdocs login
npm install -g @dbml/cli
dbml2sql --version
# or if you're using yarn
yarn global add @dbml/cli
dbml2sql --version
- Mac OS
brew install sqlc
- Linux
sudo snap install sqlc
go install github.com/golang/mock/mockgen@v1.6.0
Generate dependency injection instances with wire
make wire
make sqlc
make proto
Generate DB documentation
make db_docs
Access the DB Documentation at db go-microservice.Password: 123456789
Start docker core include (postgres , redis, rabbitmq, etc)
make docker-core
Start docker multi-service (group,post,like, etc)
make docker
make run
make test