LegalDoc
Multi user contract analysis. Clause extraction, compliance checks and precedent search across a thousand plus uploaded documents.
AI engineering
legal text is long, repetitive and load-bearing, which is exactly the shape of problem an LLM is worth paying for. upload a contract and LegalDoc hands back the clauses, the compliance gaps, and the precedents that look like it.
Next.js and TypeScript on the front, Supabase underneath: Postgres for the records, PGVector for the search, signed URLs for the files. upload and retrieval land around 50ms because the file never touches my server. the browser talks to storage directly and I only hand out the signature.
auth is Auth0 with JWTs, and every document action goes through row level security. it's a multi user tool holding other people's contracts. one query without an owner check and the whole thing is a liability instead of a product.
the three analyses run on serverless LLM endpoints at the edge with SWR on the client, so results arrive in under a second each and stream in rather than sitting behind a spinner.
What I’d point at
row-level security instead of filtering in the API layer. if the check lives in my code I have to remember it in every route; if it lives in the database I can't forget it.