Skip to content

Instantly share code, notes, and snippets.

@ankurs287
Last active August 27, 2020 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankurs287/4ef7c3de462073bf36bd5247479cb176 to your computer and use it in GitHub Desktop.
Save ankurs287/4ef7c3de462073bf36bd5247479cb176 to your computer and use it in GitHub Desktop.
Google Summer of Code 2020: Mifos Open Banking App | Report by Ankur Sharma

Google Summer of Code 2020: Mifos Open Banking App | Report by Ankur Sharma

Research

Before jumping directly into coding, we did a thorough research in the followings:

Open Banking Research

  • Authenticating the user securely in the app via various modes (OAuth 1.0a, OAuth 2 + Open ID connect using an external server). Authentication Modes
  • Explored major use-cases for Account Information Service Provider (AISP) and Payment Initiation Service Provider (PISP).
  • Discussed some advanced use cases:
    • Recommend products to the users based on their transaction history. Eg.: recommending better deals, insurances, etc.
    • Targeted Ads based on the policies and products users own.
    • Provide users with analytics in terms of graphs, pie charts, etc.

Kotlin Multi-platform vs Flutter & Architecture Discussion

  • Watched tutorials and read documentation to understand how both the approaches work and what would work best for us.
  • Implemented Kotlin/Native Vanilla Clean Architecture TDD Project.
  • Implemented Flutter Vanilla Clean Architecture TDD Project.
  • After a long discussion about pros and cons of both, we decided to go ahead with Kotlin/Native.

Code

Architecture Explained

This is a Kotlin Multi-platform Project. The project contains 3 directories: common, androidApp, iosApp.

common

It is a Kotlin/Native module to share code across multiple platforms (ios, android, windows, etc). It is further divided into three modules:

  • androidMain : Implementation of Android specific backend code used by commonMain.
  • iosMain : Implementation of ios specific backend code used by commonMain.
  • commonMain: Common code across all platforms.

It is the core library module based on MVVM Clean Architecture using LiveData. It is imported as .jar in an android application and as .framework in an ios application.

This module contains -

  1. The view model, data and domain layers
  2. All the open bank project api interaction is implemented in this module. Note that this open banking app is currently referring to Open Bank Project.
  3. View Models are located here
  4. All the api and data implementation is located here
  5. Use cases are located here

androidApp

It is an Android module which implements a UI layer for the android app and subscribes to view models in common to fetch data.

iosApp

It is the ios project which implements a UI layer for the ios app and subscribes to view models in common to fetch data.


Further, the open-banking-app is built on top of Open Bank Project with sandbox: https://apisandbox.openbankproject.com/

CONSUMER_KEY = lxhlkssvfgoheqjdhdr4tq1lkj5h5jklhn2rqxd0
API_HOST = https://apisandbox.openbankproject.com/

Demo Credentials:

Use Cases Implemented:

  1. Authenticate user via Open Bank Project (OBP)
  2. Sign up user on OBP
  3. Fetch all accounts of a user
  4. Fetch account balances
  5. Create a transaction request
  6. Fetch transaction requests made by an account
  7. Fetch all the transactions (paging support)
  8. Fetch a particular transaction
  9. Fetch all debit/credit cards
  10. Fetch all the supported banks

Project Wiki with documentation: https://github.com/openMF/open-banking-app/wiki
Project Code: https://github.com/openMF/open-banking-app
App Screenshots: https://drive.google.com/drive/folders/1nSyGSLbxsq7xFthGRJHm7XBg11k2x-No?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment