Database

One Postgres, every receipt.

PostgreSQL through Prisma — a domain model designed for regulated finance: every provider id mirrored, every webhook retained, every status transition replayable.

At a glance

PostgreSQL
Engine
Prisma 6
ORM
40
Migrations
17
Core models

Domain map

Simplified ER view of the Lobster Money Prisma schema.

Rendering diagram…
User · Clients · finance · invoicing · audit

Models

Every model in the schema, and what it actually owns.

User

Lobster identity, bridged to Cognito via cognitoId; owns Notifications and AccountDeletionRequests.

Clients

Local mirror of Integrated Finance client identity; root of the financial domain graph.

BankAccounts

Issued accounts (IBAN / deposit details) belonging to a Client.

Cards

Card objects with status, scheme, wallet provisioning context.

Beneficiary

Validated payment recipients; requirements, scheme, currency, ownership type.

Transfer

Outgoing / incoming transfers, normalized fields + raw provider payload + history.

CardTransaction

Authorized and settled card transactions with merchant + scheme + raw payload.

CardTransactionAuthenticationEvent

3DS-style approval / rejection events, audited for finance ops.

SumSubStatus

Latest KYC / KYB applicant state per user, sourced from SumSub webhooks.

PhylloData

Cached creator profile, audience, content and income data per platform.

MoniteEntity

Maps Lobster Client → Monite entity for invoicing surfaces.

MoniteCounterpart

Counterparts (customers, vendors), addresses, contacts, bank accounts.

Payable

Bills / payables with PayableStatusHistory for audit.

Receivable

Invoices with ReceivableStatusHistory and generated PDF references.

Notification

Push + email notifications with send status and read/unread state.

AccountDeletionRequest

GDPR-style deletion requests pending operator action.

WebhookEvent

Raw provider webhook payloads retained for audit and reconciliation.

Persistence patterns

How the schema is actually used in production-grade flows.

Cognito ↔ Lobster bridge

User.cognitoId is the canonical bridge between AWS Cognito identity and every Lobster-owned record.

Provider id mirroring

Each external object is mirrored locally: moniteEntityId, monitePayableId, moniteReceivableId, phylloId, accountId, beneficiaryId, transaction numbers.

Raw webhook retention

WebhookEvent stores the full payload as JSON for audit and reconciliation — providers stay the source of truth, Lobster keeps the receipts.

Normalized + raw

Transfers and card transactions keep both normalized columns and the full provider payload and status history arrays.

Notification state

Notifications persist send status and per-user read / unread state, addressable by Cognito identity.

Reconciliation-first

Status histories on Payable and Receivable preserve every state transition, so finance ops can replay any object's life cycle.