Storage Architecture Mermaid
Version 1.1 by Robert Schaub on 2025/12/18 12:03
graph TB
APP[Application
API + AKEL] --> REDIS[Redis Cache
Hot data, sessions,
rate limiting]
REDIS --> PG[(PostgreSQL
Primary Database
**All core data**
Claims, Evidence,
Sources, Users)]
APP --> PG
PG -->|Backups &
Archives| S3[(S3 Storage
Old logs,
Backups)]
BG[Background
Scheduler] --> PG
BG --> S3
subgraph V10["✅ V1.0 Core (3 systems)"]
PG
REDIS
S3
end
subgraph Future["🔮 Optional Future (Add if metrics show need)"]
PG -.->|If search slow
>500ms| ES[(Elasticsearch
Full-text search)]
PG -.->|If metrics slow
>1s queries| TS[TimescaleDB
Time-series]
end
style PG fill:#9999ff
style REDIS fill:#ff9999
style S3 fill:#ff99ff
style ES fill:#cccccc
style TS fill:#cccccc
style V10 fill:#e8f5e9
style Future fill:#fff3e0
Simplified Storage - PostgreSQL as single primary database for all core data (claims, evidence, sources, users, metrics). Redis for caching, S3 for archives. Elasticsearch and TimescaleDB are optional additions only if performance metrics prove necessary. Start with 3 systems, not 5.