To view the preview page please CLICK HERE.
This project written in Java language and Spring Framework, represent Implementation of a Delivery API containing the following functionality:
A delivery window containing start time, end time and supported addresses.
👉 The two sources below will be fetched in parallel in order to validate the resulted timeslots:
• A local static json file named 'courierAPI.json'
is loaded when the program is starting. This file contains the available timeslots for the upcoming week.
• Courier timeslots that fall on holidays will be excluded. For this part I have used HolidayAPI (https://holidayapi.com/docs).
👉 Each timeslot can be used for 2 deliveries.
Contains status & selected timeslot. Business capacity - the system supports up to 10 deliveries per day. To make sure that the system supports 10 deliveries per day, I used Github's library named Bucket4j.
I have used Geoapify API to locate correct addresses (https://www.geoapify.com/geocoding-api) into an object that holds the address data (such as: street, line1, line2, country, postcode, etc...).
NOTE: This program is really simple, at this moment the program does not support concurrent requests. These days I am working on a new project to upgrade this one by using Spring WebFlux To handle concurrent requests.
Geoapify (https://www.geoapify.com/geocoding-api)
To locate correct addresses.
HolidayAPI (https://holidayapi.com/docs)
To exclude holidays from timeslots.
Bucket4j Github's library
To manage system delivery capacity per day.
Parameter | Type |
---|---|
address |
Address |
http://localhost:8080/api/timeslots
Parameter | Type |
---|---|
searchTerm |
String |
http://localhost:8080/api/resolve-address
Parameter | Type |
---|---|
createDeliveryDto |
CreateDeliveryDto |
http://localhost:8080/api/deliveries
Parameter | Type |
---|---|
deliveryId |
Long |
http://localhost:8080/api/deliveries/{deliveryId}/complete
Parameter | Type |
---|---|
deliveryId |
Long |
http://localhost:8080/api/deliveries/{deliveryId}
Parameter | Type |
---|---|
none |
none |
http://localhost:8080/api/deliveries/daily
Parameter | Type |
---|---|
none |
none |
http://localhost:8080/api/deliveries/weekly
Language & Framework:
Java
Spring Framework
Database:
SQL
MySQL
Spring Hibernate JPA (SQL)
Libraries and External API’s:
Geoapify (https://www.geoapify.com/geocoding-api)
HolidayAPI (https://holidayapi.com/docs)
Bucket4j Github's library
Caching & Scheduling Mechanisms:
Spring Scheduling
Spring Hibernate JPA + MySQL as a local cache memory
Client-Side UI:
HTML
CSS
Bootstrap 5
JavaScript
Thanks for reading,
Chelly 👩🏻💻