This is a new tutorial on how to create a command line interface application, and our application today is a Mortgage Calculator.
I used in this program packages such as
1- inquirer for interactive questions and answers: https://www.npmjs.com/package/inquirer
2- Sqlite3 DBMS
3- Chalk for colorful output in the terminal:
The main idea of the app is you ask for a loan amount from the bank, so you'll be prompted to enter the amount.
Similarly for the number of months you want to repay the principle + interest.
Then the program calculates the monthly installment you should pay in this case.
It creates a database file to store all users data with their respective IDs - Sqlite3 does a good job here.
This might seem a small app, but actually it took me quite a while to figure out how to put the various code blocks together in order to get to that result.
You'll find the source code in my GitHub repo:
There is also a video tutorial, if you're interested to watch my explanationL
Don't hesitate to contact me if you have any question :)