From 9f2fb7ec4836feb0bd56b044b90d2d9b1bd8bcad Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 14 Jan 2026 17:56:38 -0600 Subject: [PATCH] Signed-off-by: Matt Bruce --- README.md | 72 +++++++++++++++++++++++-------------------------------- 1 file changed, 30 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 1bfc685..469a9e2 100644 --- a/README.md +++ b/README.md @@ -16,63 +16,51 @@ StorageRouter (main entry point) ``` ```mermaid +%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '16px', 'primaryColor': '#ffffff', 'lineColor': '#000000', 'textColor': '#000000', 'mainBkg': '#ffffff', 'nodeBorder': '#000000' }}}%% flowchart TD - %% Main Architecture Stack - App(["📱 APP / FEATURE LAYER"]) + %% Vertical Flow + App(("📱 APP / FEATURE")) - subgraph Config ["⚙️ GLOBAL CONFIGURATION"] - direction LR - SC["StorageConfig"] - EC["EncryptionConfig"] - FC["FileStorageConfig"] - SYC["SyncConfig"] - end + SR["🔀 STORAGE ROUTER
(The Central Engine)"] - SR["🔀 STORAGE ROUTER
(Migration & Orchestration Engine)"] + subgraph Config ["⚙️ GLOBAL CONFIGURATION"] + direction TB + C1["Encryption & Sync Config"] + C2["App Group & File Config"] + end subgraph Helpers ["🛠️ INTERNAL HELPER ACTORS"] direction TB - subgraph Logic ["Core Logic"] - direction LR - KH["KeychainHelper"] - FH["FileHelper"] - UH["UserDefaultsHelper"] - end - EH["🔐 EncryptionHelper"] - SH["🔄 SyncHelper"] + H1["Keychain & File Storage Helpers"] + H2["UserDefaults & Sync Helpers"] + H3["🔐 Encryption Service"] end - subgraph Storage ["💾 HARDWARE STORAGE"] + subgraph Storage ["💾 HARDWARE STORAGE LAYER"] direction LR - KC[("🗝️ Keychain")] - FS[("📁 File System")] - UD[("⚙️ UserDefaults")] - WatchOS["⌚ Apple Watch"] + S1[("🗝️ Keychain")] + S2[("📁 File System")] + S3[("⚙️ UserDefaults")] end - %% Flow Relationships + %% Relationships App -->|StorageKey| SR SR -.->|Resolves| Config + SR ==>|1. Orchestrate| Helpers + Helpers ==>|2. Persist| Storage - SR ==>|1. Routing Logic| Helpers - - KH --> KC - FH --> FS - UH --> UD - SH -->|WatchConnectivity| WatchOS - - KH --- EH - FH --- EH + %% Migration Loop + Storage -.->|3. AUTOMATIC MIGRATION| SR - %% Migration Logic - Storage -.->|2. AUTOMATIC MIGRATION| SR - - %% Styling - style App fill:#fff,stroke:#333,stroke-width:2px - style Config fill:#f9f9f9,stroke:#999,stroke-dasharray: 5 5 - style SR fill:#e1f5fe,stroke:#01579b,stroke-width:3px - style Storage fill:#f0f7ff,stroke:#0052cc,stroke-width:2px - style Helpers fill:#fff,stroke:#666 + %% Explicit Styling for High Contrast + style App fill:#ffffff,stroke:#000,stroke-width:3px + style SR fill:#e1f5fe,stroke:#000,stroke-width:4px + style Config fill:#fffde7,stroke:#000,stroke-dasharray: 5 5 + style Helpers fill:#f5f5f5,stroke:#000,stroke-width:2px + style Storage fill:#e8f5e9,stroke:#000,stroke-width:3px + + %% Link Styling + linkStyle default stroke:#000,stroke-width:2px,color:#000 ``` ## What Ships in the Package