Coder Social home page Coder Social logo

sendit-api-v2's Introduction

SendIT-Api

Build Status Coverage Status Codacy Badge Hackage-Deps

SendIT is a courier service app that helps users deliver parcels to different destinations.

Built with

  • Python 3.7.1
  • Flask 1.0.2
  • PostgreSQL 11.0

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.

And also:

  • The user gets real-time email notification when Admin changes the status of their parcel.
  • The user gets real-time email notification when Admin changes the present location their parcel.
  • The app stores Location details and computes travel distance between the pickup location and the destination.

Installation

Want to contribute Great!

Create a virtual environment for the project.

virtualenv "name of the virtual environment"

Then Activate the venv using:

source "name of the virtual environment/bin/activate

Navigate to the application directory:

git clone https://github.com/CryceTruly/SendITApi-v2.git
cd SendITApi-v2
git checkout develop

Create a virtual environment to install the application in. You could install virtualenv and virtualenvwrapper. Within your virtual environment, install the application package dependencies with:

pip install -r requirements.txt

Run the application with:

python run.py

for tests run in terminal using:

py.test --cov

URL endpoints

URL Endpoint HTTP Methods Summary
api/v2/parcels POST Creates a new Parcel delivery order
api/v2/parcels/<int:id> GET Retrieves a specific parcel
api/v2/parcels/<int:id>/cancel PUT Cancels a specific parcel
api/v2/users GET Retrieve all users
api/v2/auth/signup POST Creates a new User
api/v2/auth/login POST Log in a user
api/v2/parcels/<parcelId>/destination PUT Change the desination of a specific order
api/v2/parcels/<int:parcelId>/status GET Retrieves parcel orders for a specific user
api/v2/parcels/<parcelId>/presentLocation PUT Change the present location of a specific parcel delivery order
api/v2/users/<int:id>/parcels GET Retrieves parcel orders for a specific use
api/v2/auth/logout POST Logs out a user

Example New User body

Example body
{
"fullname":"fullname",
"username":"username",
"phone_number":"0756778877",
"email":"[email protected]",
"password":"password"

}

Example New Parcel Body

{
	"recipient_name": "Aron Mike",
            "parcel_description": "Here are my stuff",
            "weight":90,
            "quantity": 22,
            "pickup_address":"Mukono",
            "destination_address":"Entebbe",
            "recipient_phone_number":"0767878787",
            "recipient_email":"[email protected]"
}

Example Changedestination body

{
	"destination_address": "Mumbai"
}

Example Changestatus body

{
	"status": "Delivered"
}

Deployement

Heroku Deployement

Todos

  • Write MORE Tests
  • Format addresses
  • Build a mobile app

License

MIT

Author

Cryce Truly

sendit-api-v2's People

Contributors

crycetruly avatar dependabot-preview[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sendit-api-v2's Issues

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.