rl-docs-hub

Home · Apps · rl-bank-mvp


Card servicing + activity feed slice

Status: Draft, implementation-aligned for the current feature slice.

Why this slice

The next coherent fake-bank slice is a customer self-service layer on top of the already-live account, card, and transfer/application foundations.

Instead of adding another request workflow, this slice makes existing products feel more bank-like by adding:

Product / feature scope

In scope

Out of scope

Product design

Customer experience shape

Interaction rules

Business logic and rules

Card servicing rules

  1. Only the authenticated customer who owns the card may service it.
  2. Card must belong to an active customer-owned account.
  3. Card statuses:
    • ACTIVE → can be frozen
    • FROZEN → can be unfrozen
    • PENDING_ISSUANCE → cannot be customer-frozen/unfrozen
    • CLOSED → cannot be serviced
  4. Spending-limit updates are allowed only for non-closed cards.
  5. Spending limit must be within a safe range for the fake-bank demo:
    • minimum 500
    • maximum 20000
  6. If a requested state change is already true, the API should succeed idempotently and return the latest card state.
  7. Servicing actions should create an activity event and a lightweight in-app notification record.

Activity / notification rules

  1. Activity feed is customer-scoped only.
  2. Activity feed is reverse-chronological.
  3. Activity combines:
    • card service events
    • card issuance / activation milestones
    • transfer / transaction milestones already stored in the platform
  4. Notifications are a curated subset of activity events intended for inbox-style display.
  5. Notifications support lightweight read acknowledgment in-app only.
  6. Notification delivery status is internal metadata; this slice does not send real external messages.

Debug tracing rule

Technical design summary

API additions

App additions

Data persistence approach

This slice prefers small additive collections/fields over invasive rewrites:

Technical architecture / data flow

flowchart LR
  User[Authenticated customer] --> App[Mobile or Web customer app]
  App --> GQL[rl-bank-api GraphQL]
  GQL --> CardSvc[Card service]
  GQL --> ActivitySvc[Activity service]
  GQL --> NotificationSvc[Notification service]
  CardSvc --> CardDB[(cards)]
  CardSvc --> EventDB[(audit_logs)]
  NotificationSvc --> NotificationDB[(notifications)]
  ActivitySvc --> TxDB[(transactions)]
  ActivitySvc --> EventDB
  NotificationSvc --> EventDB
  CardSvc --> Logs[App logs / debug correlation]

Flow: freeze card

  1. customer triggers freeze in app
  2. GraphQL mutation validates ownership + card state
  3. card status updates to FROZEN
  4. card service event is written
  5. notification record is written
  6. response returns updated card + debug correlation id
  7. apps refresh cards/activity/notifications

Flow: unfreeze card

Same as freeze, but target status is ACTIVE.

Flow: update spending limit

  1. customer submits new limit
  2. API validates ownership + min/max range
  3. card spending limit updates
  4. card service event is written with old/new value summary
  5. notification record is written
  6. response returns updated card + debug correlation id

Permissions / access model

Customer permissions

API guard model

Least-privilege impact

Notes / exceptions