Wiki source code of Storage Architecture Mermaid

Last modified by Robert Schaub on 2025/12/24 21:53

Hide last authors
Robert Schaub 1.1 1 {{mermaid}}
2 graph TB
Robert Schaub 2.1 3 APP[Application<br/>API + AKEL] --> REDIS[Redis Cache<br/>Hot data, sessions,<br/>rate limiting]
4 REDIS --> PG[(PostgreSQL<br/>Primary Database<br/>**All core data**<br/>Claims, Evidence,<br/>Sources, Users)]
5 APP --> PG
6 PG -->|Backups &<br/>Archives| S3[(S3 Storage<br/>Old logs,<br/>Backups)]
7 BG[Background<br/>Scheduler] --> PG
8 BG --> S3
9 subgraph V10["✅ V1.0 Core (3 systems)"]
10 PG
11 REDIS
12 S3
13 end
14 subgraph Future["🔮 Optional Future (Add if metrics show need)"]
15 PG -.->|If search slow<br/>>500ms| ES[(Elasticsearch<br/>Full-text search)]
16 PG -.->|If metrics slow<br/>>1s queries| TS[TimescaleDB<br/>Time-series]
17 end
18 style PG fill:#9999ff
19 style REDIS fill:#ff9999
20 style S3 fill:#ff99ff
21 style ES fill:#cccccc
22 style TS fill:#cccccc
23 style V10 fill:#e8f5e9
24 style Future fill:#fff3e0
Robert Schaub 1.1 25 {{/mermaid}}
26
27 **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.