A banking application that helps users perform banking transactions.
- Hosted App
- Pivotal Tracker Board
- API Documentation
- Built With
- Supporting packages
- Application Features
- Getting Started
- Running Tests
- API endpoints
- License
- Author
https://wayfarer-appy.herokuapp.com
https://www.pivotaltracker.com/n/projects/2320085
coming soon
- Mocha - JavaScript Test Framework for API Tests (Backend)
- Chai - TDD/BDD Assertion Library for Node
- Supertest - Super-agent driven library for testing node.js HTTP servers
- User Registration
- User can book a trip
- User can view all trips
- Admin can create a trip
- Admin can cancel a trip
- Admin can view all trips and bookings
- Admin can get a list of filtered trips based on origin and destination.
- Install NodeJS and PostgreSQL on your computer
- Clone this repository using
git@github.com:oleesir/wayfarer-api.git - Use the
.env.examplefile to setup your environmental variables and rename the file to.env - Run
npm installto install all dependencies - Run
npm run buildto build the project - Run
npm startto start the server - Navigate to localhost:3000 in browser to access the application
Dependencies to enable them work are included in the package.json file. To run unit tests, you can do the following:
# Enter the project's directory
$ cd wayfarer/
# To run the available unit tests
$ npm run testInstall nyc globally to generate and view coverage reports via the command line
npm install --save-dev nycUsing Postman
If you have Postman installed, you can test routes listed below. An example response spec would be:
# on successful request to the sign in route /api/v1/auth/signin
{
"status": "success",
"data": {
"token": "jbhfuhbfhrb_r.iufnr3uinrufrf",
“user_id”:Integer,
“is_admin”:Boolean
}
}# on errored request to the sign in route /api/v1/auth/signin
{
"status": 404,
"error": "User not found"
}| Method | Endpoint | Description | Access |
|---|---|---|---|
POST |
/api/v1/auth/signup |
Register a new user on the app | Clients |
POST |
/api/v1/auth/signin |
Login an existing user | Clients & Staff/Admin |
POST |
/api/v1/accounts |
Create an account | Client |
PATCH |
/api/v1/accounts/<account-number> |
Edit an accounts status | Admin/Staff |
DELETE |
/api/v1/account/<account-number> |
Delete an account | Admin/Staff |
POST |
/api/v1/transactions/<account-number>/debit |
Debit an account | Admin/Staff |
POST |
/api/v1/transactions/<account-number>/credit |
Credit an account | Admin/Staff |
GET |
api/v1/accounts/<account-number> |
View aspecific account's details | Clients & Admin/Staff |
GET |
api/v1/accounts |
View a list of all bank accounts | Admin/Staff |
This project is licensed under the MIT License - see the LICENSE file for details
Olisa Emodi