Je continue à faire évoluer Imagilire Libre : l’application passe à IndexedDB avec Dexie pour un stockage local plus solide et plus fiable.
J’ai aussi ajouté l’export/import des paramètres et du dictionnaire syllabique personnalisé.
🔒 Les données restent stockées localement sur l’appareil. Aucune n’est transmise aux serveurs Imagilire.

https://imagilire.fr/imagilire-libre

#Imagilire #ImagilireLibre #AccessibilitéNumérique #IndexedDB #Dexie #ViePrivée

Ein "IndexedDB"-Zine. Weil ich die letzten Tage etwas neues gelernt habe.
#indexeddb #zine #fedizine
Công cụ quản lý LocalStorage, SessionStorage, Cookies và IndexedDB mới cho Chrome!
Tính năng:
- Sửa đổi JSON dễ dàng
- Quản lý IndexedDB toàn diện
- Chuyển đổi giữa các tài khoản người dùng nhanh chóng
- Đồng bộ hóa trên nhiều thiết bị
#EasyLocalStorageManager #LocalStorage #SessionStorage #Cookies #IndexedDB #ChromeExtension #SvelteJS #ManifestV3 #Freemium #CloudSync
#CôngCụQuảnLý #TrìnhDuyệt #PhátTriểnWeb #TínhNăngMới #ĐồngBộHóa #TàiKhoản #NgườiDùng #ThiếtBị #Chrome #Extension #Svelte #Mani

Hi everyone, anyone knows reliable resources on building offline-first web apps with database offline synchronization? I need to do that for my job but terribly stuck.

#webdev #javascript #cache #offlinefirst #webapps #sqlserver #indexeddb #angular6

Learning about IndexedDB today, hoping it can help with search performance in my bookmark manager app. High hopes!

https://youtube.com/playlist?list=PLyuRouwmQCjmNyAysdqjNz5fIS5cYU4vi&si=9TyczkRhpg3bWtRn

#IndexedDb #TIL

IndexedDB

YouTube

Offline-First Landscape – 2025 | Hacker News

LinkOffline-First 電子郵件應用開發歷程與挑戰:Marco 的實務探索與技術選擇分析
https://marcoapp.io/blog/offline-first-landscape-2025

📌 Summary:
本文詳述開發一款基於 IMAP、跨平臺(網頁、Mac、Windows、Android、iOS)且強調離線優先 (Offline-First) 的電子郵件應用 Marco 時,團隊在離線資料同步技術選擇上的實務經驗與深刻挑戰。Marco 需處理龐大資料量(數百 MB,數十萬至數百萬筆資料),導致市面上多數現有離線優先解決方案難以符合其需求。最初團隊採用 WatermelonDB,試圖以資料庫無關形式實作離線同步,但遭遇 IndexedDB 閱讀效能差以及 Memory Cache 緩存限制等瓶頸,導致體驗不佳。隨後嘗試多種新興技術(Triplit、InstantDB、PowerSync等),雖各有亮點,卻在記憶體使用、前後端支援及穩定性等面向均遇限制。主要問題根源在於網頁端 IndexedDB 作為資料底層存儲的架構限制,使得重量級關聯性或圖資料庫在大資料量下性能崩潰。最後,團隊找到 Replicache + Orama 組合,提供輕量 KV 存取加強版索引與全文檢索支持,獲得穩定又高速的同步能力。文章亦討論未來離線優先技術發展趨勢,包含新興檔案系統API(OPFS)、Zero 專案,以及本質上嘗試共享資料庫取代傳統 REST API 的可能。

🎯 Key Points:
★ 技術挑戰與起點
→ Marco為跨平臺電子郵件應用,需即時離線讀寫同步大量郵件資料。初始閉環想法是資料庫無關同步架構,推動 WatermelonDB 作為資料同步核心。
→ WatermelonDB 依賴 IndexedDB,加上 LokiJS 內存端緩存,以解決 IndexedDB 的存取效能問題,但記憶體消耗龐大且同步邏輯不完善,維護不夠積極。

★ 新一波離線優先技術探索
→ Triplit 與 InstantDB :採用 triples(<entity id, field, value>)表達法利於同步,但 Triplit 記憶體耗損大且伺服器端易崩潰,InstantDB 功能尚欠完整且查詢延遲長,後端缺乏 webhook 支援,導致體驗降低。
→ PowerSync:雖成熟且企業級,卻在自架設相當複雜(需 Postgres、MongoDB HA、非正規化資料表),前端存在 ORM 效能與初始化延遲問題。

★ 根本瓶頸與解決方案
→ 網頁端只能依賴 IndexedDB 作為底層 KV 儲存,所有關聯式與圖形數據庫解決方案皆為上層封裝,性能於大資料量時崩潰,生態仍待成熟。
→ Replicache 採用輕量 KV 存取,層疊索引功能可搭配 Orama 預解決搜尋排序問題。Replicache 在今年一月釋出完全免費且開源版本,穩定性與速度提升明顯。
→ 未來看好 Origin Private File System (OPFS) 作為新型檔案系統 API,及 Zero 專案,其以即時記憶體維運與基於查詢的智慧同步為優勢,值得期待。

★ 實務心得與未來展望
→ 離線優先技術正處於快速演化期,針對大規模資料和複雜同步需求仍有諸多痛點。
→ 跨平臺、跨原生與網頁環境資料層統一設計難度高,架構選擇需權衡性能、開發者體驗與可維護性。
→ 『共享資料庫』取代傳統 API 乃新潮趨勢,2025 年或將成為離線/本地優先架構的重要轉捩點。

🔖 Keywords:
#Offline-First #離線優先 #IndexedDB #Replicache #資料同步

Offline-First Landscape – 2025 | Hacker News

Offline-First Landscape - Marco ��� All your emails, one place

LinkOffline-First Landscape - Marco
https://marco.tech/blog/offline-first-landscape

📌 Summary:
本文介紹了 Marco 團隊在構建電子郵件管理應用時,針對「離線優先」(offline-first)架構所面臨的技術挑戰與解決過程。Marco 必須支援基於 IMAP 且跨多平臺(包括網頁與多種裝置),並且能在沒有網路時完整操作郵件,包括閱讀、刪除、回覆與分類。考量數據龐大(百兆位元組級別與百萬級資料列)、以及網頁端 IndexedDB 記憶體與效能限制,團隊曾嘗試多款主流及新興的離線優先解決方案,如 WatermelonDB、Triplit、InstantDB 及 PowerSync,但均因效能瓶頸、開發者體驗(DX)或架構複雜性不足以滿足需求而放棄。最後,團隊選擇了輕量但高效的 KV 儲存方案 Replicache 搭配 Orama 做為索引與全文搜尋工具,取得理想的性能與彈性。整體過程反映出現有離線優先技術在面對大規模複雜資料時仍存在本質限制,且未來相關技術發展仍需克服瀏覽器平臺存儲型態(IndexedDB 為 KV 儲存)而生的挑戰。文章亦看好 2025 年「共用資料庫」取代傳統 HTTP/REST API 成為主流的趨勢,顯示離線優先及即時同步技術具有重要的未來應用價值。

🎯 Key Points:
→ 【需求背景與挑戰】
★ Marco 需支援 IMAP 協議且跨平臺(Web、Mac、Windows、Android、iOS)。
★ 離線操作是首要需求,必須允許無網路時完整管理郵件,並且在連網後自動同步。
★ 大量資料 (>100MB、千萬行級別) 加大離線同步難度,尤其網頁端使用 IndexedDB 性能不足。

→ 【嘗試過的離線優先方案】
① WatermelonDB:FOSS 且資料庫無關,利用 LokiJS 將資料庫全存在記憶體中繞過 IndexedDB 性能問題,導致大資料量時記憶體負擔沉重且同步策略容易有 mutation 衝突問題。維護性下降,部分功能需自行開發。
② Triplit:全棧資料庫,資料用三元組(triples)格式表示,同步機制簡便且開發體驗優秀,但伺服器端資源消耗巨大且客戶端資料結構膨脹,導致不適合大資料量。
③ InstantDB:類似 Triplit,功能不全且效能遠低於 Watermelon,後端缺乏 webhook 支持,查詢響應時間過長且用戶體驗降低。
④ PowerSync:技術成熟,可整合 Postgres 及 MongoDB,部署複雜成本高,前端 SQLite WASM 有明顯效能瓶頸,啟動時延遲長且查詢緩慢。

→ 【根本問題與解決方向】
★ 離線優先解決方案受限於瀏覽器端 IndexedDB 資料庫只能作為 KV 儲存,所有關係型或圖資料庫等層疊構建均為「黑科技」型 hack,難以承受百兆以上的大型資料集同步與操作。
★ 新一代方案嘗試改用 triples/graph 格式以利同步,但同樣因瀏覽器底層限制在規模擴大時性能下降。
★ Marco 最終採用 Replicache(高度輕量且反應快速的KV庫)與 Orama(強大的索引與全文搜尋)組合,同時獲得穩定的離線同步與靈活查詢能力。
★ Replicache 於 2025 年初開源且免費釋出新版本 Zero,預期將成為業界領先的離線優先產品。

🔖 Keywords:
#離線優先_offline-first #電子郵件管理_email_management #IndexedDB #Replicache #資料同步_data_sync

Offline-First Landscape - Marco – All your emails, one place

Manage all your inboxes effortlessly with a single app. Stay on top of your emails, no matter the provider or device.

An #E2EE messaging app unaffected by #ChatControl

* App: https://chat.positive-intentions.com/
* Code: https://github.com/positive-intentions/chat
* Reddit: https://www.reddit.com/r/positive_intentions

How it works: https://positive-intentions.com/docs/projects/chat

TLDR: I'm working on a #P2P messaging #webapp. Webapps are generally not considered secure because of the nature of serving statics over the internet. This is correct, but not a limitation of this project. (#selfhosting options: https://positive-intentions.com/blog/docker-ios-android-desktop).

As a webapp, I can provide the app with zero-installation and no-registration. The app is only using (local-only) browser storage (specifically #indexedDB). So in a P2P interaction, the traditional concept of "the cloud" is just the physical devices connected over #WebRTC. This allows for things like P2P authentication: https://positive-intentions.com/blog/security-privacy-authentication.

Future:
I'm aiming to create the most secure messaging app out there... (more than #Signal, #Simplex, #threema, #session, #deltachat, #bitchat, etc). I know I have a long way to go to get there. The UI is fairly ugly for the average user, but I think the mechanics are working as expected. I think #JavaScript is underrated in what you can do with it. I'm actively investigating improving the #encryption approach further to align to how the Signal protocol works (currently using a #DiffieHellman key-exchange).

Support:
In the age of #ChatControl, I would like to keep this project #opensource, but open-source funding is not working for me. I don't want your donations (but don't let that stop you) because it isn't sustainable for a long-term project. I have so far only experienced grant-funding rejections. I have no idea what I'm doing in trying to get funding for this project, so any support/advice is appreciated. In recognition of the project in its current state not being able to get funding... (sorry) I will have to go #closedsource (which I'd like to avoid because it undermines several #cybersecurity claims I'd like to make). I don't accept collaboration on the project because this would make tough decisions like going closed-source also immoral.

#privacy #security #messaging #decentralized #peer2peer #webdev #cryptography #selfhosted #FOSS #tech #infosec #developer #funding #startup

positive-intentions

After building a paginated list of items using Dexie’s liveQuery feature, I’ve now refactored the project to use static queries instead.

The live updates aren’t worth the hassle and inconsistencies you have to deal with when using liveQueries—although I’d love for a future version of Dexie to make this easier (which it seems there are plans for in v5 🤞).

#buildInPublic #dexie #indexedDB

Un exemple d'utilisation des services workers et d'IndexedDB (la base de données incluse dans les navigateurs) pour créer un système qui permet d'uploader une image même sans réseau et de faire l'upload réel lorsque le réseau est à nouveau disponible.

🔗 https://www.smashingmagazine.com/2025/04/building-offline-friendly-image-upload-system/

#IndexedDB #progressivewebapps #upload #web

Building An Offline-Friendly Image Upload System — Smashing Magazine

Poor internet connectivity doesn’t have to mean poor UX. With PWA technologies like `IndexedDB`, service workers, and the Background Sync API, you can build an offline-friendly image upload system that queues uploads and retries them automatically — so your users can upload stress-free, even when offline.

Smashing Magazine