惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
罗磊的独立博客
爱范儿
爱范儿
J
Java Code Geeks
博客园 - 司徒正美
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
美团技术团队
小众软件
小众软件
Google DeepMind News
Google DeepMind News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
V2EX
博客园 - 聂微东
云风的 BLOG
云风的 BLOG
WordPress大学
WordPress大学
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Jina AI
Jina AI
Y
Y Combinator Blog
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Martin Fowler
Martin Fowler
Vercel News
Vercel News

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How I Built a Privacy-First PDF Toolkit That Runs Entirel...
armor229-ux · 2026-06-24 · via DEV Community

armor229-ux

Most "free" PDF tools online have a dirty secret: they upload your files to their servers. Some keep them. Some scan them. Some sell the data.

I wanted to build something different — a PDF toolkit where files never leave the user's browser.

The result is FileFlex — a free, browser-based file toolkit.

The Problem with Existing Tools

Open any popular online PDF tool and watch the Network tab in DevTools. You'll see your file getting uploaded to their servers within seconds. Then you wait. Then you download.

Why? Two reasons:

  1. They use server-side libraries (faster, but requires upload)
  2. They want to track your usage and show you ads

I wanted to flip this model.

The Stack

  • Next.js 14 (App Router)
  • TypeScript for type safety
  • Tailwind CSS for styling
  • pdf-lib for PDF operations
  • browser-image-compression for images
  • Web Crypto API for password protection
  • Vercel for hosting

The Magic: Browser-Based PDF Merge

The hardest part was getting PDF merge to work without a backend. Here's the core logic:

\`javascript
import { PDFDocument } from 'pdf-lib';

async function mergePDFs(files) {
const mergedPdf = await PDFDocument.create();

for (const file of files) {
const pdfBytes = await file.arrayBuffer();
const pdf = await PDFDocument.load(pdfBytes);
const pages = await mergedPdf.copyPages(
pdf,
pdf.getPageIndices()
);
pages.forEach((page) => mergedPdf.addPage(page));
}

const mergedBytes = await mergedPdf.save();
return new Blob([mergedBytes], { type: 'application/pdf' });
}
`\

That's it. No server. No upload. Just JavaScript in the browser.

What FileFlex Does

  • ✅ Merge PDFs
  • ✅ Compress PDFs (up to 80% smaller)
  • ✅ Password-protect PDFs
  • ✅ Compress images (JPEG/PNG/WebP)
  • ✅ Generate strong passwords

Why This Approach Wins

  1. Privacy: Your files never leave your device
  2. Speed: No upload/download wait
  3. No limits: No file size restrictions (browser memory aside)
  4. Free forever: No server costs = no need to charge

Try It

Live demo: https://file-flex-psi.vercel.app

It's free, no signup required.

Lessons Learned

  1. Browser APIs are surprisingly powerful — you can do way more than you'd think without a backend
  2. Privacy is a feature — users genuinely care
  3. Removing signup walls boosts usage — friction kills conversion

What's Next

I'm working on:

  • Split PDF feature
  • PDF to JPG conversion
  • HEIC to JPG converter
  • More languages

What other browser-only tools would you want? Let me know in the comments! 👇


If you liked this, follow me for more web dev posts. The full source approach is documented on the blog.