
The problem
Every contract or claim was built by copying a Word template and changing names, amounts and dates by hand.
What changed
Documents come out with the right data, linked to their case, and get signed online with an e-signature.
What I built
- Template engine that compiles .docx files with named placeholders into final documents with full styling preserved.
- Case-tracking layer linking each generated document to its matter, version and signer state.
- Cost-per-document analytics so the firm sees where time and money go per case type.
- MIFIEL-backed e-signature flow with audit trail.
What I learned
- Word's XML model is hostile but predictable. Once mapped, you can do anything programmatically.
- Versioning legal docs is a product problem, not a git problem. Lawyers think in named revisions, not commits.
- If you treat document generation as a build system, caching and idempotency come for free.
Stack
- Next.js
- TypeScript
- Tailwind
- Postgres
- Prisma
- docxtemplater
- MIFIEL