Greenmint Labs
Multi-Phase BuildMulti-Phase BuildProject duration
Full practice management + AI suiteFull practice management + AI suiteScope
LegalLegalIndustry
Next.jsNext.js
ReactReact
TypeScriptTypeScript
ConvexConvex

Overview

LawAI is a legal operating system we built for Saudi law firms. It runs the whole practice in one place — clients, cases, hearings, documents, billing, tasks, and client messaging — and threads AI through every part of it. The difference from a generic legal chatbot is that everything the AI produces is grounded in real Saudi law and the firm's own private documents, so the work product cites the article it relied on and refuses to invent one when the source isn't there. The firm's documents and an authoritative Saudi legal corpus feed a single retrieval pipeline, in Arabic and English with full parity. The case file and the assistant are the same surface, so a lawyer stops copying between a practice tool and an AI tool.

The Challenge

Law firms sit on two problems at once. Their practice management is scattered across disconnected tools, and the AI products meant to help them draft and research tend to make things up — which in law is not a minor flaw but a disqualifying one. A Saudi firm carries the added weight of a bilingual requirement and a body of law — Royal Decrees, MOJ rulings, Board of Grievances precedent, and Sharia principles — that a foreign tool doesn't model. The firm needed a platform that could: • Run the entire practice and layer AI directly onto the case file, not beside it • Answer legal questions with real citations, and say nothing rather than fabricate when it has no source • Work in Arabic and English as equals, including right-to-left layout and Arabic-aware search • Model the actual structure of Saudi legal work — court hierarchy, case types, and a Najiz-style case file • Separate what partners, associates, paralegals, and clients can each see, down to the route The hard part was trust. A drafting tool a lawyer cannot rely on is worse than no tool, so the whole system had to be built so that fabricated law is prevented by the architecture, not just discouraged by a prompt.

What We Built

A grounded AI suite. More than a dozen AI modules, each one citing its sources. Legal research returns answers in a fixed lawyer's schema (short answer, legal basis, precedents, confidence, detailed analysis). A case assistant is grounded in everything inside that matter plus the corpus. Drafting learns the individual lawyer's voice from their past work so the output reads like their own hand. Clause and risk detection audits contracts against Saudi law and Sharia before they're signed. Opponent analysis with a score you can trust. The system reads an opposing filing and returns the issues, arguments, precedents, strengths, and weaknesses, then scores it 0 to 100 across five dimensions. The arithmetic is recomputed on the server so the number isn't something the model can drift on, and the Arabic and English versions are required to score identically. A hybrid retrieval engine. The technical core. It runs three search strategies in parallel — vector, full-text over the firm's own documents, full-text over the shared corpus — fuses and reranks them, caches at three layers so repeated questions return instantly, and keeps every tenant's documents isolated from every other's. In strict mode, when nothing grounded exists, it returns a no-source signal and offers the lawyer an explicit choice to fall back to general AI. A platform agent that acts. A page-aware assistant that doesn't just answer but creates clients, opens cases, and books appointments through conversation, filling in missing details and parsing dates in Arabic or English. The full firm around it. Seven permission roles with route-level restrictions, an approval workflow for new members, a walled-off client portal, versioned documents, Google Drive case folders, and calendar sync with Google and Outlook.

Why It Wins

• Grounded, not guessing. Strict mode answers only from the firm's own sources and refuses to invent article numbers. The anti-hallucination rule lives in the retrieval architecture, not just the prompt. • Numbers you can trust. The strategy score runs on a fixed rubric recomputed server-side, with cross-language consistency built in. • Truly bilingual. Arabic and English at full parity, with right-to-left layout and Arabic-aware search, built in from the start rather than translated on. • Real Saudi domain modeling. Royal Decrees mapped by case type, court hierarchy, Sharia principles, and a Najiz-style case file are part of the product. • It sounds like the firm. Style learning biases every draft toward the lawyer's own voice, so the output needs less editing before it's signed. • Enterprise-ready. Role-based access, audit logs, multi-tenant isolation, and a separate client portal.

Outcome

We delivered a working legal operating system that gives a Saudi firm its whole practice and a grounded AI suite on one surface, in Arabic and English, with citations a lawyer can actually stand behind.

Let’s build something that matters

Have an idea, a problem to solve, or a product you want to improve?