Inspiration
Last semester, our teammate moved into a new apartment in San Jose. Two months in, his landlord hiked the rent by 15% — no warning, no explanation. He didn't know that California's AB 1482 caps annual increases at 5% + CPI. He paid it because he didn't know any better.
Around the same time, another one of us was moving out of his place. The landlord withheld $1,400 of his security deposit claiming "wall damage" and "carpet wear." The thing is — those marks were there when he moved in. But he had no documentation. No photos, no video, nothing. Just his word against the landlord's.
These aren't unusual stories. According to the National Consumer Law Center, an estimated 3.6 million renters lose part or all of their deposit unfairly each year. Tenant rights violations are widespread — not because the laws don't exist, but because most tenants have no idea what's in their lease or what protections they have.
We're grad students. We can't afford a lawyer. But we can build one.
That's what LeaseGuard is — a free, phone-first tool that gives every renter the same legal awareness that a $400/hour attorney would provide.
What it does
LeaseGuard has five tools, each solving a different problem tenants face every day:
Legal Shield — Upload your lease PDF. Foxit PDF Services extracts the full text. Google Gemini reads every clause and compares it against your state's tenant protection laws. Each clause gets a risk rating — green (safe), yellow (watch out), or red (potentially illegal) — with a plain-English explanation and a legal citation. For any red-flagged clause, you can generate a formal counter-letter PDF that cites the exact statute being violated. Hand it to your landlord or attach it to an email.
Deposit Defender — Record a video walkthrough of your apartment using your phone's rear camera. OpenCV extracts key frames from the video, and Gemini 3.1 Pro Vision analyzes each frame for pre-existing defects — scratches on walls, stains on carpet, water damage on ceilings, mold in corners. The output is a timestamped Condition Report stored in Sanity and downloadable as a PDF. If your landlord tries to charge you for damage that was already there, you have documented proof.
Rent Radar — Enter your city, zip code, state, and what you're currently paying. The You.com Smart API searches the live web for comparable rental listings and average rent data for your area. Gemini parses these search results into structured market statistics — average rent, min/max range, comparable listings, and whether rent control applies. If you're overpaying, LeaseGuard generates a professional negotiation letter as a downloadable PDF backed by the real data.
Voice Chat — Talk to your lease. Open the chat, ask a question like "Can my landlord charge me for normal wear and tear?" and LeaseGuard answers using the context of your actual lease. Deepgram Nova-3 transcribes your voice, Gemini generates a context-aware answer using the clause data stored in Sanity, and Deepgram Aura-2 reads the answer back to you. Entirely voice-first — no typing needed.
Maintenance Reporter — Describe a repair issue by voice. Say something like "There's a leak under the kitchen sink and the cabinet is starting to warp." Deepgram transcribes with Audio Intelligence — detecting topics (plumbing), intent (repair request), and generating a summary. Gemini structures the transcript into a formal maintenance request with urgency classification and safety flags. Foxit generates a professional PDF letter addressed to your property manager. You get a documented, legal-ready repair request without typing a single word.
How we built it
Frontend — Next.js 16 Progressive Web App deployed on Vercel. Installable on any phone, works offline for previously loaded data. Dark theme with glassmorphism design, responsive across mobile and desktop.
Backend — FastAPI (Python) with 6 route modules, running in a Docker container on Akamai's Linode Kubernetes Engine. GitHub Actions automatically builds and pushes new Docker images on every commit to main.
Document Pipeline — This is the heart of the product. Every feature produces a tangible, downloadable PDF. We use Foxit's PDF Services API for text extraction (input) and Foxit's Document Generation API for PDF creation (output). In total, we generate 4 distinct PDF document types through Foxit:
- Counter-letters for risky lease clauses
- Rent negotiation letters backed by market data
- Move-in condition reports from video inspection
- Maintenance request letters from voice descriptions
AI Layer — Google Gemini 3 Flash handles lease analysis, rent data parsing, chat Q&A, and maintenance structuring. Gemini 3.1 Pro Vision handles video frame defect detection.
Voice Pipeline — Deepgram Nova-3 for speech-to-text in Voice Chat. Deepgram Nova-2 with Audio Intelligence (topics, intents, summarization) for Maintenance Reporter. Deepgram Aura-2 for text-to-speech across all voice features.
Live Search — You.com Smart API in research mode queries the live web for comparable rental listings and rent control laws. No hardcoded databases — every rent analysis hits the real web for current data.
Content Backend — Sanity.io stores everything as structured, queryable content. Lease analyses have typed clause arrays with risk levels, explanations, and citations. Deposit reports have typed defect records. This structure is what enables the "Ask Your Lease" feature — voice chat pulls your stored clause data from Sanity and answers questions in the context of your actual lease.
Infrastructure — Docker containers built via GitHub Actions, pushed to GitHub Container Registry, deployed to Linode Kubernetes Engine with rolling updates. Frontend auto-deploys on Vercel.
Challenges we ran into
- Foxit's OAuth token exchange works differently between the PDF Services and Document Generation endpoints. Getting both authenticated correctly took several iterations of debugging response codes.
- Deepgram's Audio Intelligence features (topic detection, intent recognition, summarization) are only stable on the Nova-2 model — not Nova-3, which is their latest STT model. We discovered this after debugging a 500 error in production where the maintenance endpoint was crashing on every request.
- Our Next.js frontend on Vercel (HTTPS) was calling the backend over plain HTTP, triggering mixed content blocks in the browser. We solved this by routing all API calls through Next.js server-side rewrites, acting as an HTTPS proxy.
- Keeping frontend form payloads in sync with backend Pydantic schemas was a recurring source of 422 validation errors. We had to do a full audit of every API endpoint to ensure the field names, types, and optionality matched exactly.
Accomplishments we're proud of
- Every feature produces a real, downloadable PDF. Not just text on a screen — something a tenant can print and hand to their landlord. That's what makes this practical.
- The voice pipeline works end-to-end: speak your question → transcribe → analyze with lease context → respond with audio. It genuinely feels like talking to a lawyer.
- Live market data from You.com makes rent comparison actually useful — it's not a static database from 2023, it's what apartments are renting for right now.
- The full CI/CD pipeline (commit → GitHub Actions → Docker build → push to GHCR → deploy on LKE) means we can fix bugs and ship features in minutes.
What we learned
- Structured content (Sanity) is dramatically more useful than flat storage when you need to build features across relationships. The voice chat feature — where you ask a question about your lease and get an answer that references your specific clauses — is impossible without queryable, typed content.
- Voice-first interfaces are harder than they look. Chaining STT → LLM → TTS with acceptable latency requires careful model selection and error handling at every step.
- PDF generation is an underrated superpower for user trust. The moment a user can download something tangible and official-looking, the product feels 10x more real than showing the same information on screen.
- Live web search (You.com) transforms a demo into a real product. Static data feels fake. Current data feels authoritative.
What's next for LeaseGuard
- Multi-language support using Deepgram's language detection — so non-English-speaking tenants can use voice features in their native language.
- A landlord-facing compliance mode that helps small property owners ensure their lease templates are legally sound before sending them out.
- Direct integration with local tenant rights organizations for escalation when AI detects serious legal violations.
- Side-by-side lease comparison so tenants can analyze two apartments' leases before deciding where to sign.
Sponsor Track Eligibility
Foxit Software — Document Automation Hackathon
How we use it:
- Foxit PDF Services API — Extracts text from uploaded lease PDFs. This is the entry point for the entire analysis pipeline.
- Foxit Document Generation API — Generates 4 distinct PDF document types:
- Counter-letters for risky lease clauses citing exact legal violations
- Rent negotiation letters backed by live market data from You.com
- Move-in condition reports from video inspection defect analysis
- Maintenance request letters from voice transcriptions
End-to-end flow: Upload PDF → Foxit Extract (PDF Services) → Gemini Analysis → Generate counter-letter (Doc Gen) → Download PDF
You.com — Build Intelligent Applications with You.com APIs
How we use it:
- You.com Smart API (research mode) searches the live web for rental listings and market averages
- Two separate queries per rent analysis: one for comparable listings, one for average rent + rent control laws
- Raw search results are parsed by Gemini into structured market data with confidence scores, comparable listings, and rent control information
- Every analysis hits the live web — no static databases, no hardcoded data
Akamai / Linode — Most Creative Open-Source Solution on Linode
How we use it:
- Backend runs on Linode Kubernetes Engine (LKE) with a containerized FastAPI deployment
- Docker images built via GitHub Actions CI/CD and pushed to GitHub Container Registry (ghcr.io)
- Kubernetes manifests:
k8s/deployment.yaml,k8s/service.yaml,k8s/ingress.yaml - Full CI/CD: push to
main→ GitHub Action builds image → image pushed to GHCR →kubectl rollout restartpulls latest - Entire project is open-source on GitHub
Deepgram — The "Smart Listener" (Daily Magic)
How we use it:
- Nova-3 STT — Transcribes voice questions in Voice Chat for lease Q&A
- Nova-2 Audio Intelligence — Maintenance Reporter uses topic detection, intent recognition, and summarization to extract structure from voice descriptions of repair issues. A rambling voice note becomes a categorized, prioritized maintenance request
- Aura-2 TTS — Reads back answers, analysis summaries, and maintenance confirmations as natural-sounding audio
- Three distinct features use Deepgram: Voice Chat, Maintenance Reporter, and Read Aloud (accessibility for lease analysis results)
Sanity — Build a Feature Only Structured Content Makes Possible
How we use it:
- Lease analyses are stored as structured documents with typed fields:
extractedClauses[](each withclauseType,riskLevel,explanation,citation),overallRiskScore,propertyAddress,state - The "Ask Your Lease" voice chat queries Sanity by
lease_idto pull stored clauses, then provides context-aware answers — this feature is impossible without structured content - Deposit inspection reports store typed defect records (type, severity, location, timestamp, screenshot asset reference)
- GROQ queries power the detail pages — fetching analyses by ID with full clause data
Built With
- akamai-cloud
- deepgram
- docker
- fastapi
- foxit-api
- github
- github-actions
- google-gemini
- kubernetes
- legal-ai
- linode-kubernetes-engine
- next.js
- pwa
- python
- reports
- sanity.io
- typescript
- vercel
- you.com-api
Log in or sign up for Devpost to join the conversation.