This repository contains the implementation for simple e-commerce API based on jubelio store data
So while the product and adjustment_transaction are quite straightforward, but on the product_stock, we use irreversible historical-based data, means that every stock move must be recorded and had to be sequential (old data should not be updated directly since it tamper with the data consistency).
Why we do this rather than just adding qty column and update it directly? because, for example, as a business owner, I want to know the historical data to make sure it's consistent and to make sure there are no data tampering from employee or another person
docker-compose up
yarn install
yarn tsc
yarn migrate
yarn serve
- Postgresql
- Redis
you may change the configuration/environments that is set, on docker-compose file
yarn tsc
yarn migrate
yarn serve