A high-performance local file search engine built with Node.js, SQLite FTS5, and Worker Threads. Designed for speed, security, and elite developer UX.
- ⚡ Super-Fast Search: Uses SQLite FTS5 for native full-text indexing and instant snippet highlighting.
- 🔄 Real-time Indexing: Powered by
chokidar. Every disk update (add, edit, delete) is instantly broadcast to the engine. - 🛡️ Hardened Security: Strictly sandboxed file access (Path Jail via absolute path validation) and shell-injection-proof file opening via
child_process.spawn. - 🚀 Multi-threaded Architecture: Background indexing via Worker Threads keeps the main UI thread silky smooth.
- 🌍 Native Platform Support: Cross-platform open commands for Windows, macOS, and Linux.
- 🧠 Intelligent Incremental Sync: Only re-indexes files if metadata signatures (size + mtime) have changed.
- 🎹 Power User UX:
- Keyboard focus shortcut (
/) - Filter by category (PDF, Docs, Code)
- Semantic file-type icons
- Real-time status pulse
- Keyboard focus shortcut (
graph TD
User((User)) -->|Search / / Shortcut| UI[Web UI: Vanilla JS]
UI -->|API Request| Server[Express Server]
Server -->|Sanitize & Query| DB[(SQLite FTS5)]
Watcher[(Chokidar FS Watcher)] -->|Debounced Event| Server
Disk[Local Storage] -->|Scan / Extract| Indexer[Worker Thread]
Indexer -->|Upsert Meta & Text| DB
-
Prerequisites: Node.js (v18+ recommended).
-
Install Dependencies:
npm install
-
Configure Search Path: Open
config.jsand set your desiredscanPath. By default, it indexes the project folder. -
Launch the Engine:
npm start
-
Access LocalLens: Open your browser to:
http://localhost:3000
- v1.3: Security, Path Jailing & Platform Support
- v1.4: Elite Polish & "LocalLens" Identity
- v1.4.1: Robust Path Sandbox & Documentation Polish
- v2.0: Advanced OCR support for Scanned Image/PDFs
- v2.1: Local AI embeddings (Semantic Search)
This project is licensed under the MIT License - see the LICENSE file for details.
