Skip to content

danielotieno/way-farer-api

Repository files navigation

Build Status Maintainability Test Coverage

Welcome to WayFare Booking Service API

WayFarer is a public bus transportation booking service.

An API that will provide a fucntionality for WayFarer Admins to be able to create and manage trips.

App is available at wayfarer

Application features

Appart from normal authentication the app will provide the following functionality

  • Creating Trips
  • Booking a Trip

An Admin user can perform the following:

  • Create a trip.
  • Cancel a trip.
  • See all trips.
  • See a specific trip.
  • See all bookings.

A normal user can perform the following:

  • See all trips.
  • See a specific trip.
  • Book a seat on a trip.
  • See his/her bookings.
  • Delete a booking

The following endpoints should be available to use once the API is complete:

EndPoint Functionality
POST /api/v2/auth/signup Create user account
POST /api/v2/auth/signin Login a user
POST /api/v2/trips Create a trip.
GET /api/v2/trips/<:trip-id> Get a specific trip.
GET /api/v2/trips Get all trips
PATCH /trips/<:trip-id>/cancel Cancel a trip
POST /api/v2/bookings Book a seat on a trip
GET /api/v2/bookings View all bookings.
DEL /api/v2//bookings/<:booking-id> Delete a booking.

Technologies used to build the application

Expressjs Framework

Jestjs Testing Framework

Getting started with the application

download and install nodejs.

install Yarn version for your operating system.

Clone the repo here to your local machine

Create a .env file. Copy the contents of .env.sample file and paste them in your .env file.

Install dependencies

yarn install

Then run the command below to run test

yarn run test

Then run the command below to start the application in development mode

yarn start:dev

Switch to the master branch for stable/working features

git checkout master

The application is under constant development. The develop branch has the latest changes added into the app

About

WayFarer is a public bus transportation booking service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published