Lumina Engine
Minimalist local-first markdown workspace with instant fuzzy search
What needed to be solved
Traditional web note-taking apps rely heavily on remote cloud databases, resulting in typing latency, cloud lock-in, and degraded performance when notes exceed thousands of files.
How I engineered the solution
Built a local-first browser client that stores data directly in IndexedDB and offloads query parsing and text indexing to a Rust-compiled WebAssembly module running inside a background Web Worker.
Core components & data flow
- React UI layer with zero heavy state synchronization overhead
- Web Worker running a compiled Wasm fuzzy search engine
- IndexedDB storage layer wrapped in a lightweight transactional schema
- Virtual list renderer handling 10,000+ notes at 60 FPS
The bottleneck & breakthrough
Managing thread boundaries between the main React render loop and the Web Worker without incurring high serialization latency on large search payload returns.
Engineering chronology & pivots
Initially experimented with client-side FlexSearch and Fuse.js running directly on the main UI thread. However, indexing 5,000+ notes caused visible typing lag and dropped frames during rapid keystrokes.
Shifted text tokenization and fuzzy matching logic into a compiled Rust WebAssembly module, running asynchronously inside a dedicated Web Worker thread to isolate the UI renderer.
Implemented shared memory ArrayBuffer transfer across Worker postMessage boundaries, eliminating serialization overhead and locking query response times under 5ms.
What I Learned
How to profile WebAssembly memory allocation in Chrome DevTools, serialize binary buffers effectively across Web Worker postMessage boundaries, and design predictable local-first fallback states.
Measurable Result
Achieved sub-5ms query response times over 10,000 markdown documents completely client-side without a single server round-trip.
Need high-performance web systems built?
I craft custom full-stack web platforms, local-first architectures, and accessible design systems. Let's discuss your project.