Law Firm Platform
A document and case management platform for a mid-sized law firm. Handles document generation, case tracking, billing, client portal, and compliance auditing across 50+ attorneys.
A case and document management platform built for a mid-sized law firm with 50+ attorneys across three offices. The platform replaced a combination of paper files, shared network drives, and six different SaaS tools that did not integrate with each other.
The system handles document generation from templates, case timeline tracking, time-based billing, a client portal for document sharing, and comprehensive audit logging for compliance. It processes an average of 1,200 document generations per month with zero template errors since launch.
I was the sole engineer on this project, working directly with the firm's partners to define requirements, architect the system, and manage the rollout across all three offices.
The firm was running on paper files, network drives, and six disconnected SaaS products. Attorneys spent an estimated 4 hours per week searching for documents, tracking case statuses, or manually entering data across systems. Billing was inconsistent because time entries were tracked in spreadsheets and transferred manually to the billing system.
The core requirements were: document generation from legal templates with proper formatting, case timeline with key dates and automated reminders, time tracking integrated with billing, a secure client portal for document exchange, and SOC 2-level audit logging for compliance.
We evaluated practice management platforms (Clio, MyCase, PracticePanther) but found they were rigid in their document workflows and could not match the firm's existing template library without significant rework. The partners valued their established document templates more than any other feature.
The key insight was that attorneys would not adopt the system if it added any friction to document creation. This drove the decision to build a Word-compatible document generation system using docx templates with merge fields, rather than a custom document editor.
The domain was simpler than the CRM — approximately 15 entity types with straightforward relationships. Express with a clean middleware structure was sufficient and reduced the learning curve for future maintenance by junior developers.
The firm required strict data isolation between cases and clients. Different attorneys should only see cases they work on. PostgreSQL RLS policies provided this at the database level, ensuring that even a compromised API endpoint could not leak data across case boundaries.
Rather than building a custom document editor, we used docx templates with merge fields. Attorneys continue to edit their templates in Microsoft Word, uploading them to the platform. The system merges case data into these templates and exports cleanly formatted documents. This was the single most important adoption factor.
Defined 15 entity types, document workflow, and billing rules with firm partners.
Template system, merge engine, PDF export, and document storage.
Case timeline, task tracking, reminders, and client portal.
Time entry, rate tables, invoice generation, and payment tracking.
Migration from legacy systems, training across three offices.
Legal documents have strict formatting requirements — specific fonts, margins, numbering styles, and signature blocks. The docx template approach preserved most formatting but had edge cases with complex tables and nested lists. We solved this by building a validation step that compares rendered documents against a set of formatting rules and alerts the user to potential issues.
The biggest challenge was not technical — it was changing habits. Partners were accustomed to dictating notes to assistants. We built a voice-to-text note system using Whisper API, allowing attorneys to dictate case notes that were automatically categorised and attached to the correct case. This feature alone drove adoption from 30% to 85% in the first month.
1,200+ documents generated per month with zero formatting errors.
85% attorney adoption within 60 days of rollout.
Estimated 3 hours per week saved per attorney on administrative tasks.
Zero security incidents since launch (12 months of production).
Client portal adopted by 90% of active clients for document exchange.
I would have invested more in the template validation system before launch. The formatting edge cases surfaced during the first week of production use, creating friction with early adopters.
The document generation pipeline is synchronous. For complex documents (50+ pages with multiple tables), users wait 10-15 seconds. An async generation with notification would provide a better experience.
Template-based document generation is the right approach for professional services. Custom editors add complexity without proportional value.
Adoption strategy is as important as architecture. Building the voice-to-note feature based on observed user behaviour was more impactful than any technical optimisation.
Row-level security at the database layer provides peace of mind for sensitive data. Even with a bug in the API, the data remains isolated.