This repository contains all code that is submitted as part of Evermos Backend Assessment.
Running Locally Requires:
- Go 1.17+
- MySQL
- GORM
- Gin Framework
This is the solution to **Question 1 of Evermos Backend Engineer Task
- Clone this repository.
- Go to
task-store
folder. - Configure your database in line with
.env
file and run the migrations inmigrations
folder and rungo run main.go migrate
go run main.go
- Error caused by no validation in database to avoid inventory become negative
- No notification of error that prevent costomer to order product that currently has no inventory.
- Concurenncy, if there are multiple customer order at the same time, some of customer order might be not recorded in databases.
- Set validation minimum 0 stock in database.
- use many layer checking & transactional on order.
- Set sync in "order" function to make multiple order executed after another if coming at the same time..
This is the solution to **Question 2 of Evermos Backend Engineer Task
I did two function to generate probabilities of treasure and generate layout of treasure map.
To run locally, simply go into task-treasure
directory and run go run main.go
. The list of coordinates and map layout will be generated.