Two restfull-api service build with go and python
-
Auth App : https://efish-auth.muchlis.dev
-
Auth App Swagger : https://efish-auth.muchlis.dev/swagger
-
Fetch App : https://efish-fetch.muchlis.dev
-
Fetch App Swagger : https://efish-fetch.muchlis.dev/swagger
(pada swagger jangan lupa untuk melihat pilihan servers)
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
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
You can also use swagger spec and paste to swagger editor (Swagger Editor)
Swagger file :
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
- 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
- Deployed ke Host/Penyedia Layanan (semacam surge, heroku, vercel, firebase, glitch, host anda pribadi)
- Docker Compose
- Unit Testing
- 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.