How I built a Serverless PDF Editor with Vanilla JS (and $0 cloud bills)
Source: Dev.to
We all have that moment. You need to merge two PDF contracts or compress a video file, and you search on Google. You find a tool, upload your file, and then… you wait.
And then you wonder: “Wait, did I just upload my tax return to a random server in a country I can’t pronounce?”
That paranoia is exactly why I built DuneTools – a suite of PDF, video, and image tools that runs 100 % in the browser. No uploads. No privacy risks. Just pure JavaScript.
1. The Architecture: Client‑Side is King 👑
Most PDF tools work like this:
User -> Upload -> Server processes (Python/PHP) -> Download
DuneTools works like this:
User -> Browser (WASM + JS) processes -> Done
By using libraries like pdf-lib and WebAssembly wrappers for FFmpeg, modern browsers are powerful enough to handle heavy media editing. This has two massive benefits:
- Privacy: The file never leaves the user’s device.
- Cost: Server costs are flat – whether I have 10 users or 10 000, I don’t pay for CPU processing time.
2. Why Vanilla JS? (No React, No Vue) 🍦
I know, I know. It’s 2025. Why not use Next.js?
For a tool like this, performance is the feature. I didn’t want to ship 200 KB of hydration scripts just to render a “Merge PDF” button.
3. My “Hybrid” Build Workflow
Instead of a heavy JS framework, I use Python as a static‑site generator:
- Write the logic in plain Vanilla JS.
- Use Python + Jinja2 templates to generate the HTML pages for each tool (SEO is crucial).
- The Python script compiles everything into a static folder ready for deployment.
Result
- Lighthouse Score: 100/100 🟢
- Load Time: Instant.
4. The Deployment: Vercel (Zero Config) ▲
Since the app is entirely client‑side with no backend database, I didn’t want to manage servers, SSH keys, or Docker containers. I chose Vercel for deployment because it fits my “lazy developer” philosophy:
- Git Integration: Push the generated static files to GitHub; Vercel detects the change and deploys automatically.
- Global CDN: Static assets (JS/WASM) are cached on the edge, making the tool load instantly worldwide.
- Cost: Free. No Serverless Functions are used for processing, so I stay comfortably within the free tier limits.
It’s the ultimate “set it and forget it” setup.
5. The Result: DuneTools 🏜️
The project is now live and includes:
- PDF Tools: Merge, split, compress.
- Video: Converter, GIF maker.
- Images: Compression, resizing.
It’s fast, it’s free, and most importantly, it’s private.
I’d love for you to roast my code or give feedback on the UX.
👉 Try it here: DuneTools.com
(P.S. If you are an Indie Hacker looking for a privacy‑first alternative to iLovePDF, I built this for you!)


