Flexible recurring deposit / Savings / iWish account architecture using event sourcing and CQRS
iWish from ICICI bank is a flexible RD that promotes goal based savings, such as create a goal of how much one wants to save and in what time period. An inital amount and a standing order (recurring transfer from any other account) can set. Customer chose the name, target date (end date), target amount, and category (like purpose - saving for holiday or saving to buy new car).
When customer creates an iWish, ICICI bank creates anew account. Other bank might link the goal to any existing account.
- The UI (User Interface such as Mobile App) issues commands such as Create, Edit, Delete, and Read.
- Before creating a goal, customer can be given an intelligent recommendation - A Goal with filled details, such as target amount and target date.
- Commands are received by a Handler (an aggregator) The commands come as event stream (data stream).
- The event stream delivers the command to handler and persists the events in durable store
- Handler handles the commands isssued by UI and issues new events to be handler by AccoutHanlder and StandingOrderHandler
- The Recommended Goal (iWish) and Read iWish are API (request/response) calls
- The iWish created are stored in a relational store (RDBMS) and act as single source of truth
- Insights are generated on goals such as customer can create a new iWish related to previous ones and so on
Please note it is hypothetical not the actual implementation of iWish or any Savings deposit in any Bank