Skip to content

devlab-id/portal-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,510 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card Maintainability
ci workflow GitHub issues
GitHub stars GitHub forks

core-service

The core of jabar portal services

Tech Stacks

Description

This project has 4 Domain layer :

  • Domain Layer
  • Repository Layer
  • Usecase Layer
  • Delivery Layer

Repo Structure core-service

├── .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.
└── ...

How To Run This Project

Since the project already use Go Module, I recommend to put the source code in any folder but GOPATH.

Run the Testing

$ make test

Run the Applications

Here 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 stop

service-worker

The worker for provided core-service some cron-job process

Description

Currently this service have 2 jobs :

  • Archiving News
  • Publishing News

Repo Structure service-worker

├── 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.

How To Run This Project

Since the project already use Go Module, I recommend to put the source code in any folder but GOPATH.

Run the Applications

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages