module
0.0.0-20240220083845-a135114339e9
Repository: https://github.com/jubaerhossain/golang-ddd.git
Documentation: pkg.go.dev
# README
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