https://github.com/batazor/microservice-template-ddd
Golnag microservice-template by DDD
https://github.com/batazor/microservice-template-ddd
ddd example golang template wire
Last synced: 11 months ago
JSON representation
Golnag microservice-template by DDD
- Host: GitHub
- URL: https://github.com/batazor/microservice-template-ddd
- Owner: batazor
- Created: 2020-11-13T09:46:37.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-04T22:07:43.000Z (11 months ago)
- Last Synced: 2025-03-04T23:19:52.000Z (11 months ago)
- Topics: ddd, example, golang, template, wire
- Language: Go
- Homepage: https://batazor.github.io/microservice-template-ddd/
- Size: 694 KB
- Stars: 32
- Watchers: 2
- Forks: 6
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
+ Import [Postman link](./docs/microservice-template-ddd.postman_collection.json) for
test HTTP API
### Request example

##### Opentracing example request

