The core of jabar portal services
- Golang - https://go.dev//
- Echo Framework - https://echo.labstack.com//
- Elasticsearch - https://www.elastic.co//
- MySQL - https://www.mysql.com/
- Redis - https://redis.io/
- AWS - https://aws.amazon.com/
This project has 4 Domain layer :
- Domain Layer
- Repository Layer
- Usecase Layer
- Delivery Layer
├── .github/ * all workflows github actions
└── workflows/
├── docker/
├── src/
└── cmd/ * all the command of app here.
└── config/ * contains config like db, aws, redis, etc.
└── database/ * database migrations etc.
└── domain/ * all the contract, struct, interface etc.
└── helpers/ * contains a helpers function etc.
└── utils/ * contains utilities of email, conn, apm etc.
└── policies/ * policies of authorized user.
└── middleware/ * request's middleware.
└── modules/ * contains modules of application.
└── <delivery>
└── <http>
└── <name>_handler.go * contains file of delivery handler.
└── <repository>
└── <mysql>
└── <name>_mysql.go * contains file of repository mysql, etc.
└── <usecase>
└── <name>_ucase.go * contains file of busines logic / usecase.
└── ...
Since the project already use Go Module, I recommend to put the source code in any folder but GOPATH.
$ make testHere is the steps to run it with docker-compose
#move to directory
$ cd workspace
# Clone into YOUR $GOPATH/src
$ git@github.com:jabardigitalservice/portal-jabar-api.git
#move to project
$ cd core-service
# Build the docker image first
$ make docker
# Run the application
$ make run
# check if the containers are running
$ docker ps
# Execute the call
$ curl localhost:7070
# Stop
$ make stopThe worker for provided core-service some cron-job process
Currently this service have 2 jobs :
- Archiving News
- Publishing News
├── docker/
├── src/
└── cmd/ * all the command of app here.
└── config/ * contains config like db, aws, redis, etc.
└── job/ * job functions.
└── utils/ * contains utilities of email, conn, apm etc.
Since the project already use Go Module, I recommend to put the source code in any folder but GOPATH.
Here is the steps to run it with docker-compose
#move to directory
$ cd workspace
#move to project
$ cd service-worker
# Build the docker image first
$ make docker
# Run the application
$ make run
# Stop
$ make stop