Sarah built a small-firm matter-management tool on Lovable and scheduled a pilot with a regional litigation boutique. The firm's general counsel sent a technical review questionnaire: retention schedule, privileged-access log, document storage ACLs, conflict-of-interest intake, e-signature verification. Sarah's Lovable scaffold cleared zero of those items. Documents were in a public Supabase Storage bucket, deletes were hard deletes, the audit log did not exist, and the conflict check was a commented-out TODO in the intake route.
Week one of the legaltech AI app rescue: we flipped all Supabase Storage buckets to private, moved every document fetch to signed URLs scoped per matter and per user with a five-minute TTL, and logged every signed-URL generation to the audit trail. We enabled RLS on matters, documents, clients, notes, and conflicts, wrote attorney-to-matter assignment policies, and added the CI test that fails the build on an unprotected legal table. We installed the retention schedule as a Postgres function that tombstones documents on matter close plus seven years and honours legal-hold flags.
Week two: we built the conflicts intake. A matters table row cannot be inserted without a conflicts row for each adverse party; a match halts the intake and requires an attorney override with a reason and a second-attorney approval. We added signature verification on DocuSign webhooks, envelope-to-matter mapping, and the privileged messaging migration off raw SMS to a channel with at-rest encryption. The pilot firm cleared the technical review and signed the engagement at the end of week two. Total legaltech rescue was $7,499 fixed, inside twelve business days.