WayFarer is a public bus transportation booking server, built for ABL
- Signup and Login
- View all your trips
- Create a booking
- View all your bookings
- Filter your search by origin and destination
- Signup and Login
- Create a Trip
- View all trips
- Create a booking
- View all bookings
- Filter your search by origin and destination
Clone repo to your local machine:
git clone https://github.com/mustaphee/wayfarer.git
Install dependencies and run locally
Note>> Install npm if not already installed on local machine
Then run:
npm install
Create .env like the .env.sample file, just replace with your own enviroment variables.
Now start the server:
yarn run db
npm run dev /* Keep watching files for changes */
To run tests:
npm run test
API is deployed at here on heroku. API documentation (POSTMAN) is here here
HTTP VERB | ENDPOINT | FUNCTIONALITY |
---|---|---|
POST | /api/v1/auth/signup | Create user account |
POST | /api/v1/auth/signin | Sign in to user account |
POST | /api/v1/trips | Create Trips |
GET | /api/v1/trips | To view all trips |
PATCH | /api/v1/trips/:tripId | Cancel a trip |
POST | /api/v1/bookings | Book a seat |
GET | /api/v1/bookings | View all booked seat |
DELETE | /api/v1/bookings/:bookingId | Delete meal |
GET | /api/v1/bookings/:origin | Filter bookings by origin |
GET | /api/v1/bookings/:destinations | Filter bookings by destinations |