Skip to content

codeclubvn/echo-template

Repository files navigation

Echo-Template

Tech stack

Architecture

  • Source code base on Domain Driven Design & Clean Architecture
  • Base on Clean Architecture source code Architecture by Uncle Bob

Clean Architecture is a software development architecture that has become a standard for building easily maintainable, platform-independent, and source code-reusable applications. Below are some important benefits of using Clean Architecture

Project structure


├── makefile # run makefile to run project
├── cmd
│   ├── main.go # entry point
├── presenter
│   ├── controller # To handle requests from clients and return responses
│   ├── middleware # Middleware to handle requests before reaching the controller
│   ├── request # Request struct
│   ├── router # Router
│   ├── docs # Swagger docs
├── usecase # business logic
├── domain
│   ├── assets # save file uploaded
│   ├── entity # database entity
│       ├──  # response.go # struct mapping model to response
│   ├── repo # repository interface
│       ├── model # struct mapping database table
├── pkg
│   ├── api_errors # error response
│   ├── lib # Set up external libraries.
│   ├── constants # constants
│   ├── utils # utils
├── infra # config connecting to external services
├── boostrap # dependencies injection modules
├── config # config file
│   ├── app.env # environment variables
│   ├── config.yaml # config file
│   ├── config.go # load config file
├── migration # Database migrations

Database

Database design

How to run

  • Install Postgres
  • Install Golang
  • Get KeyAPI of Cloudinary
  • Clone this project
  • Create database
  • Create .env & config.yml file in config folder
  • Run make to run project
  • Run mockery --dir=domain --output=domain/mocks --outpkg=mocks --all to generate mock file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages