Skip to content

404Dealer/free-sign

Repository files navigation

Free Sign (MVP)

Free, open-source, 100% client-side PDF signer + form filler (in-person, hand-the-device flow).

Tech

  • Vite + React + TypeScript
  • pdfjs-dist for rendering
  • pdf-lib for flattening export
  • IndexedDB (idb-keyval) for local caching
  • PWA via vite-plugin-pwa
  • Vitest + Playwright + pixelmatch

Architecture

  • A) Base PDF bytes: immutable Uint8Array
  • B) Overlay Model: DocPackageV1 JSON document (src/model/types.ts, src/model/schema/freesign.v1.schema.json)
  • C) View/UI State: zoom/tool/selection/mode/signer/snap
  • Pipeline: render with pdf.js canvas + DOM overlay, then flatten values back into original PDF using pdf-lib.

Run locally (pnpm only)

pnpm install
pnpm dev

Build

pnpm build

Tests

pnpm test
pnpm e2e

Flow A: Sign it myself

  1. Upload PDF.
  2. Choose Signature/Text/Date/Initials/Checkbox tool.
  3. Place fields and fill them (double click field to fill).
  4. Export PDF.

Flow B: Prepare for someone else (in-person)

  1. Upload PDF.
  2. Keep app in Prepare mode and place fields for signer 1/2.
  3. Switch to Signing mode.
  4. Select Hand to Signer 1 or Hand to Signer 2.
  5. Only active signer fields are editable/focused.

Offline

  • Install/open once while online.
  • After service worker is ready, app shows Offline ready.
  • App can reopen and use cached assets offline.

Known limitations

  • PDF export fidelity — exported PDF field positions may not match on-screen placement exactly. Actively being fixed.
  • MVP text fields are single-line shrink-to-fit (clip at min size).
  • Export font is Helvetica; non-Latin scripts may require custom font embedding in future (fontkit hook not yet included).
  • Current MVP uses one-page-oriented UI behavior even though document model is page-capable.
  • Field placement and resize handles still being refined.

Verification Checklist

  • Run pnpm test
  • Run pnpm e2e
  • Open app offline after first load
  • Export PDF visually matches overlay placement

About

Free, open-source, 100% client-side PDF signer + form filler (in-person, hand-the-device flow). No backend, no accounts, offline-capable PWA.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors