Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maia14/delivery-managment
A system management for deliveries. System supports concurrent deliveries requests according timeslots constraints. Developed using Node.js + TypeScript, express, fs and external APIs.
https://github.com/maia14/delivery-managment
api-rest backend-service filesystem nodejs typescript
Last synced: about 8 hours ago
JSON representation
A system management for deliveries. System supports concurrent deliveries requests according timeslots constraints. Developed using Node.js + TypeScript, express, fs and external APIs.
- Host: GitHub
- URL: https://github.com/maia14/delivery-managment
- Owner: MaiA14
- Created: 2022-12-05T17:46:41.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-11T20:25:11.000Z (about 2 years ago)
- Last Synced: 2024-11-09T01:52:09.604Z (about 2 months ago)
- Topics: api-rest, backend-service, filesystem, nodejs, typescript
- Language: TypeScript
- Homepage:
- Size: 68.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Delivery management
A system management for deliveries. System supports concurrent deliveries requestes according timeslots constraints.
## Prerequisites
The following technologies should be installed globally
* Node (preferred version / project version - 14.15.3)
* ts-node
* TypeScript
* Nodemon## Installation
Before running this project install node modules in both server with this command:
```
npm install
```Run Server with the command:
```
nodemon server.ts
```## Assumptions
* Since Holiday API free version supports only in last year data, I consider last year as this year. Upcoming week is current range of dates of last year.
* address.json is a static json contain 2 addresses for the simplicity of creating timeslots.
* In order to support concurrency while booking a delivery, processing delivery conatins "pending" status. pendingDeliveries.json works like a queue.
* Limitation of up to 10 deliveries in a day is reflcated by the number of timeslots range, for simplicity.
* Available timeslot is a timeslot with less than 2 deliveries.## Scenarios:
* Book a delivery when timeslot reached to its limit:
![Image of delivery booking](https://i.ibb.co/74TFN4w/delivery.png)![Image of delivery booking](https://i.ibb.co/hV1zqCk/delivery2.png)
* Book a delivery when the address is unsupported:
![Image of delivery booking](https://i.ibb.co/ZNy0rdL/delivery3.png)* Book a delivery - placed successfully (timeslot available):
![Image of delivery booking](https://i.ibb.co/4PnXxVB/delivery4.png)* Daily deliveries (placed only)
![Image of delivery booking](https://i.ibb.co/YTbzV53/delivery5.png)* Mark delivery as completed:
![Image of delivery booking](https://i.ibb.co/m6JHjv0/deliverycom.png)* Weekly deliveries (placed only)
![Image of delivery booking](https://i.ibb.co/bLX5TnG/delivery6.png)* Structured address:
![Image of delivery booking](https://i.ibb.co/Xy2zdSz/timeslots1.png)* Timeslots by address (available only, less than 2 deliveries):
![Image of delivery booking](https://i.ibb.co/7yZFm9t/timeslots2.png)