A Simple Implementation of DDD Technical Architecture Patterns
in Go.
Modular Version: https://github.com/d3ta-go
A. Interface Layer (Composite Interface)
- REST API - using Echo Framework
B. Modules:
- Geolocation - using CRUD Architecture Pattern (GORM)
- Authentication - using DDD Layered Architecture (GORM)
- Email - using DDD Layered Architecture (GORM, SMTP)
- 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
- Session/Token/JWT Cache (Redis, File, DB, etc) [tested: Redis]
- Indexer/Search Cache (ElasticSearch)
H. Messaging [to-do]
I. Logs [to-do]
- Clone
$ git clone https://github.com/muharihar/d3ta-go.git
- Setup
a. copy `conf/config-sample.yaml` to `conf/config.yaml`
b. setup your dependencies/requirements (e.g: database, redis, smtp, etc.)
- 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 dist.sh
Pic: REST Server is running!
Swagger UI URL Address: http://localhost:2020/openapi/docs/index.html
- Postman [to-do]
- [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)
- Muhammad Hari (https://www.linkedin.com/in/muharihar/)