rl-docs-hub

Home · Apps · rl-bank-mvp


DB schema — card servicing + activity slice

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

Existing collection updates

cards

Existing fields remain. This slice relies on and updates:

No destructive schema rewrite is required.

Existing collection reuse: audit_logs

Purpose in this slice:

Relevant document shape already present:

Query pattern for this slice:

New collection: notifications

Purpose:

Suggested document shape:

Indexes:

Derived activity model

publicListMyActivity is a projection layer, not necessarily its own collection.

It may combine:

Account history realism notes

This slice does not add a new collection.

accounts

Derived API fields come from existing stored fields:

transactions

This existing collection remains the source for:

No destructive schema change is required. The slice is intentionally projection-heavy rather than storage-heavy.

Staff account servicing support slice notes

This slice reuses existing collections only.

accounts

Relevant existing fields:

Behavior in this slice:

audit_logs

Additional metadata expectations for staff account servicing events:

Query pattern for support detail:

transfers

Used read-only for support context where:

notifications

Used read-only for support context where:

Data retention note

Because this is fake-bank demo data, retention can stay simple for now. If the volume grows later, activity and notification retention policy can be documented separately.