DDD Technical Architecture Patterns: Golang
A Simple Implementation of DDD Technical Architecture Patterms
in Go.
Diagram v 0.1.0
Components
A. Interface Layer (Composite Interface)
- REST API - using Echo Framework
B. Modules:
- Geolocation - using CRUD Architecture Pattern (GORM)
- Authentication - using DDD Layered Architecture (GORM)
- Covid19 - using DDD Layered Architecture (Adapters -> Connectors)
C. Common System Libraries:
- Configuration - using yaml
- Identity & Securities - using JWT, Casbin (RBAC)
- Email Sender - using SMTP
D. Others
- Migrations - using GORM
E. Databases
- MySQL (tested)
- PostgreSQL (untested)
- SQLServer (untested)
- SQLite3 (untested)
F. Providers (Connectors)
- data.covid19.go.id (Official Covid19 Website - Indonesia)
- covid19.who.it (Official Covid19 Website - WHO)
G. Persistent Caches [to-do]
- JWT Cache (Redis, File, DB, etc)
- Search Cache (ElasticSearch)
H. Messaging [to-do]
I. Logs [to-do]
Development
- Clone
$ git clone https://github.com/muharihar/d3ta-go.git
- Development
$ cd d3ta-go
$ go run main.go db migrate
$ go run main.go server restapi
- Build
$ cd d3ta-go
$ go build
$ ./d3ta-go db migrate
$ ./d3ta-go server restapi
- Distribution [to-do]
$ cd d3ta-go
$ sh build.sh
Pic: REST Server is running
- Postman [to-do]
References:
- [Book] Domain-Driven Design: Tackling Complexity in the Heart of Software 1st Edition (Eric Evans, 2004)
- [Book] Patterns, Principles, and Practices of Domain-Driven Design (Scott Millett & Nick Tune, 2015)
Team & Maintainer:
- Muhammad Hari (https://www.linkedin.com/in/muharihar/)