Inspiration

Standard apartment leases are deliberately lengthy, dense, and packed with one-sided legal jargon. Most renters sign without fully understanding what rights they’ve waived or what fees they’ve agreed to. We wanted to build a single-purpose, zero-fluff tool that extracts only actionable red flags without generating vague, generic document summaries.

What it does

Renter-Specific Scans: Flags clauses that materially harm renters, categorizing them strictly into HIGH severity (unfair eviction risks, waived legal rights, uncapped financial exposure) and MEDIUM severity (strict restrictions, auto-renewals, maintenance shifts). Verifiable Snippets: Every finding quotes the exact snippet directly from the lease text for easy cross-referencing.

How we built it

One-Click Demo Mode: Includes a realistic synthetic lease fixture so evaluators and users can test the scanner instantly. Client-Side Input Guards: Validates empty input and enforces a 100-word minimum cutoff before making any external API calls. Stateless Privacy: Does not store, cache, or persist lease text or results. Editing the input immediately purges previous results from session memory.

Challenges we ran into

Transitioning to the maintained google-genai SDK required handling specific schema normalization behaviors (avoiding unsupported additional_properties constraints) while ensuring exact verbatim snippet matching between model outputs and raw source text.

Accomplishments that we're proud of

Building a fast, responsive, and beautifully styled single-page application that produces high-signal, structured legal analysis without persisting sensitive tenant data.

What we learned

  • Plan-first engineering pays off: Defining our scope, PRD, and technical spec before writing code caught critical architectural issues early—such as the deprecation of legacy SDKs and strict schema requirements for Gemini structured outputs.
  • Deterministic guards on non-deterministic models: Enforcing structured JSON schemas via Pydantic and validating returned quote snippets against the raw source text ensured that model hallucinations never reached the user interface.
  • Privacy by architecture: Designing for complete UI statelessness and in-memory session handling proved that high-utility AI tools can deliver value without retaining sensitive personal documents or requiring cloud database persistence.

What's next for Red Flag Contract Scanner

  • Jurisdiction-aware analysis: Incorporating city- and state-specific renter protection statutes to flag clauses that are not only predatory, but outright illegal under local housing laws.
  • Direct PDF/DOCX parsing: Adding client-side document upload and text extraction so renters can drag and drop lease files directly without manually copying text.
  • Counter-clause generator: Providing tenants with respectful, legally sound pushback templates and alternative wording to negotiate predatory clauses out of the agreement before signing.
  • Expansion to other consumer contracts: Adapting the core verification engine to analyze Terms of Service (ToS), gym memberships, freelance client contracts, and employment NDAs.

Built With

Share this project:

Updates

Submission history