A light weight banking application
Banka is a web application with operations like user (client) sign up, signin, creation of bank account, deposit and withdrawals.
Brief introduction on how to run the application. Clone the repo and RUN the following lines of code on your terminal directly on the folder.
npm install --To install all dependencies
npm start --To run the applicationHere you should say what actually happens when you execute the code above.
Install Node JS which should come with a node package manager. It is the required environment for the application
Open the node command prompt or any of your favourite command tool and type node --version to check if it installed
cd .. or change directory to the clone repo and type npm install
Procedure for further development of this application:
git clone https://github.com/hameedhub/hameedhub.github.io.git
cd banka
npm installAll the required package to run and develop the application are to be installed in order to have smooth run.
- Node Js - The web frame work
- npm - The package manager
- Mocha and Chai - Testing
In additional, this application is written in ES6 which have some atypical syntax. Hence, may not run on some platform. Babel node, babel cli, babel-register and babel-preset-env should be installed to build the application to ES5
.start: babel-node app.js
npm startRUN npm start on the clone repo, then babel builds it into later version, which can run in most platforms.
In deploying this project to Heroku, install Heroku ci after you might signup. To check if it is properly install RUN heroku --version to get the current version in use. To deploy RUN the following command prompt
$ heroku login i
$ heroku create <application name>
$ git remote -v
$ git push heroku master
login i enable you to login into heroku through the terminal interface, after providing the signup details, $heroku create with <application name> to create the application remote address linked with github then push to git push heroku
The user interface (UI/UX) pages include:
- A user (client) sign up page
- A user (client) sign in page
- A user (client) page to create account
- User can view acccount transaction history
- Staff login page
- Staff (cashier) can debit user (client) account.
- Staff (cashier) can credit user (client) account.
- Adminn login page
- Admin/staff can view all user accounts.
- Admin/staff can view a specific user account.
- Admin/staff can activate or deactivate an account.
- Admin/staff can delete a specific user account.
- Admin can create staff and admin user accounts.
Here are the API endpoints, it only allows json format and the expected output are also in json format.
Required fields :
firstName: String
lastName: 'String
email: String
password: 'String
On success response
{
“status” : Integer ,
“data” : {
“token” : “45erkjherht45495783”
“id” : Integer , // id of newly created user
“firstName” : String ,
“lastName” : String ,
“email” : String
}
} Error response
{
“status” : 404 ,
“error” : “relevant-error-message”
} Entry
{
{
“id” : Integer ,
“email” : String ,
“firstName” : String ,
“lastName” : String ,
“password” : String ,
“type” : String , // client or staff
“isAdmin” : Boolean , // must be a staff user account
}
} Heroku Link POST https://hameed-banka-api.herokuapp.com/api/v1/auth/signup
Required fields :
email: String
password: 'String
On success response
{
“status” : Integer ,
“data” : {
“token” : “45erkjherht45495783”
“id” : Integer , // user id
“firstName” : String ,
“lastName” : String ,
“email” : String
}
}Error response
{
“status” : 404 ,
“error” : “relevant-error-message”
} Heroku Link POST https://hameed-banka-api.herokuapp.com/api/v1/auth/signin
Required fields :
owner: Integer
accountNumber: 'Integer
type: 'String
openingBalance: 'Integer
On success response
{
“status” : Integer ,
“data” : {
“accountNumber” : Number ,
“firstName” : String , // account owner first name
“lastName” : String , // account owner last name
“email” : String , // account owner email
“type” : String , // savings, current
“openingBalance” : Float
}
}Error response
{
“status” : 404 ,
“error” : “relevant-error-message”
} Heroku Link POST https://hameed-banka-api.herokuapp.com/api/v1/accounts
Required fields :
status: String
On success response
{
{
“status” : Integer ,
“data” : {
“accountNumber” : Integer , // user unique id
“status” : String , // active or dormant
}
}Error response
{
“status” : 404 ,
“error” : “relevant-error-message”
} Heroku Link PATCH https://hameed-banka-api.herokuapp.com/api/v1/accounts/
Required fields :
{}
On success response
{
{
“status” : Integer ,
“message” : ”Account successfully deleted”
}
}Error response
{
“status” : 404 ,
“error” : “relevant-error-message”
} Heroku Link DELETE https://hameed-banka-api.herokuapp.com/api/v1/accounts/
Required fields :
amount: Integer
cashier: 'Integer
On success response
{
“status” : Integer ,
“data” : {
“transactionId”: Integer ,
“accountNumber” : String ,
“amount” : Float ,
“cashier” : Integer , // cashier that consumated the transaction
“transactionType” : String,
“accountBalance” : String,
}
}Error response
{
“status” : 404 ,
“error” : “relevant-error-message”
} Heroku Link POST https://hameed-banka-api.herokuapp.com/api/v1/transactions//debit
Required fields :
amount: Integer
cashier: 'Integer
On success response
{
“status” : Integer ,
“data” : {
“transactionId”: Integer ,
“accountNumber” : String ,
“amount” : Float ,
“cashier” : Integer , // cashier that consumated the transaction
“transactionType” : String ,
“accountBalance” : String,
}
}Error response
{
“status” : 404 ,
“error” : “relevant-error-message”
} Heroku Link POST https://hameed-banka-api.herokuapp.com/api/v1/transactions//credit
If you'd like to contribute, please fork the repository and make a feature branch. I accept all forms of feedback. Thanks!
The code style guide is eslint airbnb
- Project homepage: https://github.com/hameedhub/hameedhub.github.io
- Repository: https://github.com/hameedhub/hameedhub.github.io.git
- Deployment: https://hameed-banka-api.herokuapp.com/api/v1/
The code in this project is licensed under MIT license.
- Google images (background image)
- npm Documentation on each package used.
- w3school.com (modal, filter search and collapsable)
- CJ Code Garden (CRUD , Express and Unit Testing)
- Andela (Git naming convension and best practices)
- Kendall Totten (Reduce, Reuse, Recycle - Modular CSS) etc..