DocuHelp is a high-performance, RAG-based document analyzer that operates entirely within your browser. Your documents never leave your computer, ensuring total privacy and security.
- 🔒 100% Local & Private: No data is ever uploaded to a server. All parsing, embedding, and inference happen in your browser.
- ⚡ WebGPU Accelerated: Leverages WebLLM and MLC runtime to run small language models (SLMs)
- 🧠 Modern RAG Pipeline: Built-in document parsing, semantic chunking, and vector search.
- 📂 Multi-Format Support: Parse and analyze PDF, Markdown, and TXT files instantly.
- 💾 Persistent Storage: Uses IndexedDB to store your document chunks and vector embeddings securely across sessions.
- Frontend: React + Vite + Tailwind CSS
- AI Inference: WebLLM (LLM) & Transformers.js (Embeddings)
- Vector Search: Custom Cosine Similarity search with IndexedDB persistence
- Parsing: pdf.js & marked.js
- Parse & Chunk: Documents are split into ~400-token windows with a 50-token overlap to preserve context boundaries.
- Embed: Each chunk is run through the
all-MiniLM-L6-v2model in-browser to generate 384-dimensional vectors. - Store: Chunks and vectors are persisted to IndexedDB for fast future access without re-processing.
- Semantic Search: Your query is embedded and compared against stored chunks using cosine similarity.
- Context Injection: The top-5 most relevant chunks are injected into a structured system prompt.
- Streaming Inference: The LLM (processed via WebGPU) generates and streams the answer directly to the chat interface with source citations.
- A modern browser with WebGPU support (Chrome, Edge, or latest Safari/Firefox).
- Node.js (v18+)
- Clone the repository:
git clone https://github.com/PS-NaMaN/DocuHelp.git cd DocuHelp - Install dependencies:
npm install
- Run the development server:
npm run dev
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) - see the LICENSE file for details.
Built with ❤️ by NaMaN