Below you will find some information on how to setup and perform common tasks.
Download this repository and install from source.
git clone https://github.com/chrismcdev/small-distance-courier-service.git
cd small-distance-courier-service
yarn install
yarn link
Usage: kiki <action> <file>
Estimate the total delivery cost of each package with an offer code (if applicable).
Example:
kiki delivery-cost ./src/__mocks__/fetch-delivery-cost-input.json
Calculates the estimated delivery time for every package by maximizing number of packages in every shipment.
Example:
kiki delivery-time ./src/__mocks__/fetch-delivery-time-input.json
The input file is validated with JSON Schema specific to each feature, schemas can be found here.
The facade SmallDistanceCourierService
has two sub-systems Parcel
and Coupon
that are instantiated within the facade. This facade manages the full lifecycle of the objects it uses.
The FFD algorithm is used to decide how many shipments are needed and what parcels to load in each shipment based on weight.