Static Export (SSG) with Zero Backend Data Endpoints
By configuring Next.js for static HTML export (`output: "export"`), the entire application is compiled into pre-rendered static HTML, CSS, and JavaScript files distributed via global edge CDNs (Cloudflare Pages).
Because there are no backend server processes or Node.js APIs receiving document uploads, there is literally nowhere for an attacker to intercept or harvest customer files.
Offloading Heavy CPU Workloads to Web Workers
Compressing a 100-page PDF or manipulating a 4K image requires heavy CPU computation. If executed on the browser main thread, the page UI freezes and triggers "Page Unresponsive" browser dialogs.
Dedicated Web Workers run tasks on background CPU threads, streaming progress events back to React state without lagging UI clicks or animations.
Step-by-Step Tutorial
Configure Next.js Static Export
Add `output: "export"` and `trailingSlash: true` in your `next.config.mjs`.
Implement Web Worker CPU Isolation
Initialize worker instances using native `new Worker(new URL("./worker.ts", import.meta.url))`.
Deploy to Cloudflare Global Edge
Deploy static assets to Cloudflare Pages for sub-50ms global TTFB delivery with $0 server compute bills.
Ready to Try It Yourself?
DocSwift processes everything directly on your device. Fast, safe, and completely free forever.
How helpful was this guide?
Rated 4.9 / 5 by 3,420+ users worldwide
Share with Colleagues & Friends
Help others protect their document privacy
Frequently Asked Questions
Are client-side web apps immune to server database breaches?
Yes! Because client-side zero-knowledge apps never upload, process, or store user documents on a database, there is zero customer data on the server for hackers to breach.