Project #sweet-loans (link) is a simple web application that allows its users to connect their financial account, see their information, transactions, balances and also fetch real time data that happens on their financial account.
It is built with NodeJS Express, which basically implements the core features of the Mono-Connect API.
- The web application has a basic authentication system, where a user can Login, Signup and Logout of the system.
- Once signed in, a user is faced with a dashboard where he has to link his account through the mono widget.
- On successful linkup, the page forces reload and fetches all the user's connected information right on the dashboard.
- Also from the side navigation, a user can view his account balance, his recent transaction history, and then all transaction histories with pagination.
- Lastly, forcing refresh data sync from Mono's API failed constantly, with JSON response "This account can not be synced". This led to me sticking to normal page reload.
-
Firstly, the application has Mono's widget embedded, for users to connect their bank account. Once successful, the application retrieves a code sent by Mono.
-
After user has his/her account connected successfully, his Mono ID. is needed which leads to the application making a request with the provided code in 1, to Mono's Authentication Endpoint -> https://api.withmono.com/account/auth through POST Method here
-
Once the user's Mono ID. is fetched and stored in the db, his connected user information is immediately fetched and loaded on the dashboard through Mono's API Identity Endpoint -> https://api.withmono.com/accounts/id/identity through GET Method right here
-
The user can view his account balance through Mono's API Information Endpoint -> https://api.withmono.com/accounts/id through GET Method right here
-
The user views his recent (last 20) transactions, through Mono's API transaction Endpoint -> https://api.withmono.com/accounts/id/transaction through GET Method right here
-
Also, all transaction history with pagination is viewed, through Mono's API transaction Endpoint -> https://api.withmono.com/accounts/id/transaction?page=1 through GET Method right here
-
Lastly, I couln't get Mono's force refresh data sync to go through, since the Scyn end point kept throwing-> "message": "This account can not be synced." with "code": "SYNC_ERROR". This led to the application sticking to a good 'ol normal page reload.
N.B Please note that the application is in Test mode, which implies that Mono's widget provides an option for test sign in. And also, all provided data from Mono's API are tests data.
You can register here to give this application a shoot.
The first thing to do is to clone the repository:
$ git clone https://github.com/kingkenway/mono.git
$ cd mono
DATABASE_URL='Your Mongo DB URL'
MONO_SECRET_KEY='Your Mono Secret Key on your dashboard'
MONO_PUBLIC_KEY='Your Mono Public Key on your dashboard'
npm install
node app.js
or
nodemon app.js