Building an Offline HTML5 Canvas Signature Pad & Printable Contract Studio in Vanilla JS (MIT)
Sending a clean Statement of Work (SOW) or service contract shouldn't require paying a monthly DocuSign or PandaDoc subscription—especially for solo developers and designers working with 2–5 clients a month. So I built
Sending a clean Statement of Work (SOW) or service contract shouldn't require paying a monthly DocuSign or PandaDoc subscription—especially for solo developers and designers working with 2–5 clients a month.
So I built ContractCraft, an offline-first freelance contract and e-signature generator that runs natively from index.html with zero backend and zero third-party libraries.
Engineering Highlights
-
DPR-Safe HTML5 Canvas Signature Pad: Mouse and touch pointer events normalize coordinates against
canvas.getBoundingClientRect()so strokes stay razor-sharp and export cleanly as embedded PNG data URLs inside the printable document. - Dynamic Legal Clause Composition: Instead of editing brittle Word documents, smart toggles (IP transfer only on 100% payment, 50% upfront deposit, 2-round revision cap, 1.5% monthly late fee, 25% kill fee) dynamically compose crisp numbered clauses in real time.
-
Vector A4 PDF Output via
@media print: Browser-native printing hides editor controls and renders only#contract-sheeton A4 (@page { size: A4; margin: 0; }), suggesting<ContractRef>_<ClientName>.pdfautomatically.
Try It Free (MIT Open Source)
- Live Browser Demo: https://minhduy6868.github.io/contractcraft-lite/demo/
- Overview & Sample PDF: https://minhduy6868.github.io/contractcraft-lite/
- GitHub Repo (MIT): https://github.com/minhduy6868/contractcraft-lite
It pairs directly with FolioDesk (my offline invoice & proposal studio: https://minhduy6868.github.io/foliodesk-lite/). If you want the full multi-template offline suite (5 contract templates + Invoice/Proposal CRM + Rate Calculator), grab the Pro studio here: https://payhip.com/b/fgPjn (code FOLIODESK40 gives 40% off).
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.