Skip to content

Onion Architecture based on the DDD model, we’ve created onion architecture (aka hexagonal or clean architecture).

Notifications You must be signed in to change notification settings

bakhritdinov/demo-domain-driven-design-go

Repository files navigation

DemoDomainDrivenDesign

Architecture

Onion Architecture based on the DDD model, we’ve created onion architecture (aka hexagonal or clean architecture).

The idea of the Onion Architecture is based on the inversion of control principle, i.e. placing the domain and services layers at the center of your application, externalizing the infrastructure.

onion_architecture.png

Rules

  • Domain - contain only abstraction
  • Application - communication between the domain part and the infrastructure part
  • Infrastructure - implementation of communication with the infrastructure part

Requirements

Docker

Installation

go get -u -v all
docker compose up -d

Using

Build project

go build ./main.go

Run project

./main

or

go run ./main.go

Generate swagger docs

swag init

About

Onion Architecture based on the DDD model, we’ve created onion architecture (aka hexagonal or clean architecture).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages