gaurab13 / delivery-routes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delivery Routes App

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

yarn install or npm install

Installs all the required dependencies.

yarn start or npm run start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test or npm run test

Launches the test runner in the interactive watch mode.

Application Details

The application is loaded with a default set of Routes. The Routes are plotted using [react-digraph] in a canvas in a default position. Each node in the graph represents a town and the arrows between two nodes represents the path and the delivery cost between those nodes. You can always change the position of the nodes by clicking and dragging the nodes in the graph to your liking. The updated positions will be respected and maintained by the app.

Routes Section

We can also add new routes in the Routes section of the app. Routes have to be of the format 'AB1' which is read as a route between town 'A' and town 'B' with cost of 1. The added new routes will be automatically reflected in the application.

Routes Section

Case 1 Section

This section helps up in calculating the delivery cost for a given delivery route. The delivery routes are to be represented as towns separated by hyphen. For example a delivery route from town A to town B to town C will be represented as A-B-C. The delivery cost for the given routes will be populated automatically when valid routes are entered.

Case 1 Section

Case 2 Section

This section helps us in calculating the number of possible delivery routes between any two given towns. The number of routes are populated autmatically when the towns are entered. We can also set a maximum number of towns constraint, it is set as 5 by default.

Case 2 Section

About


Languages

Language:JavaScript 90.4%Language:HTML 5.2%Language:SCSS 4.4%