Skip to content

Efishery Interview Test 2022 : The two service is microservice monorepo using python flask and golang. Snake and Clean Gopher.

Notifications You must be signed in to change notification settings

muchlist/the-two-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

the-two-service

Two restfull-api service build with go and python

Demo API (online)

(pada swagger jangan lupa untuk melihat pilihan servers)

Installation

- Install with only docker-compose

Copy docker-compose-zero.yml to local machine Run docker compose with custom filename (or can just rename it)

docker-compose -f docker-compose-zero.yml up

- Install with clone repository

Clone this project

git clone https://github.com/muchlist/the-two-service.git

Go to the project directory

cd the-two-service

Start the server with docker compose

docker-compose up -d

Documentation

Markdown API DOC

You can also use swagger spec and paste to swagger editor (Swagger Editor)

Swagger file :

C4 Document

Context

context

Container

container

Component

component

Unit Test

unittest

unit test in service layer

ok      fetch-api/bussiness/service     0.006s  coverage: 90.5% of statements
ok      fetch-api/pkg/conv      0.003s  coverage: 100.0% of statements
ok      fetch-api/pkg/mjwt      0.004s  coverage: 72.1% of statements
ok      fetch-api/pkg/slicer    0.002s  coverage: 87.9% of statements

Authors

Goals

  • Servers bisa dinyalakan di port berbeda
  • Semua endpoint berfungsi dengan semestinya (4 endpoint auth, 3 endpoint fetch)
  • Dokumentasi endpoint dengan format OpenAPI (API.md)
  • Dokumentasi system diagram-nya dalam format C4 Model (Context, container, component)
  • Pergunakan satu repo git untuk semua apps (mono repo)
  • Dockerfile untuk masing-masing app
  • Petunjuk penggunaan dan instalasi di README.md yang memudahkan

Additional Goals

  • Deployed ke Host/Penyedia Layanan (semacam surge, heroku, vercel, firebase, glitch, host anda pribadi)
  • Docker Compose
  • Unit Testing

Warning

  • All credential file exposed to make it easier in terms of testing. In Prod we need to gitignore or just change name of .env file.
  • To keep it simple, many things are not implemented in this system. let say : better log management with request id, Metric, Profiling.

About

Efishery Interview Test 2022 : The two service is microservice monorepo using python flask and golang. Snake and Clean Gopher.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published