Skip to content

An example of Clean Architecture Implementation in Go using Gin, GORM, and dig.

Notifications You must be signed in to change notification settings

Kybton/go-gin-clean-architecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clean Architecture Implementation in

drawing

About the Project

This is the example clean architecture written in GoLang using Gin as the web framework, dig as the dependency injector and GORM as the ORM.

Why? Because DRY

With new microservices being created, having to re-create the boilerplate codes before implementating the actual business logics is time and energy consuming. So, I decided to create a boilerplate codes that I can reuse and thought to myself why not make it public. So, it is here.

Future Plan

I am planning to make a CLI wrapper for this project where you can create a new module or service with one command (or more than that who knows?) and many other useful and commands that solves repetative tasks. The link to that project is here - empty for now.

Project Architecture Explanations

!TODO

Packages used in this project

  • Gin - The fastest full-featured web framework for Go. Crystal clear.
  • dig - A reflection based dependency injection toolkit for Go.
  • GORM - The fantastic ORM library for Golang
  • BurntSushi/toml - TOML parser for Golang with reflection.

TODOs

API Documentation

Link to the API Documentation is here.

Important

Before running endpoints in that documentation, you have to run this server codes first.

Caution

This project is using MySQL as the database. So, you need to change the dialect and driver of the GORM if you are planning to run with another RDB.

Contributions

Everyone is welcomed to blame and contribute to this project if it is for the purpose of making the structural of the project better. But remember this is not a framework or library.

About

An example of Clean Architecture Implementation in Go using Gin, GORM, and dig.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages