Giter VIP home page Giter VIP logo

sendit's Introduction

Build Status

SendIT

SendIT is a courier service that helps users deliver parcels to different destinations. SendIT provides courier quotes based on weight categories.

link to the front-end vanillia JS implementation:

Features

  • Users can create an account and log in.
  • Users can create a parcel delivery order.
  • Users can change the destination of a parcel delivery order.
  • Users can cancel a parcel delivery order.
  • Users can see the details of a delivery order.
  • Admin can change the status and present location of a parcel delivery order.

Application Features

  • Users can sign up
  • Users can sign in
  • Users can edit their password
  • Users can Recover their lost password
  • Users can create a parcel delivery order
  • Users can view their account details
  • Users can cancel their parcel delivery order, only if it has not been delivered
  • Users can change the destination of their parcel delivery order, only if it has not been delivered
  • Users can only view their individual parcel deliver order(s)
  • Only admin can change the status of a parcel delivery order, but only if it has not been delivered
  • Only admin can update the present location of a parcel delivery order, only if it has not been delivered
  • Only admin can view all parcel delivery order(s) in the database

Technology Stack

  • NodeJS
  • Express
  • JavaScript
  • HTML
  • CSS
  • Postgresql Relational Database

Getting Started

  • Install NodeJs and Postgresql (PGAdmin 4 preferably) locally on your machine or signup to an online hosted database e.g ElephantSql
  • Clone the repository from bash or windows command
> $ `git clone https://github.com/mrkingz/SendIT.git
  • Change into the directory
> $ `cd /SendIT`
  • Install all required dependencies with
> $ `npm install`
* After successful installation, create a `.env` file which will be used to load environment variables 
 > see .env.example file as a sample
  • Create a databse for the application with the database name specified in your env file

  • Migrate your database schemas using

> $ `npm run migrate:dev`
* Run the following command to start the application
```sh
> $ `npm run start:dev`

Using the Application

Routes

  • POST api/v1/auth/signup: sign up a new user. Required fields are:

    • firstname
    • lastname
    • email
    • password
  • POST api/v1/auth/login: sign in a registered user. Required fields are:

    • email
    • password
  • POST api/v1/parcels: create a parcel delivery order. Required fields are:

    • weight
    • description (Optional)
    • deliveryMethod
    • pickupAddress
    • pickupCity
    • pickupState
    • pickupDate
    • destinationAddress
    • destinationCity
    • destinationState
    • destinationAddress
    • receiverName
    • destinationPhone
  • GET api/v1/parcels: Get all parcel delivery orders by admin.

  • GET api/v1/parcels/:parcelId: Get a specific parcel delivery order by admin.

  • GET api/v1/users/:userId/parcels: Get a user all parcel delivery orders.

  • GET api/v1/users/:userId/parcels/:parcelId: Get a user specific parcel delivery order.

  • PUT api/v1/parcels/:parcelId/cancel: Cancel a user parcel delivery order.

  • PUT api/v1/parcels/:parcelId/destination: Update the destination of a parcel delivery order. Required fields are:

    • destinationAddress
    • destinationCity
    • destinationState
  • PUT api/v1/parcels/:parcelId/status: Update the delivery status a parcel delivery order by admin. Required field is:

    • deliveryStatus
  • PUT api/v1/parcels/:parcelId/presentLocation: Update the present location of a parcel delivery order by admin. Required field is:

    • presentLocation

Testing

  • Run Test $ npm run tests

Application Limitations

  • Only one admin can exist
  • Users can only create account once with their full name, email and password
  • Users will have to obtain a fresh token after 72 hours when their session has expired
  • Users will only be able to access the full application functionalities only if they are signed in

How To Contribute

  • Fork the repository
  • Create a feature branch with a feature.md file
  • Write tests and make them pass
  • Open a pull request

sendit's People

Contributors

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