Skip to content

πŸ—„οΈ Database Architecture ​

WealthFam uses DuckDB for high-performance, local-first financial data storage. Below are the core schema definitions used across the ecosystem.


πŸ—ΊοΈ Logical Relationship Diagram ​

WealthFam uses a strict relational structure in DuckDB to ensure Precision parentage of every transaction.

mermaid
erDiagram
    TENANT ||--o{ USER : contains
    USER ||--o{ ACCOUNT : owns
    ACCOUNT ||--o{ TRANSACTION : tracks
    ACCOUNT ||--o{ POSITION : holds
    USER ||--o{ GOAL : pursues
    GOAL }|--o| POSITION : linked_to
    GOAL }|--o| ACCOUNT : linked_to
    TRANSACTION }|--o| CATEGORY : classified_as
    TRANSACTION }|--o| LOAN : services

πŸ—οΈ Core Schemas ​

βš™οΈ Backend Schema ​

The primary ledger and product metadata schema.

  • High-concurrency transaction tables.
  • Multi-member family partitioning.
  • Precision audit trail structures.

πŸ”„ Parser Schema ​

The transient ingestion and pattern-matching schema.

  • Raw message hashing.
  • Regex pattern templates.
  • Deduplication metadata.

πŸ¦† Why DuckDB? ​

DuckDB allows us to perform complex analytical queries (like XIRR calculation or category intensity heatmaps) directly on your local device without the overhead of a standard RDBMS server.

  • Speed: Columnar storage for fast analytics.
  • Simplicity: Single file persistence.
  • Privacy: Your data never leaves your infrastructure.

*Precision Ledger Β· Columnar Performance Β· Privacy First*

WealthFam Engineering Hub