Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2026-01-14 17:50:08 -06:00
parent ad76393652
commit 91368666f6

View File

@ -16,43 +16,60 @@ StorageRouter (main entry point)
```
```mermaid
graph TD
App[App / Feature] -->|StorageKey| SR[StorageRouter]
flowchart TD
%% Node Definitions
App["📱 App / Feature"]
SR["🔀 StorageRouter"]
subgraph Config [Global Configuration]
SC[StorageConfiguration]
EC[EncryptionConfiguration]
FC[FileStorageConfiguration]
SYC[SyncConfiguration]
subgraph Config ["⚙️ Global Config"]
direction TB
SC["StorageConfiguration"]
EC["EncryptionConfiguration"]
FC["FileStorageConfiguration"]
SYC["SyncConfiguration"]
end
SR -.->|Resolves Defaults| Config
subgraph Helpers ["🛠️ Internal Helpers"]
KH["KeychainHelper"]
FH["FileStorageHelper"]
UH["UserDefaultsHelper"]
EH["🔐 EncryptionHelper"]
SH["SyncHelper"]
end
SR -->|1. Check Migration| SR
SR -->|2. Get/Set| KH[KeychainHelper]
SR -->|2. Get/Set| FH[FileStorageHelper]
SR -->|2. Get/Set| UH[UserDefaultsHelper]
subgraph Storage ["💾 Hardware Storage"]
KC[("🗝️ Keychain")]
FS[("📁 File System")]
UD[("⚙️ UserDefaults")]
end
%% Flow
App -->|StorageKey| SR
SR --> SR
SR -.->|Resolves| Config
KH --- EH[EncryptionHelper]
SR ==>|2. Get/Set| KH
SR ==>|2. Get/Set| FH
SR ==>|2. Get/Set| UH
SR ==>|Syncs| SH
KH --- EH
FH --- EH
SR -->|Syncs| SH[SyncHelper]
subgraph Storage [Hardware Storage]
KC[(Keychain)]
FS[(File System)]
UD[(UserDefaults)]
end
KH --> KC
FH --> FS
UH --> UD
SH -->|WatchConnectivity| WatchOS[Apple Watch]
%% Migration flows
SH -->|WatchConnectivity| WatchOS["⌚ Apple Watch"]
%% Migration
UD -.->|Migrate| SR
KC -.->|Migrate| SR
FS -.->|Migrate| SR
%% Styling
style Config fill:#f9f9f9,stroke:#ddd,stroke-dasharray: 5 5
style Storage fill:#f0f7ff,stroke:#0052cc,stroke-width:2px
style SR fill:#e1f5fe,stroke:#01579b,stroke-width:2px
```
## What Ships in the Package