batazor / microservice-template-ddd

Golnag microservice-template by DDD

Home Page:https://batazor.github.io/microservice-template-ddd/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

microservice-template by ddd

DDD example use micriservices.

Getting Started

# Get help
make help

# Run services
make run

# Stop services
make down
Prerequisites
  • docker
  • docker-compose
  • protoc 3.7.1+

Service

Name Port Description Endpoint
traefik 80 HTTP
traefik 443 HTTPS
traefik 8060 Dashboard
api 7070 HTTP API
user 50051 gRPC Server
billing 50051 gRPC Server

Architecture

.
├── /cmd/                       # Run service endpoint
│   ├── /user/                  # User service
│   ├── /book/                  # Book service
│   └── /billing/               # Billing service
├── /pkg/                       # The public source code of the application
├── /internal/                  # The private source code of the application
│   └── /bookService/           # Book service source code
│       ├── /useCases/          # Write business logic [./application]
│       ├── /domian/            # Entity struct that represent mapping to data model
│       └── /infrastructure/    # Solves backend technical topics
│           ├── /store/         # Store delivery [../repository]
│           ├── /rpc/           # RPC delivery
│           └── /mq/            # MQ delivery
├── /ops/                       # All infrastructure configuration for IoC
├── .gitignore                  # A gitignore file specifies untracked files
└── README.md                   # README

HTTP API

Request example

example

Opentracing example request

example example

About

Golnag microservice-template by DDD

https://batazor.github.io/microservice-template-ddd/


Languages

Language:Go 89.9%Language:Makefile 5.6%Language:Dockerfile 4.5%