WayFarer is a public bus transportation booking server
https://www.pivotaltracker.com/n/projects/2359647
https://wayfarerapiv1.herokuapp.com/
- Node JS
- Express JS
- Postgresql DATABASE
- Node JS
- Express
- Babel
- Passport
- passport-jwt
- Mocha & Chai
- ESLint
- Validator
- Jwt
- Morgan
- Bcrypt
- pg
- dot env
- faker
To install and run the project you need to do the following:
Create the folder you wish to run the project in
Clone the repository: git clone https://github.com/iyiolaosuagwu/WayFarer in the folder you created
Install all dependencies by running the command: yarn or npm install
Start the server by running thhe command: yarn start or npm start
Navigate to localhost: 6000/api/v1 in your browser to view the running application
To run unit tests run the command : yarn run test in the command line terminal
HTTP VERB | ENDPOINT | FUNCTIONALITY |
---|---|---|
POST | /api/v1/auth/signup | User signup |
POST | /api/v1/auth/signin | User signin |
POST | /api/v1/trips | Create a trip |
POST | /api/v1/bus | Create a bus for a trip |
POST | /api/v1/bookings | Book a seat on a trip |
GET | /api/v1/users | Admin can View all registered users |
GET | /api/v1/trips | View all trips |
GET | /api/v1/bus | View all bus available for a trip |
GET | /api/v1/trips?filter_by=origin | View trips by origin |
GET | /api/v1/trips?filter_by=destination | View trips by destination |
GET | /api/v1/bookings | View all bookings |
GET | /api/v1/user/bookings | View all users bookings |
GET | /api/v1/bookings/:bookingId | View bookings by booking ID |
PATCH | /api/v1/trips/:tripId | Cancel a trip |
PATCH | /api/v1/bookings/:bookingId | user can update seat number after booking a trip |
DELETE | /api/v1/bookings/:bookingId | Delete a booking |
Install Postman and navigate localhost: 3000/api/v1/ to test API endpoints
- Users can sign up
- Users can login
- Users can booking a seat on a trip.
- Users can view booking by ID
- Users can delete their booking.
- Users can get a list of filtered trips based on origin.
- Users can get a list of filtered trips based on destination.
- Users can specify their seat numbers when making a booking.
- Users can change seat after booking a trips.
- Admin can create a trip.
- Admin can cancel a trip.
- Both Admin and Users can see all trips.
- View all bookings. An Admin can see all bookings, while user can see all of his/her bookings.
- Admin can see all registered users