diff --git a/Assets/architecture_diagram.png b/Assets/architecture_diagram.png new file mode 100644 index 0000000..37e4d5a Binary files /dev/null and b/Assets/architecture_diagram.png differ diff --git a/README.md b/README.md index c02453f..5024189 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,42 @@ StorageRouter (main entry point) └── SyncHelper ``` +![LocalData Architecture](Assets/architecture_diagram.png) + +```mermaid +graph TD + App[App / Feature] -->|StorageKey| SR[StorageRouter] + + subgraph Config [Global Configuration] + SC[StorageConfiguration] + EC[EncryptionConfiguration] + FC[FileStorageConfiguration] + SYC[SyncConfiguration] + end + + SR -.->|Resolves Defaults| Config + + SR -->|Delegates| KH[KeychainHelper] + SR -->|Delegates| FH[FileStorageHelper] + SR -->|Delegates| UH[UserDefaultsHelper] + + KH --- EH[EncryptionHelper] + 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] +``` + ## What Ships in the Package ### Protocols