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
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. |
Expressjs Framework
Jestjs Testing Framework
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
git checkout master
The application is under constant development. The develop
branch has the latest changes added into the app