▲ | kaz-inc 4 days ago | |
I have a wrapper around IndexedDB I've been using since 2020ish for my offline-first texting based notes system called FileDB, which makes indexedDB look like a filesystem. https://github.com/kasrasadeghi/pipeline-js/blob/main/assets... I wrap that in FlatDB, which is an opinionated flat cache for the files with metadata inline, used for very fast searches (searching 150k messages in less than 20ms on my 4 year old phone). This handles a lot of tricky cases, like accidental cache modification, and editing the database in different tabs. There's even a sync algorithm that synchronizes notes across devices. https://github.com/kasrasadeghi/pipeline-js/blob/main/assets... |