Skip to content

gustavofreze/cheap-delivery

Repository files navigation

Cheap Delivery

License

Overview

Company XPTO held a drawing among players from all over Brazil. However, the prizes need to be delivered to the winners. To achieve this, it is necessary to implement a system that calculates the lowest shipping cost for each award based on the distance to the winner and the weight of the prize. When contacting carriers, we received the following transportation conditions:

Carrier Fixed value Value per km/kg
DHL R$ 10,00 R$ 0,05
FedEx R$ 4,30 R$ 0,12
Loggi (up to 5kg) R$ 2,10 R$ 1,10
Loggi (5kg and up) R$ 10,00 R$ 0,01

Use cases

Queries

Installation

Repository

To clone the repository using the command line, run:

git clone https://github.com/gustavofreze/cheap-delivery.git

Configuration

To install project dependencies locally, run:

make configure

To start the application containers, run:

make start

Tests

Run only unit tests:

make unit-test

Run only integration tests:

make integration-test

Run all tests:

make test 

Displays coverage reports in the browser:

make show-reports 

Review

Run static code analysis:

make review 

You can check other available commands by running make help.

Environment Setup

Access URLs

Environment DNS
Local http://cheap-delivery.localhost

Database

Environment URL Port
Local jdbc:mysql://localhost:3307 3307