/foo-bank

Primary LanguageTypeScript

FooBank

Setup

If you have docker installed, run npm run docker. This will spin up a database and app container.

Below are the endpoints that return the list of accounts and transactions based on the account number:

To run the tests run npm i && npm run test. This will also create a test coverage report.


Things that I left out

I have left notes around the code base where I feel like I left out functionality. Other things would be:

  • Transaction endpoint request parameter validations.
  • Comprehensive logging and error handling.
  • Depending on business requirements, I could return the currency quantities normalised by using a function similar to the one below:
const currencyFormatter = (currency: 'AUD' | 'SGD') => 
    new Intl.NumberFormat('en-US', {
        style: 'currency',
        currency: currency
    });