WayFarer is a public bus transportation booking server.
- Node.js
- Express.js
- Babel
- postgres-node
- Heroku
- Swagger doc
- Mocha
- Chai
- Travis
- Coverall
- Code Climate
- Clone the app
git clone https://github.com/komsic/Wayfarer.git
- Checkout to develop branch
git checkout develop
- Run npm install
- Run npm start
- Run npm test for testing
| S/N | Request type | API description | Endpoint |
|---|---|---|---|
| 1 | POST | Create a user | /auth/signup |
| 2 | POST | Login a user | /auth/signin |
| 3 | POST | Create a trip | /trips |
| 4 | GET | Get all trips | /trips |
| 5 | POST | Book a seat on a trip | /bookings |
| 6 | GET | View all bookings. User can only see bookings that belongs to then | /bookings |
| 7 | PATCH | Cancel a trip | trips/:tripId |
| 8 | DELETE | Delete a booking | /bookings/:bookingId |
| 9 | GET | Filter trip by origin or destination | /trips?origin=[]&destination=[] |
| 10 | PATCH | Change user seat | /bookings/:bookingId |