Home · Apps · rl-bank-mvp
Status: Draft, implementation-aligned for the current slice.
cardsExisting fields remain. This slice relies on and updates:
statusspendingLimitupdatedAtNo destructive schema rewrite is required.
audit_logsPurpose in this slice:
Relevant document shape already present:
id: string uniqueactorType: stringactorId: stringaction: stringentityType: stringentityId: stringmetadata: object
titledescriptionaccountIdpreviousValuenextValuedebugCorrelationIdcreatedAt: dateQuery pattern for this slice:
audit_logs where actorType=customer, entityType=card, and action=UPDATEnotificationsPurpose:
Suggested document shape:
id: string uniquecustomerId: string indexedtitle: stringbody: stringlevel: string
INFOSUCCESSWARNINGrelatedCardId: string | null indexedrelatedAccountId: string | null indexedrelatedTransactionId: string | null indexeddebugCorrelationId: string | null indexedreadAt: date | nullcreatedAt: dateupdatedAt: dateIndexes:
id{ customerId: 1, createdAt: -1 }{ customerId: 1, readAt: 1, createdAt: -1 }publicListMyActivity is a projection layer, not necessarily its own collection.
It may combine:
audit_logsnotificationstransactionscardsThis slice does not add a new collection.
accountsDerived API fields come from existing stored fields:
availableBalancecurrentBalancestatusopenedAttransactionsThis existing collection remains the source for:
No destructive schema change is required. The slice is intentionally projection-heavy rather than storage-heavy.
This slice reuses existing collections only.
accountsRelevant existing fields:
idcustomerIdaccountNumberaccountTypecurrencystatusavailableBalancecurrentBalanceopenedAtupdatedAtBehavior in this slice:
status and updatedAtaudit_logsAdditional metadata expectations for staff account servicing events:
previousStatusnextStatusreasonsource = support_workspacecustomerIdaccountNumberMaskedQuery pattern for support detail:
entityType=account and entityId=<accountId> ordered by createdAt desctransfersUsed read-only for support context where:
fromAccountId=<accountId> or toAccountId=<accountId>notificationsUsed read-only for support context where:
relatedAccountId=<accountId>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.