rl-docs-hub

Home · Apps · rl-bank-mvp


Staff account servicing + support workspace slice

Status: Draft, intended to match the next implementation slice after account-detail/history realism.

Why this slice

The fake-bank preview already lets customers see more believable accounts, cards, transfers, and history. The weakest realism gap now is on the staff side: support and operations staff can sign in, but the support workspace is mostly placeholder and cannot actually perform controlled servicing actions.

This slice deepens believable internal-bank operations by adding:

This is a better next step than shallow breadth because it connects real day-to-day bank operations: customer issue or servicing request → staff reviews account context → staff performs a permissioned action → audit trail is captured.

Product / feature scope

In scope

Out of scope

Product design

Staff experience shape

Interaction rules

Business logic and rules

  1. Staff must be authenticated and mapped to an active staff identity.
  2. Read access to the support workspace requires account.read.
  3. Mutating account status requires a new permission: account.manage.
  4. Allowed transitions:
    • ACTIVE -> FROZEN
    • FROZEN -> ACTIVE
    • ACTIVE -> CLOSED
    • FROZEN -> CLOSED
  5. CLOSED accounts cannot be reopened in this slice.
  6. Every servicing mutation requires a non-empty reason string.
  7. If the requested target status is already the current status, the API returns success idempotently and still returns the latest account snapshot.
  8. Every successful status mutation writes an audit log entry with:
    • actor type STAFF
    • actor id = acting staff user id
    • entity type ACCOUNT
    • action UPDATE
    • metadata including previous status, next status, reason, and support workspace source
  9. Customer-owned recent transactions/transfers/notifications shown in the support view are read-only context for staff.
  10. Closed accounts remain visible in support history and list results.

Technical design summary

API additions

Merchant portal additions

Persistence approach

Technical architecture / data flow

flowchart LR
  Staff[Authenticated staff user] --> MP[rl-bank-mp-webapp support workspace]
  MP --> GQL[rl-bank-api GraphQL]
  GQL --> Guard[Staff auth + permission guard]
  GQL --> AccountSvc[Account service]
  AccountSvc --> AccountDB[(accounts)]
  AccountSvc --> TxDB[(transactions)]
  AccountSvc --> TransferDB[(transfers)]
  AccountSvc --> NotificationDB[(notifications)]
  AccountSvc --> AuditSvc[Auditlog service]
  AuditSvc --> AuditDB[(audit_logs)]

Flow: support account review

  1. staff opens support workspace
  2. merchant portal queries support account list
  3. staff selects an account
  4. API returns account snapshot, recent transactions, recent transfers, notifications, and latest audit events

Flow: freeze account

  1. staff selects Freeze account
  2. portal submits target status FROZEN with reason
  3. API validates staff permission + allowed transition
  4. account status updates
  5. audit log entry is recorded
  6. updated support detail is returned to the portal

Flow: unfreeze account

Same as freeze, but target status becomes ACTIVE.

Flow: close account

  1. staff selects Close account
  2. portal requires reason and stronger confirmation copy
  3. API validates current status is ACTIVE or FROZEN
  4. account status updates to CLOSED
  5. audit log entry is recorded
  6. updated detail is returned

Permissions / access model

Staff permissions

Role mapping recommendation

Least-privilege impact

Notes / exceptions