Wiki source code of Storage Architecture (v2.6.33)

Last modified by Robert Schaub on 2026/02/08 08:31

Show last authors
1 = Storage Architecture =
2
3 == Current Implementation (v2.6.33) ==
4
5 {{mermaid}}
6
7 graph TB
8 subgraph Current[Current Implementation]
9 APP[Application Next.js and .NET API]
10 SQLITE[(SQLite factharbor.db)]
11 FILES[Local Files MBFC bundle]
12 end
13
14 APP --> SQLITE
15 APP --> FILES
16
17 {{/mermaid}}
18
19 **Current Storage Model:**
20 * **SQLite** - Single file database (##factharbor.db##)
21 * **JSON Blobs** - Analysis results stored in ##ResultJson## column
22 * **No Caching** - No Redis or in-memory cache
23 * **Local Files** - MBFC bundle, configuration
24
25 |= Table |= Purpose |= Key Fields
26 | ##Jobs## | Job metadata and results | JobId, Status, Progress, ResultJson, ReportMarkdown
27 | ##JobEvents## | Job execution log | JobId, TsUtc, Level, Message
28
29 == Target Architecture (Future) ==
30
31 {{mermaid}}
32
33 graph TB
34 subgraph Target[Target Architecture Future]
35 APP2[Application API and AKEL]
36 REDIS[(Redis Cache)]
37 PG[(PostgreSQL Primary Database)]
38 S3[(S3 Storage Archives)]
39 end
40
41 APP2 --> REDIS
42 REDIS --> PG
43 APP2 --> PG
44 PG --> S3
45
46 {{/mermaid}}
47
48 **Target Features (Not Yet Implemented):**
49 * **Redis Caching** - Hot data, sessions, rate limiting
50 * **PostgreSQL** - Normalized tables for Claims, Evidence, Sources
51 * **S3 Storage** - Archives, backups, old edit history
52
53 == Migration Path ==
54
55 1. **Current** to **Phase 1**: Add Redis for caching (optional)
56 2. **Phase 1** to **Phase 2**: Migrate to PostgreSQL for normalized data
57 3. **Phase 2** to **Phase 3**: Add S3 for archives and backups