All eyes on AI: 2026 predictions – The shifts that will shape your stack.

Read now

Tutorial

Mobile Banking Account Dashboard Using Redis

February 26, 202611 minute read
Prasan Rajpurohit
Prasan Rajpurohit
William Johnston
William Johnston
TL;DR:
Build a mobile banking account dashboard with Redis by caching account balances as JSON documents, tracking balance history with Time Series, ranking biggest spenders with sorted sets, and searching transactions with Search and Query. Redis delivers sub-millisecond reads so customers see real-time financial data the moment they open the app.
GITHUB CODE
Below is a command to the clone the source code for the application used in this tutorial

#What you'll learn

  • How to cache account balances and transaction data as Redis JSON documents
  • How to track balance over time using Redis Time Series
  • How to rank biggest spenders with Redis sorted sets
  • How to search and filter transactions using Redis Search and Query
  • How to seed realistic banking data with a cron-based transaction generator

#What is a mobile banking account dashboard?

An account dashboard is a page in a mobile banking app that instantly renders account highlights to users. A customer can click on any of the accounts on the dashboard to see the real-time account details, such as latest transactions, mortgage amount they have left to pay, checking and savings, etc.
An account dashboard makes a customer's finances easily visible in one place. It reduces financial complexity for the customer and fosters customer loyalty.
The following diagram is an example data architecture for an account dashboard:
Data architecture diagram showing how banks prefetch customer data from separate product databases into Redis Cloud via Redis Data Integration, enabling sub-millisecond account dashboard rendering
  1. Banks store information in a number of separate databases that support individual banking products
  2. Key customer account details (balances, recent transactions) across the banks product portfolio are prefetched into Redis Cloud using Redis Data Integration (RDI)
  3. Redis Cloud powers customer's account dashboards, enabling mobile banking users to view balances and other high-priority information immediately upon login

#Why should you use Redis for account dashboards in mobile banking?

  • Resilience: Redis Cloud provides resilience with 99.999% uptime and Active-Active Geo Distribution to prevent loss of critical user profile data
  • Scalability: Redis Cloud provides < 1ms performance at incredibly high scale to ensure apps perform under peak loads
  • JSON Support: Provides the ability to create and store account information as JSON documents with the < 1ms speed of Redis
  • Querying and Indexing: Redis Cloud can quickly identify and store data from multiple different databases and index data to make it readily searchable

#How do you build an account dashboard with Redis?

NOTE
Below is a command to the clone the source code for the application used in this tutorial
Download the above source code and run following command to start the demo application
After docker up & running, open http://localhost:8080/ url in browser to view application

#How is the banking data seeded?

This application leverages Redis core data structures, JSON, TimeSeries, Search and Query features. The data seeded is later used to show a searchable transaction overview with realtime updates as well as a personal finance management overview with realtime balance and biggest spenders updates.
On application startup in app/server.js, a cron is scheduled to create random bank transactions at regular intervals and seed those transactions in to Redis.
  • The transaction generator creates a randomized banking debit or credit which will reflect on a (default) starting user balance of $100,000.00
  • The transaction data is saved as a JSON document within Redis.
  • To capture balance over time, the balanceAfter value is recorded in a TimeSeries with the key balance_ts for every transaction.
  • To track biggest spenders, an associated **fromAccountName** member within the sorted set bigspenders is incremented by the transaction amount. Note that this amount can be positive or negative.
Sample bankTransaction data view using Redis Insight
Redis Insight browser showing a seeded bank transaction stored as a JSON document with fields like fromAccountName, amount, and transactionDate
Expanded JSON view of a single bank transaction record in Redis Insight, showing nested fields and balance-after value
TIP
Download Redis Insight to view your Redis data or to play with raw Redis commands in the workbench.

#How do you track balance over time with Redis Time Series?

Dashboard widget: Line chart widget showing account balance trends over time, powered by Redis Time Series data
Endpoint/transaction/balance
Code location/routers/transaction-router.js
Parametersnone
Return value[{x: timestamp, y: value}, ...]
The balance endpoint leverages Time Series, It returns the range of all values from the time series object balance_ts. The resulting range is converted to an array of objects with each object containing an x property containing the timestamp and a y property containing the associated value. This endpoint supplies the time series chart with coordinates to plot a visualization of the balance over time.

#How do you identify the biggest spenders with Redis sorted sets?

Dashboard widget:
Pie chart widget displaying the top five biggest spenders, ranked using a Redis sorted set
Endpoint/transaction//biggestspenders
Code Location/routers/transaction-router.js
Parametersnone
Return value{labels:[...], series:[...]}
The biggest spenders endpoint leverages sorted sets as a secondary index, It retrieves all members of the sorted set bigspenders that have scores greater than zero. The top five or fewer are returned to provide the UI pie chart with data. The labels array contains the names of the biggest spenders and the series array contains the numeric values associated with each member name.

#How do you search existing transactions with Redis?

Dashboard widget:
Full-text search widget for filtering bank transactions by description, account name, or type using Redis Search and Query
Endpoint/transaction/search
Code Location/routers/transaction-router.js
Query Parametersterm
Return valuearray of results matching term
The search endpoint leverages Search and Query, It receives a term query parameter from the UI. A Redis om Node query for the fields description, fromAccountName, and accountType will trigger and return results.

#How do you fetch recent transactions?

Dashboard widget:
Dashboard table showing the ten most recent bank transactions, sorted by date using Redis Search and Query
Endpoint/transaction/transactions
Code Location/routers/transaction-router.js
Parametersnone
Return valuearray of results
Even the transactions endpoint leverages Search and Query. A Redis om Node query will trigger and return ten most recent transactions.

#What are the next steps?

Now that you've built a mobile banking account dashboard with Redis, consider exploring these related tutorials and resources: