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.
| Layer | Target Component | Legacy Equivalent |
|---|---|---|
| API Controller | AccountsController.cs | Flask GET / route in app.py |
| Application Query | ListAccountsQuery.cs + ListAccountsQueryHandler.cs | bridge.py:get_all_accounts() |
| Response DTO | AccountSummaryDto.cs | ACCT01|pipe-delimited stream (CBACT01C) |
| Data Access | EF Core AccountRepository.cs (PostgreSQL) | CBACT01C sequential read of acctdata.txt (300-byte records) |
| React Page | AccountListPage.tsx | templates/accounts.html (Jinja2) |
| React Component | AccountDataTable.tsx | HTML table in accounts.html |
| React Hook | useAccounts.ts (TanStack Query) | Server-side render (no client state) |
/api/accounts
Returns a paginated list of account summaries with optional filtering.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | int | 1 | Page number (1-based) |
pageSize | int | 50 | Results per page (max 200) |
status | string | — | Y (active only) | N (inactive only) |
search | string | — | Filter by account ID prefix or group ID |
{
"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
}
// 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
);
As a [Persona],
I want to [Action],
So that [Business Value].
Acceptance Criteria:
Given [context],
When [action],
Then [expected outcome].
GET /api/accounts?page=1&pageSize=50 must respond in <200ms P95.activeStatus = "Y" are shown.activeStatus = "N" are shown.groupId = "GOLD" are listed.4000000111, When clicked, Then the user is navigated to /accounts/4000000111.| Points | Example |
|---|---|
| 1–2 | Add a new column to the table, change sort order default. |
| 3–5 | Add filtering or search with debounce and TanStack Query integration. |
| 8+ | Full CSV export with server-side streaming; real-time account status updates via WebSockets. |
GET /api/accounts response time: <200ms P95 for up to 10,000 accounts.accounts.active_status and accounts.group_id to support filtering.