Giter Site home page Giter Site logo

itsmechelly / delivery-application Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 88 KB

This project written in Java language and Spring Framework, represent Implementation of a Delivery API containing few functionalities

Home Page: http://delivery-application.s3-website-eu-west-1.amazonaws.com/

Java 100.00%
bucket4j caching geoapify holidayapi spring-framework

delivery-application's Introduction

delivery-application

To view the preview page please CLICK HERE.

🤔 What is the purpose of this application?

This project written in Java language and Spring Framework, represent Implementation of a Delivery API containing the following functionality:

💬 Timeslot

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.

💬 Delivery

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.

💬 Address

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...).

Extra Details

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.

External API I have used in this project

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.

Endpoints

👉 TimeslotController:

POST: retrieveAllAvailableTimeslots (Address address)

Parameter Type
address Address
 http://localhost:8080/api/timeslots

👉 AddressController:

POST: resolveAddress(String searchTerm)

Parameter Type
searchTerm String
 http://localhost:8080/api/resolve-address

👉 DeliveryController:

POST: bookDelivery(CreateDeliveryDto createDeliveryDto)

Parameter Type
createDeliveryDto CreateDeliveryDto
 http://localhost:8080/api/deliveries

POST: completeDelivery(Long deliveryId)

Parameter Type
deliveryId Long
 http://localhost:8080/api/deliveries/{deliveryId}/complete

DELETE: cancelDelivery(Long deliveryId)

Parameter Type
deliveryId Long
 http://localhost:8080/api/deliveries/{deliveryId}

GET: getAllDailyDeliveries()

Parameter Type
none none
 http://localhost:8080/api/deliveries/daily

GET: getAllWeeklyDeliveries()

Parameter Type
none none
 http://localhost:8080/api/deliveries/weekly

🛠 Tech Stack

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 👩🏻‍💻

delivery-application's People

Contributors

itsmechelly avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.