Giter Site home page Giter Site logo

bank's Introduction

Simple Bank

A mockup for basic bank functionality which includes

Menu

If you ever forget about the functionality of this then simply type menu to list all available commands

Register

Register a new account using following command

register

You will be taken through the process of registering a new account via prompts

Login

Include your username in the command when you want to login

login foo

It will then ask your password, and don't worry the password is masked in the prompt

Logout

logout

The opposite of login, I guess

Deposit

Deposit to your account via command below

deposit [amount]

If you have any outstanding debt then the money will be automatically transfered to creditor(s) with FIFO order

Transfer

Transfer your money to another account using command below

transfer [destination username] [amount]

You can transfer more than what you have in your account but it will be listed as debt

Exit

To exit the app gracefully type

exit

Technical Information

Below are some technical information about this repo

Stack Used

  • Written in Typescript
  • sqlite3, chosen because of simplicity and portability
  • eslint for linter
  • bcrypt for hashing password
  • typeorm
  • readline-sync for prompting user
  • jest and sinon for testing
  • colors ๐ŸŒˆ

Installation

type make in root folder to install all dependencies, transpile to js, and run the app

Test

yarn test --coverage

Above command will run the test and show the coverage report

Watch

Since this is a typescript repo, then we need to transpile it to js before we run and it could be an annoying thing to do it again and again every time the codes changed. To lessen that annoyment, you can run below command in another terminal session

yarn watch

That will spawn a watcher that will automatically transpile the codes everytime a file is changed. However this will not run eslint

Build

Standardize your codes and transpile it to js into dist/ folder which then we can run

yarn build

Run

yarn start

This will execute transpiled codes in dist folder with dist/index.js as entry point

bank's People

Contributors

pratansyah avatar

Watchers

 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.