📃 Module: Account Listing

ID: account-listing  |  Legacy Source: CBACT01C.cbl + bridge.py:get_all_accounts() + Flask GET /

This guide provides the technical foundation and User Story patterns for the Account Listing module — a paginated, searchable view of all accounts migrated from a COBOL sequential flat-file reader to a .NET 8 REST API with a React frontend.

🏗️ Technical Foundation

LayerTarget ComponentLegacy Equivalent
API ControllerAccountsController.csFlask GET / route in app.py
Application QueryListAccountsQuery.cs + ListAccountsQueryHandler.csbridge.py:get_all_accounts()
Response DTOAccountSummaryDto.csACCT01|pipe-delimited stream (CBACT01C)
Data AccessEF Core AccountRepository.cs (PostgreSQL)CBACT01C sequential read of acctdata.txt (300-byte records)
React PageAccountListPage.tsxtemplates/accounts.html (Jinja2)
React ComponentAccountDataTable.tsxHTML table in accounts.html
React HookuseAccounts.ts (TanStack Query)Server-side render (no client state)

🌐 Public API

GET /api/accounts

Returns a paginated list of account summaries with optional filtering.

Query Parameters

ParameterTypeDefaultDescription
pageint1Page number (1-based)
pageSizeint50Results per page (max 200)
statusstringY (active only) | N (inactive only)
searchstringFilter by account ID prefix or group ID

Response Shape

{
  "data": [
    {
      "id": 4000000111,
      "activeStatus": "Y",
      "currentBalance": 1234.56,
      "creditLimit": 5000.00,
      "openDate": "2018-03-15",
      "groupId": "GOLD"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 350,
  "totalPages": 7
}

📐 Data Model Involved

// AccountSummaryDto — surface only what the list view needs
public record AccountSummaryDto(
    long Id,
    string ActiveStatus,        // "Y" | "N"
    decimal CurrentBalance,
    decimal CreditLimit,
    DateOnly OpenDate,
    string GroupId
);

🎯 User Story Development Patterns

Story Template

As a [Persona],
I want to [Action],
So that [Business Value].

Acceptance Criteria:
  Given [context],
  When [action],
  Then [expected outcome].

Backlog Stories for This Module

US-AL-01 · View Account List (3 pts)
As a bank clerk, I want to view a list of all accounts with their ID, status, current balance, credit limit, and group ID, so that I can get a quick overview of all accounts in the system.
US-AL-02 · Filter Active/Inactive Accounts (2 pts)
As a bank clerk, I want to filter the account list by active status (Active / Inactive / All), so that I can focus on a subset of accounts.
US-AL-03 · Search Accounts by ID or Group (3 pts)
As a bank clerk, I want to search accounts by account ID prefix or group ID, so that I can quickly locate a specific account or a set of accounts.
US-AL-04 · Navigate to Account Detail from List (1 pt)
As a bank clerk, I want to click on an account in the list to navigate to its detail page, so that I can view full account information without manually typing an account ID.

📊 Story Complexity Guidelines

PointsExample
1–2Add a new column to the table, change sort order default.
3–5Add filtering or search with debounce and TanStack Query integration.
8+Full CSV export with server-side streaming; real-time account status updates via WebSockets.

⚡ Performance Requirements