ποΈ 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*
