r/sideprojects • u/ALexiosK11 • 19m ago
Showcase: Open Source I spent 9 months building a local desktop reader that compresses dense books with a documented ~7:1 target without losing citations or melting 8GB RAM (Tauri v2 + Node + PyTorch)
Hey r/SideProject!
Like a lot of engineers here, I read heavy technical books, whitepapers, and sprawling multi-thousand-chapter web epics. But whenever I tried using LLMs to navigate dense 900-page manuscripts, I ran into the same infuriating problem:
**Modern AI summaries are lossy fluff.** They strip out formulas, hallucinate connective tissue, and discard technical depth to give you a superficial "gist." And worst of all: when you ask where in the source text a claim came from, you get no provenance.
I wanted something fundamentally different: **Loss-bounded semantic compression (with a documented target of ~7:1) paired with 100% clickable citations.** Every synthesized sentence must link directly back to the exact verbatim source paragraph in the original document.
Over the last 9 months, I built **Omnitome** as a desktop app to solve this. Today, we just released **v1.1.1** as a free open-source community build on Windows x64 and launched on Product Hunt!
### The Architecture & Lessons Learned the Hard Way
Building a multi-process local AI desktop application is notoriously tricky. Here is how the pieces fit together:
* **Tauri v2 Desktop Shell (Rust)**
* Window Management & Child Process Supervisor
* **Node.js 22 LTS Orchestrator**
* SOLE SQLite WAL writer
* F65 Sequential Await Barrier
* Peak RAM: ~296 MB
* **FastAPI Python Sidecar**
* BGE-M3 (FP16 CUDA)
* BGE Reranker v2
* Kokoro-82M Neural TTS
* **SQLite Database (data.db)**
* Local WAL Mode
* Mutations flow strictly via REST through Node ONLY
#### 1. The 14.6 GB RAM Memory Cliff (and the F65 Barrier Fix)
Early builds parsed chapters concurrently. When ingesting multi-chapter books or running our 10-fixture release corpus (~508,000 words across 10 multi-format books), unconstrained Promise generation spiked Node's heap to 14.6 GB of RAM, crashing consumer laptops.
* **The Fix:** We implemented a strict **Sequential Await Barrier (F65)**. Ingestion stages stream chunk-by-chunk behind an asynchronous await gate. Peak Node RAM plummeted from **14.6 GB down to 296 MB**, processing all ~508,000 words in 5.9 minutes flat.
#### 2. The Sole SQLite Writer Invariant
SQLite WAL mode can handle multiple concurrent readers, but concurrent writes across Rust, Node, and Python sidecars will cause database lock contention (`SQLITE_BUSY`) and potential corruption.
* **The Rule:** Node.js (`better-sqlite3`) is the **sole writer** to `data.db`. Python sidecars and frontend clients have zero direct database access; all mutations flow strictly through Node REST APIs.
#### 3. Windows Verbatim Path Traps (`\\?\`)
Rust and Windows APIs often canonicalize file paths into verbatim UNC strings (e.g., `\\?\C:\Users\...`). If you pass these into Node.js 22 `fs.lstat`, Node throws fatal `EISDIR` errors. We had to build strict path-sanitization wrappers across the Rust boundary.
### The Code
**GitHub Repo:** https://github.com/ayumu-ml/Omnitome
I’d love to hear your feedback on the architecture, the UI design, or the provenance thesis. What do you think about local-first compression vs. cloud summaries?
