This service is build with Clean Architecture and handler is the core of service. All domains of service will be put there, in this case we already have security
, users
, and template
. Every single domain will have packages in their domain such as delivery
, usecase
, entity
, models
, and payload
. You can put anything there based on your needs.
Let's define the purpose of packages inside of the domain:
- delivery: Focusing on manage all of input and output from the client side. The request can be from rest, grpc, message broker, etc.
- usecase: Focusing on business logic.
- entity: Focusing on repository.
- models: Describing the attributes of repository.
- payload: Describing the attributes of input and output.
First of all, this step-by-step is for user with linux / mac os only. If you are windows user you need to configure several things by yourself. After that, let's follow this guide:
- Make sure you already install Golang
- Make sure you already have a Docker
- Make sure you already installed https://github.com/codegangsta/gin
- Copy the
.env_backup
and paste it as.env
- Running this command
source .env
- Running this command
docker-compose up -d
- Running this command
cd app && make run