Skip to content

Commit 70a6196

Browse files
committed
Add data flow to README
1 parent 9db572d commit 70a6196

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,27 @@ export const queryClient = new QueryClient({
105105
},
106106
});
107107
```
108+
109+
## Data flow
110+
111+
### getItem
112+
113+
```mermaid
114+
flowchart TD
115+
Application([Client app]) --> |".getItem()"| IDBCache[[IDBCache]]
116+
IDBCache --> |Get chunks| IndexedDB[(IndexedDB)]
117+
IndexedDB -.-> |Encrypted chunks| IDBCache
118+
IDBCache -.-> |Encrypted chunks| WebWorker{{Web Worker}}
119+
WebWorker -.-> |Decrypted chunks| IDBCache
120+
IDBCache --> |"Item"| Application
121+
```
122+
123+
### setItem
124+
125+
```mermaid
126+
flowchart TD
127+
Application([Client app]) --> |".setItem()"| IDBCache[[IDBCache]]
128+
IDBCache -.-> |"Unencrypted chunks"| WebWorker{{Web Worker}}
129+
WebWorker -.-> |"Encrypted chunks"| IDBCache
130+
IDBCache -.-> |"Encrypted chunks"| IndexedDB[(IndexedDB)]
131+
```

0 commit comments

Comments
 (0)