Inspiration
Renters rarely read the full lease before signing. The document is long, dense, and full of legalese that assumes legal training the average tenant simply doesn't have. I kept seeing the same story repeat itself: people discover the unfair clause after it bites them — a surprise fee, an illegal entry, an eviction with no notice. The power imbalance between landlord and tenant is largely an information imbalance. I wanted to build something that closes that gap in the five minutes before someone signs.
What it does
LeaseLens is basically a web app that allows a user to scan a lease by just uploading the lease file or by just pasting the plain text in the textbox. The user is also able to select the lease type, the jurisdiction (i.e. the country the lease is from) and also the output language in case the user wants the result to be in another language. The user is also able to go to previous scanned files so as to review or download the scanned result.
How we built it
The stack is React + Tailwind CSS on the Base44 platform, which provides the backend, auth, database, and serverless functions.
Entity model. A LeaseAnalysis record stores the summary, overall risk score, jurisdiction, and the full array of flagged clauses. Row-level security ensures each user only sees their own scans.
Backend function analyzeLease. It authenticates the caller, extracts text from an uploaded file, truncates to a safe length, then calls the LLM with a tenant-rights prompt and a JSON response schema. The model is instructed to write explanations in the user's chosen language while keeping quoted clause text in the original language.
Frontend. A single-page flow: paste or upload → pick lease type, jurisdiction, and output language → analyze → review color-coded clause cards with expand/collapse animations. Results persist to the dashboard and export to PDF.
Auth + pages. Email/password and Google sign-in, a dashboard of saved scans, a jurisdiction guide, a profile page with a default jurisdiction, and a support ticket system.
Challenges we ran into
Unbounded input. Early versions choked on long leases. Capping the text at 60,000 characters and slicing beyond that kept the prompt within token limits without losing the bulk of a typical residential lease.
Anonymous abuse of the AI endpoint. The function spent credits for anyone who called it. Wrapping it in an auth.me() check and returning a 401 for unauthenticated callers closed the hole cleanly.
Branding removal for App Store compliance. The platform badge is server-injected; CSS hiding is a stopgap, and a true removal requires a plan upgrade — a constraint worth knowing up front.
Multi-language output without translating quotes. The prompt had to explicitly instruct the model to keep clause-text in the original language while writing everything else in the chosen output language. Without that, the model would translate the quotes and destroy their evidentiary value.
Making it feel alive. A purely static legal tool feels cold. Adding a looping animated background (drifting gradient blobs, floating document and checkmark icons) to the home and auth pages gave it warmth without distracting from the core task.
Accomplishments that we're proud of
I'm proud of myself for making such a thing. Since this is actually my first hackathon, i'm really happy and i am also happy of how LeaseLens came out.
What we learned
LLMs as structured reasoners. Asking the model to return a strict JSON schema (rather than free text) is what makes the whole UI possible — every clause becomes a typed object with risk level, plain language, legal mapping, and recommendation. The schema is the contract between the AI and the app.
Jurisdiction is everything in tenant law. A "standard" clause in one country is illegal in another. The same prompt yields wildly different — and correct — answers depending on the jurisdiction string. Context-grounded generation (add context from internet) was essential for citing real statutes.
Security is a product feature. Leaving a credit-burning AI endpoint open to anonymous callers is a bug, not a configuration detail. Gating the function behind authentication protects both the user's data and the app's budget.
What's next for LeaseLens
Honestly speaking, even i don't know what would be next for this project. I'll probably just recommend it to a friend or a maybe company so as to spread it's name
Log in or sign up for Devpost to join the conversation.