Coder Social home page Coder Social logo

golang-ddd's Introduction

Golang Boilerplate Using DDD Structure

clone the project

git clone https://github.com/JubaerHossain/golang-ddd && cd golang-ddd

install dependencies

make install

run the project [development mode]

make dev

build the project

make build

run the project [production mode]

make run

Features

  • Golang
  • DDD
  • Clean Architecture
  • Docker
  • Makefile
  • Swagger
  • Gorm
  • JWT
  • Viper
  • Logger[Zap]
  • Unit Test

Project Structure

.
├── cmd
│   └── server
│       └── server.go
├── internal
│   ├── core
│   │   └── auth
│   │       └── auth.go
│   ├── cache
│   │   └── cache.go
│   ├── database
│   │   └── database.go
|   ├── errors
│   │   └── errors.go
│   ├── health
│   │   └── health.go
│   ├── logger
│   │   └── logger.go
│   ├── middleware
│   │   └── auth.middleware.go
│   ├── monitor
│   │   └── monitor.go
│   ├── server
│   │   └── server.go
│   ├── domain
│   │   ├── model
│   │   │   └── user.go
│   │   └── repository
│   │       └── user.go
│   ├── infrastructure
│   │   ├── database
│   │   │   └── database.go
│   │   ├── logger
│   │   │   └── logger.go
│   │   ├── router
│   │   │   └── router.go
│   │   └── security
│   │       └── security.go
│   └── interfaces
│       ├── controller
│       │   └── user.go
│       ├── middleware
│       │   └── middleware.go
│       └── response
│           └── response.go
├── Dockerfile
├── go.mod
├── go.sum
├── Makefile
├── README.md
└── swagger
    └── swagger.yaml

API Endpoints

GET /api/v1/users
POST /api/v1/users
GET /api/v1/users/{id}
PUT /api/v1/users/{id}
DELETE /api/v1/users/{id}

Health Check

http://localhost:8080/health

Metrics

http://localhost:8080/metrics

Swagger

http://localhost:8080/swagger/index.html

License

MIT



golang-ddd's People

Contributors

jubaerhossain avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.