This is a send IT Repository for a SendIT Courier Project
SendIT is a online courier service for sending parcel from one location to the other.
These instructions will get you a copy of the project up and running on your machine for development and testing purposes. see deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them
- A stable Node Software
- A preferred Text editor of your choice
- A Web Browser
Carry out this on command line
- npm clone https://github.com/obasajujoshua31/SendIT
- cd SendIT
- npm install
- open the project with your preferred Code Editor
- npm run createdb - to create user tables and parcel tables
- npm run coverage - to generate coverage reports
- npm run serve - to start the serve once the database is set up locally
- npm run alterdb - to alter the parcel table - this includes columns for map details.
- npm run test - to run test
- npm run coverage - to generate test coverage report
Npm run test
- Test the routes from api.test.js, auth.test.js and generate reports with NYC
- GET /api/v1/parcels - Get all parcels
- GET /api/v1/parcels/<parcel_id> - Get parcel by Parcel Id
- GET /api/v1/users/<user_id>/parcels - Get parcel by User Id
- GET /api/v1/users - Get all users - Only available to Admin
- POST /api/v1/parcels - post new parcel
- parameters weight - Weight of the parcel weightMetric - Weight metric in Kg or g only from - parcel pick up location to - parcel destination parcelName - the name of the parcel estimatedDistance - distance estimated from google Map estimatedDuration - duration estimated from the google distance matrix estimatedCost - cost estimated from the calculation with the rate
- PUT /api/v1/parcels/<parcel_id>/cancel - to cancel a parcel order only by the user who created it.
- PUT /api/v1/parcels/<parcel_id>destination - to change the destination of a parcel order - this is only possible if the order is not cancelled or not delivered.
- PUT /api/v1/parcels/<parcel_id>presentLocation - to change the present Location of a parcel order - this is only possible by the a admin.
- PUT /api/v1/parcels/<parcel_id>status - to change the status of an order to either Transiting or Delivered. No access to Cancel by the Admin.
- POST /api/v1/auth/signup - to sign up a user expected parameters - email - email of the person who intends to register if not exists password - set password of the person who intends to register firstName - the firstName of the person who intends to register lastName - the lastName of the person who intends to register
- POST /api/v1/auth/login - to sign in a registered user expected parameters - email - email of the user password - the password of the user
- POST /api/v1/account/recovery - expected parameters - email - email of the registered user firstName - the first Name of the registered user
- PUT /api/v1/account/recovery - password - new password of the registered user passwordConfirmation - password confirmation for the registered user
- Google places to help with address
- Google distance Matrix to determine the distance between two points
- Google Map to confirm pickUp location and expected destination
- Email notification for updated parcel and status by Admin.
- Express - The nodejs web application Framework used
- Mocha - the framework used to generate test
- JsonWebToken - for securing end points.
- Dotenv - for installing environment variables
- Airbnb - for linting code
- SendGrid - Email service provider
- pg - connecting to node postgress
- babel - used to transpile to es5 javascript
Obasaju Joshua