I’m the founder of PDFClear (https://www.pdfclear.com). It’s a suite of PDF tools (merge, split, compress, etc.) that runs entirely in the browser. I built this because I was tired of Googling "merge pdf" and landing on sites that require me to upload sensitive bank statements or contracts to an unknown server. I wanted a tool where the file never leaves the device.
The Tech Stack:
The app is built with React and Vite, but the heavy lifting is done via WebAssembly and Web Workers to keep the UI thread responsive.
- PDF Manipulation: I’m using pdf-lib for standard operations (merge, split, rotate).
- Compression & Encryption: For heavier tasks like compressing streams or handling encryption/decryption, I compiled QPDF to WebAssembly (qpdf-wasm).
- OCR: Scanned documents are processed client-side using Tesseract.js.
Local AI (The New Part):
I recently added Semantic Search and Summarization without relying on OpenAI/Anthropic APIs.
- It uses Transformers.js to run ONNX models directly in the browser.
- Search: Uses different models (including nomic-ai/nomic-embed-text-v1.5 and Xenova/GIST-small-Embedding-v0) for embeddings. It chunks the text, stores vectors in IndexedDB (via idb-keyval), and performs cosine similarity locally.
- Summarization: Uses onnx-community/text_summarization-ONNX (quantized) running in a Web Worker.
Privacy:
Because everything runs client-side, no documents are uploaded to my server. You can verify this by inspecting the Network tab. Once the app loads (and the AI models are cached), it works fully offline.
I’d love your feedback on the performance of the local AI models, specifically on older devices.