Donut-vue is a sample web app tha ilustrates how to use the METHOD API to simulate a payout dashboard for student loan disbursements to be used at 🍩 Dunkin' Donuts 🍩.
Donut-vue uses the following:
- Get a free method dev account https://dashboard.methodfi.com/login
- Clone the donut-vue repo into your environment
git clone [email protected]:ukulanne/donut-vue.git
- Run
npm install
inside the donut-vue directory - Set up the METHOD_API_KEY en var on your .bash_profile
export METHOD_API_KEY=<KEY>
- Everything but the Corporation Entity is autogenerated. Please create one and replace the contents of the method/corporation.json file
- You can generate this using the
scripts/corporation-add.sh
script. Use the contents of data from the json response. - Start the application with
npm run startDev
- Go to http://localhost:8080/ to try the app!
- Running the whole process takes a long time so you might want to switch the comment code on
donut-vue/controllers/methodController.js
Lines 98 to 99 in ae294a0
- Donut-vue uses SQLite.
- The database is created the first time
npm install
is run and is stored on thedb
directorydb/dunkin.db
- The script that is used to create the DB is db/ddl.js
- You can check out the queries that the app uses inside db/dunkin.sql
- The db directory contain one script to check the count of the tables (table-select-all.js)
- and another to clear all the contents of the DB (table-delete-rows.js)
- You can always use your favorite database query tool that supports SQLite. I have used RazorSQL for years
- You can check the app API documentation at localhost:8080/api-docs/
Download the zip file that contains the sample xml file and upload the file at the submit payment screen: dunkin.zip
After a few moments the app will give show a small dialog asking if you wish to proceed:
Shows a report on how much money has been paid per Dunkin Donut Source account
You can always select specific pay periods.
Pressing the CSV button will download a CSV file of this report
Shows a report of how much money has been paid to employees loans per branch
Download Method generated reports on CSV format
Shows a list of employees and how much money has been paid to their Student Loans. Currently the query has a limit of 300. We need to first use a data-table that supports pagination to handle the 9k+ number of employees.