Why I built a local-first PDF ... Note

Why I built a local-first PDF toolkit using Nuxt and OPFS

Mainstream PDF tools require users to upload sensitive documents to remote servers, raising privacy and regulatory concerns despite encryption in transit. To address this, beePDF, a 100% client-side Progressive Web App, processes documents entirely within the browser, never uploading them. Its tech stack includes Nuxt, @vite-pwa/nuxt, pdf-lib, PDF.js, and Pico CSS. A key innovation is the use of the Origin Private File System (OPFS) for local persistence. OPFS provides a private, origin-scoped filesystem with fast, byte-level access, ideal for large binary files like PDFs. It eliminates permission prompts and offers synchronous access in Web Workers for performance. The processing pipeline reads files into memory, stores them in OPFS, and offloads heavy tasks to Web Workers. Metadata and thumbnails are stored in IndexedDB. Document modifications trigger direct client downloads, ensuring offline functionality. Challenges include browser memory ceilings for very large files and the necessity of offloading intense tasks to Web Workers to prevent UI blocking.