gofolderingproject

GO Foldering Project is a project structure that I often use for my development using clean architecture (combination a few architecture, pattern that we think make our development better) approach.

Getting started

Before start, please run this

go mod install
go mod tidy
go mod vendor

How To Try to Run

make start-public

Structure of Project

  • cmd: Application dependency injection and entrypoint
    • rest
    • grpc
  • config: Read configuration from any sources (such as .env, yaml, etc) and maintain our config with Viper
  • init: manually sql schema execution
  • internal: internal logic
    • delivery: handler / port
    • helper: this folder is used for helper function
    • middleware: any middleware functions are here
    • model: data structure or struct
    • repository: is a folder using a repository pattern to connect with database (NOSQL or SQL) or another service
    • usecase: business logic
  • pkg: folder to connect with other package or wrap other library that we want to use
  • Dockerfile
  • main.go
  • Makefile
  • README.md

Notes: SSL configuration (key & certificate) must be saved on the save place. We use it to make secure connection both HTTP and gRPC web server

Tech Stack

Integrate with your tools

How to Contribute

Please flow Github Flow
https://docs.github.com/en/get-started/quickstart/github-flow

image githubflow