Git Product home page Git Product logo

banka-1's Introduction

banka

A light-weight core banking application that supports a single bank and allows users create bank accounts and make withdrawals & deposits by visiting a local branch

GitHub Build Status Coverage Status GitHub language count Maintainability GitHub closed pull requests

Website

https://tolulope-od.github.io/banka/

Table of Contents

  1. Hosted App
  2. Pivotal Tracker Board
  3. API Documentation
  4. Built With
  5. Getting Started
  6. Application Features
  7. Installation
  8. Running Tests
  9. Deployment
  10. API endpoints
  11. License
  12. Author
  13. Acknowledgments

Hosted App

https://bankaa-app.herokuapp.com

Pivotal Tracker Board

https://www.pivotaltracker.com/n/projects/2319922

API Documentation

https://bankaa-app.herokuapp.com/api-docs/

Built With

Getting Started

Development

To clone and run this application, you'll need Git installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/tolulope-od/banka.git

Refer to the .env.sample file for the required environment variables to get the application up and running.

Production

This application's frontend is served on this url and accomodates two types of users; a client and an admin/staff. All types of users share the same login page. The idea is to check the type of user upon login and then redirect to the appropriate pages. A sample admin login credential as it's stored in the database is:

email: obiwan@therebellion.com
password: password123

Upon successful login, the sole admin has the ability to add other staff and/or admin.

Application Features

  • User Registration
  • Bank Account Creation
  • Bank deposits and withdrawals
  • Bank account management

Installation

To run this application in development mode, you'll need Node.js (which comes with npm) installed on your computer. From your command line:

# Enter the project directory
$ cd banka

# Install dependencies
$ npm install

# Start the development server
$ npm run dev

When the development server is up and running (i.e displays a success message on your command line), you can test the server response by visiting the following endpoint using Postman:

GET localhost:5000/

For a sample response from the server

Running Tests

Unit tests are available on this repository and 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 banka/

# To run the available unit tests
$ npm test

Install nyc globally to generate and view coverage reports via the command line

npm install -g nyc

Using 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": 200,
  "data": [
    {
      "token": "kjkskjhfdsjhf_o.jkshdjhsj",
      "id", 1,
      "firstName": "Kylo",
      "lastName": "Ren",
      "email": "[email protected]"
    }
  ]
}
# on errored request to the sign in route /api/v1/auth/signin
{
  "status": 404,
  "error": "User not found"
}

Deployment

To build out the source code of this project into a browser-friendly and easily depolyable module, an npm script has been provided for that. Simply run the build script and deploy to the platform of your choice

# cd into project directory
$ cd banka/

# run build script
$ npm run build

API endpoints

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>/transactions View an account's Transaction history Clients & Admin/Staff
GET api/v1/user/<user-email-address>/accounts View all accounts owned by a specific user Clients & 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
GET api/v1/accounts?status=active View a list of all active bank accounts Admin/Staff
GET api/v1/accounts?status=dormant View a list of all dormant bank accounts Admin/Staff
GET api/v1/user/<user-email-address>/accounts View all accounts owned by a specific user Admin/Staff
GET api/v1/users Admin get all staff Admin/Staff
PATCH api/v1/users Upgrade a client to a staff Admin Only
POST api/v1/users Admin create cashier Admin Only

Refer to the API Documentation for detailed information on all endpoints

License

This project is licensed under the MIT License - see the LICENSE file for details

Author

  • Tolulope Odueke

Acknowledgments

banka-1's People

Contributors

dependabot[bot] avatar tolulope-od avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.