Private, offline-first document packer. Drag/drop PDFs & images → rename by safe templates → compress on-device → ZIP with a manifest. Optional OCR hints for smarter defaults.
- Offline-first PWA (works fully offline after first load)
- Drag & drop or paste PDFs/images; accessible UI components
- Safe templating with tokens, fallbacks, and helpers:
{{Field}},{{First||Last}},{{slug(Last)}},{{upper(DocType)}} - Smart hints: filename/EXIF + optional on-device OCR (Tesseract.js)
- Client-only compression:
- Images → compressed PDF (max 2000px, quality 0.7)
- PDFs → light normalize; text-only PDFs marked “server recommended”
- ZIP export with
manifest.txt(columns:OriginalName | NewName | OriginalSize | FinalSize | SHA256 | ISO8601) - PWA service worker caches shell + assets; zero file uploads
- Playwright e2e, GitHub Actions CI
- Next.js 14 App Router (TypeScript)
- Tailwind CSS + shadcn/ui (Radix)
- JSZip, pdf-lib, browser-image-compression, exifreader, Tesseract.js
- Minimal service worker for offline caching
- Playwright + GitHub Actions
- Optional .NET 8 Minimal API for high‑ratio PDF compression/signing
- Ingest: drag/drop/paste via
src/components/DropBox.tsx - Hints:
src/lib/smart/hints.tsinfersDocType,Side,DateISOfrom filename/EXIF; optional OCR for small files - Template:
src/lib/template.tsrenders safe names with fallbacks/funcs; validated and capped length - Compression:
- Images:
src/lib/compress/image.ts→ JPEG/WebP downscale;pdf-libwraps to one‑page PDF - PDFs:
src/lib/compress/pdf.tslight save; text‑only PDFs flagged for server compression
- Images:
- Pack:
src/lib/pack.tszips files, writesmanifest.txt, computesSHA-256viasrc/lib/hash.ts - Offline/PWA:
public/sw.jscaches shell; registered insrc/components/PWARegister.tsx
- 100% client‑side; no files leave your device.
- OCR runs locally via WebAssembly (Tesseract.js).
- Optional server compression is opt‑in, not required for the main flow.
- Multi‑page merge/reorder; page splitting
- Batch metadata editing and saved presets
- PDF text layer optimization on device
- Optional .NET service integration (high‑ratio compression, signing)
- i18n; keyboard shortcuts; more template helpers
Prereqs: Node 20, pnpm 9.
pnpm install
pnpm dlx husky init # enable git hooks (optional)
pnpm dev # http://localhost:3000Quality gates:
pnpm typecheck && pnpm lint
pnpm test:e2eBuild & run:
pnpm build && pnpm start- Vercel (one‑liner):
vercel --prod - Fly.io (.NET service one‑liner):
fly launch --now(from your .NET service folder)
vercel.json includes { "cleanUrls": true }.
- Required env (Project Settings → Environment Variables):
- NEXT_PUBLIC_APP_NAME=DocPackr
- NEXT_PUBLIC_OCR_ENABLED=true
- NEXT_PUBLIC_AI_ENABLED=false
- NEXT_PUBLIC_API_BASE=
- DOCSIGN_PUBLIC_KEY=
- (optional server-side) OPENAI_API_KEY
- Build:
pnpm build - Install:
pnpm i --frozen-lockfile
MIT
DocPackr helps you organize documents but does not provide legal advice. Verify naming and filing requirements with the relevant authority before submission.


