Skip to content

Commit f8a3fc3

Browse files
committed
account dashboard tutorial formatting changes
1 parent 6073baa commit f8a3fc3

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

docs/howtos/solutions/mobile-banking/account-dashboard/index-account-dashboard.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Account dashboard make customer's finances easily visible in one place. It reduc
2222

2323
1. Banks store information in a number of separate databases that support individual banking products
2424

25-
2. Key customer account details (balances, recent transactions) across the banks product portfolio re prefetched into Redis Enterprise using Redis Data Integration
25+
2. Key customer account details (balances, recent transactions) across the banks product portfolio are prefetched into Redis Enterprise using Redis Data Integration (RDI)
2626

27-
3. Redis Enterprise powers customers' account dashboards, enabling mobile banking users to view balances and other high-priority information immediately upon login
27+
3. Redis Enterprise powers customer's account dashboards, enabling mobile banking users to view balances and other high-priority information immediately upon login
2828

2929
## Why you should use Redis for mobile banking account dashboard?
3030

@@ -78,13 +78,13 @@ The balance endpoint leverages **[Redis time series](https://redis.io/docs/stack
7878
```js title="app/routers/transaction-router.js"
7979
const BALANCE_TS = 'balance_ts';
8080

81-
/* fetch all transactions up to an hour ago */
81+
/* fetch transactions up to sometime ago */
8282
transactionRouter.get('/balance', async (req, res) => {
8383
//time series range
8484
const balance = await redis.ts.range(
8585
BALANCE_TS,
86-
Date.now() - 1000 * 60 * 5,
87-
Date.now(),
86+
Date.now() - 1000 * 60 * 5, //from
87+
Date.now(), //to
8888
);
8989

9090
let balancePayload = balance.map((entry) => {
@@ -152,7 +152,7 @@ transactionRouter.get('/biggestspenders', async (req, res) => {
152152
| Query Parameters | term |
153153
| Return value | array of results matching term |
154154

155-
The search endpoint leverages Redis **[Search and Query](https://redis.io/docs/stack/search/)** feature, It receives a `term` query parameter from the UI. A [Redis om Node](https://github.com/redis/redis-om-node) query for the fields `description`, `fromAccountName`, and `accountType` will trigger and return all results.
155+
The search endpoint leverages Redis **[Search and Query](https://redis.io/docs/stack/search/)** feature, It receives a `term` query parameter from the UI. A [Redis om Node](https://github.com/redis/redis-om-node) query for the fields `description`, `fromAccountName`, and `accountType` will trigger and return results.
156156

157157
```js title="app/routers/transaction-router.js"
158158
transactionRouter.get('/search', async (req, res) => {
@@ -175,11 +175,11 @@ transactionRouter.get('/search', async (req, res) => {
175175
});
176176
```
177177

178-
### Get most recent transactions
178+
### Get recent transactions
179179

180180
**Dashboard widget**
181181

182-
![View most recent transactions](./images/04-ui-recent-transactions.png)
182+
![View recent transactions](./images/04-ui-recent-transactions.png)
183183

184184
**API end point**
185185

docs/howtos/solutions/mobile-banking/common-mb/data-seeding.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ cron.schedule('*/10 * * * * *', async () => {
1414
});
1515
```
1616

17-
The transaction generator creates a randomized banking debit or credit which will reflect on a starting user balance of $100,000.00
18-
19-
The transaction is saved as a JSON document within Redis. The `balanceAfter` value is recorded in a Timeseries with the key `balance_ts`. The transaction is also added to a stream (`transactions`) as an entry. The sorted set `bigspenders` is also updated - the associated **`fromAccountName`** member within the sorted set is incremented by the transaction amount. Note that this amount can be positive or negative.
17+
- The transaction generator creates a randomized banking debit or credit which will reflect on a (default) starting user balance of $100,000.00
18+
- The **transaction data** is saved as a JSON document within Redis.
19+
- To capture **balance over time**, the `balanceAfter` value is recorded in a TimeSeries with the key `balance_ts` for every transaction.
20+
- 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.
2021

2122
```js title="app/transactions/transactionsGenerator.js"
2223
let balance = 100000.0;
24+
const BALANCE_TS = 'balance_ts';
25+
const SORTED_SET_KEY = 'bigspenders';
2326

2427
export const createBankTransaction = async () => {
2528
//to create random bank transaction

0 commit comments

Comments
 (0)