Wiki source code of Storage Architecture Mermaid

Last modified by Robert Schaub on 2025/12/22 14:16

Hide last authors
Robert Schaub 1.1 1 {{mermaid}}
2 graph TB APP[Application<br/>API + AKEL] --> REDIS[Redis Cache<br/>Hot data, sessions,<br/>rate limiting] REDIS --> PG[(PostgreSQL<br/>Primary Database<br/>**All core data**<br/>Claims, Evidence,<br/>Sources, Users)] APP --> PG PG -->|Backups &<br/>Archives| S3[(S3 Storage<br/>Old logs,<br/>Backups)] BG[Background<br/>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<br/>>500ms| ES[(Elasticsearch<br/>Full-text search)] PG -.->|If metrics slow<br/>>1s queries| TS[TimescaleDB<br/>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
3 {{/mermaid}} **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.