Skip to content

Example of Clean Architecture implementation with Golang

Notifications You must be signed in to change notification settings

fikriyusrihan/golang-clean-arch

Repository files navigation

Clean Architecture with Golang 🏗️

Example of Clean Architecture implementation with Golang. Read more information about Clean Architecture.

This project has 4 layers and each layer has a role as following:

Directory Layer
domain Entities
infrastructure Frameworks & Drivers
interface Interface Adapters
usecase Use Cases

Tools

  • Echo (Web Framework)
  • PostgreSQL (RDBMS)
  • Testify (Testing)
  • Viper (Configuration)
  • Docker (Containerization)

Run the Applications

This repository requires Docker to run.

# move to directory
cd workspace

# clone repository
git clone /~https://github.com/fikriyusrihan/golang-clean-arch.git

# move to project
cd golang-clean-arch

# build and run container
docker compose up

# call an endpoint
curl -X GET http://localhost:8000/v1/books -i

# stop container
docker compose down

Special Thanks

I learn a lot about Clean Architecture with Golang from Manakuro's Repository and Iman Tumorang's repository. Kindly check their repository and article on Medium.

About

Example of Clean Architecture implementation with Golang

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published