/fintech-lite

I plan to do a series of livestreams on how a basic fintech wallet works. This repo is where all the code will live.

Primary LanguageJavaScriptMIT LicenseMIT

fintech-lite

I had an idea to build a basic digital bank on a series of livestreams, so this repository is where all the code will live.

Disclaimer

All the code here may not exactly be production ready. I'm building this during livestreams, so I'm doing just enough for people to get the concepts.

Getting Started

  1. You need to have Node.js and MySQL installed.
  2. Install project dependencies by running npm install.
  3. Create a .env file in the root directory and add your databae details. It should have the following properties:
  • DATABASE_HOST=
  • DATABASE_USERNAME=
  • DATABASE_PASSWORD=
  • DATABASE_NAME=
  • DATABASE_PORT=
  1. Run the migrations to create database tables by running npm run migrate.
  2. You can create two users by calling the createUser function in app.js with the username and password arguments. Something like this:
createUser('johndoe', 'doedoe').then(console.log).catch(console.log);
createUser('johnlol', 'lololo').then(console.log).catch(console.log)

This will generate records in both the users table as well as accounts table.

  1. You can go ahead to test each transaction function.

Note:

To run basic wallet functionalities, run the functions in app.js. To run the card functions for debit and authorization, run the functions in card.js.

Branches

Branches are properly named and created per feature. So to see the code for a particular feature, you can switch to the corresponding branch in the UI.

Contributions

Feature Requests

You can suggest a feature by creating an issue and adding the label request to it.