Skip to content

Commit

Permalink
Add data flow to README
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronshaf committed Nov 18, 2024
1 parent 9db572d commit 70a6196
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,27 @@ export const queryClient = new QueryClient({
},
});
```

## Data flow

### getItem

```mermaid
flowchart TD
Application([Client app]) --> |".getItem()"| IDBCache[[IDBCache]]
IDBCache --> |Get chunks| IndexedDB[(IndexedDB)]
IndexedDB -.-> |Encrypted chunks| IDBCache
IDBCache -.-> |Encrypted chunks| WebWorker{{Web Worker}}
WebWorker -.-> |Decrypted chunks| IDBCache
IDBCache --> |"Item"| Application
```

### setItem

```mermaid
flowchart TD
Application([Client app]) --> |".setItem()"| IDBCache[[IDBCache]]
IDBCache -.-> |"Unencrypted chunks"| WebWorker{{Web Worker}}
WebWorker -.-> |"Encrypted chunks"| IDBCache
IDBCache -.-> |"Encrypted chunks"| IndexedDB[(IndexedDB)]
```

0 comments on commit 70a6196

Please sign in to comment.