Inspiration
It's 11 PM and the landlord wants the lease back by morning. It's 14 pages of dense legal language, and the apartment is the one you can afford, near the job you just got. So, you decide to sign.
Somewhere on page 9 is a sentence that says you give up your rights to repairs. On page 11, the landlord may change the locks if rent is late. In most states, neither clause is actually legal. But the innocent tenant doesn't know that, so for the next twelve months, those clauses work exactly as if they were law. The heat breaks and they don't ask. The rent is three days late and all they can do is panic.
That's the issue we couldn't stop thinking about. Tenant protections exist on apper, in statues most renters will never read. The people who need them the most (first-time renters, students, immigrant families, people who don't read English as a first language) are the least likely to know those protections exist. A lease is often the most important contract a person signs all year, yet it's the one they get the least help with.
We wanted to build something a tenant could trust and something that can prevent themselves from facing injustice.
What it does
Lease X-Ray is an x-ray for your lease. Upload a PDF or paste the text, pick the state the rental is in, and within seconds every clause lights up on the actual document:
- Red: Likely illegal: with the statute cited and linked
- Orange: One-sided: legal, but worth negotiating
- Green: Standard
- Purple: What's missing: protections the law requires that aren't in the lease at all
lick any clause and you get a plain-language explanation, what the law says, why it matters to you, and a fairer rewrite that uses the lease's own numbers. Then Lease X-Ray turns the findings into action: a negotiation letter that cites the law, a printable report to bring to a legal-aid clinic, and an "Ask your lease" chat that answers only from your lease and the rule library.
It covers all 50 states + DC and works in the 10 most-spoken languages in U.S. homes, including right-to-left Arabic.
How we built it
The biggest danger of AI in law isn't that it's unhelpful. It's that it's confidently wrong. A hallucinated statute given to a scared tenant is worse than no answer at all. So we built Lease X-Ray around one rule: the AI reads and explains, but the law comes only from a curated, cited library.
- Extract.
pdf.jsreads the lease in the browser and keeps the exact position of every word on the page. - Redact. Names, addresses, phone numbers and emails are stripped on the user's device before anything is sent.
- Segment. The lease is split into clauses using its own numbering and headings.
- Deterministic checks. Rules test the clauses directly. Is the deposit over the state cap? Is the late fee charged before the legal grace period? Does the clause say "waive… repairs" or "change the locks"?
- Grounded AI review. The model classifies each clause, but its output is schema-validated and it may only cite rule IDs from the state's library. Any citation outside the library is thrown out and the clause is downgraded to "needs review." Nothing can be labeled illegal unless a real rule backs it, and the AI can never overrule a rule check downward.
- Highlight mapping. Every clause is matched back to its exact position on the PDF, word by word, even when it breaks across pages around headers and footers.
- Score. A transparent Lease Health Score:
$$ \text{Score} = \max!\Big(0,\ \min\big(100,\ 100 - 18\,I - 6\,U - 5\,M\big)\Big) $$
where I = likely-illegal clauses, U = one-sided clauses, and M = missing protections.
The rule library is the product. New Jersey and New York have in-depth, hand-built libraries. The other 48 states and DC get core rules generated from a cited 50-state table: deposit caps, return deadlines, entry notice and late-fee limits. On top of that sit federal Fair Housing Act protections and nationwide principles from the Uniform Residential Landlord and Tenant Act. Those are labeled as model law, so users know to confirm their own state's statute. Every citation carries a "pending attorney review" flag until a lawyer signs off. The whole library is public on our Know Your Rights page: it's exactly what the AI is allowed to cite, and nothing more.
Stack: Next.js 14, TypeScript, Tailwind, Framer Motion, pdf.js, Zod, and Claude with structured outputs. It also runs with no API key and even offline: the rule engine runs in the browser, so the core protections never depend on a server.
Challenges we ran into
One of major challenges we faced was gathering federal data from all 50 states. Deposit caps range from one month's rent to three, or none at all. Entry ntoice ranges from 12 hours to 48 to just "reasonable." Our source disagreed on several states, so we cross-checked them, used the most recent law, and only encoded a rule where we were confident. For everything else we fall back honestly to "one-sided," with no fake citation.
Another thing was PDFs don't know what a "clause" is. We had to rebuild the text layer, align AI-returned quotes word by word, skip page footers, and still find text after names had been redacted.
Supporting the language ecosystem also was quite arduous as that meant translating every string and flipping the entire layout for Arabic. We had to keep lease quotes and citations in their original English so nothing legal gets lost in the translation.
Accomplishments that we're proud of
Transparency you can audit: the full rule library is public, every citation carries a review status, and nationwide "model law" principles are labeled so tenants know to confirm their own state's statute. The tool shows its work, the way a lawyer would.
Overall, we're proud of building a tool that we hope can change the lives of people who've never been able to make sense of the legal jargon in their own lease. The law already protects them. Now they can finally see it.
What we learned
- In law, a wrong answer is worse than no answer. Grounding isn't a feature we added on top. It's the foundation everything else rests on.
- Turning a statute into something a 16-year-old or a grandmother can understand, in their own language, is where AI is truly transformative.
- Most legal-aid work happens after something goes wrong. A tool used before signing can stop that harm from happening at all!
What's next for Lease X-Ray
- Attorney-verified rule libraries built with legal-aid organizations and law school clinics, so that "pending review" becomes "verified."
- Local ordinances: rent control, city notice rules, just-cause eviction laws.
- Photo uploads, so a tenant can scan a paper lease with a phone.
- A clinic dashboard that lets legal-aid staff triage dozens of leases in the time it now takes to read one.
- Going beyond leases: the same grounded engine could read employment contracts, medical debt agreements, and terms of service!
Built With
- claude
- claudecode
- css
- docx
- framer-motion
- fuse.js
- github
- html
- javascript
- next.js
- node.js
- pdf-lib
- pdf.js
- radix-ui
- react
- tailwindcss
- typescript
- zod
Log in or sign up for Devpost to join the conversation.