Legal Lens Chrome extension icon

Legal Lens

✨ AI-Powered
📦 v1.0.0
💾 63.19KiB
📅 2025-12-04
View on Chrome Web Store

Chrome will indicate if you already have this installed.

Overview

## Inspiration

Our team started with a simple realization: almost no one reads Terms of Service or Privacy Policies. Most of us scroll to the bottom and click “Accept,” agreeing to things we might not fully understand.

We wanted to change that. When we discovered that AI could help summarize and interpret complex legal text, we saw a chance to make these documents transparent and accessible. That idea became **LegalLens** — a Chrome extension that translates dense legal language into plain English and notifies users when policies they’ve agreed to change.

---

## What it does

**LegalLens** helps users understand exactly what they’re agreeing to online.

Here’s what it can do:

* Detects and analyzes Terms of Service or Privacy Policies on websites.
* Generates an AI-powered summary in clear, simple language.
* Highlights key sections related to data usage, sharing, and user rights.
* Assigns a quick “risk level” indicator (Low / Moderate / High).
* Tracks changes to known policies and alerts users about updates, including what specifically changed.

With LegalLens, users can finally browse with awareness and confidence.

---

## How we built it

We built LegalLens as a **React + TypeScript** Chrome extension structured around **Manifest v3**.

Here’s our build process:

* **Extension Setup:** Configured `manifest.json` with the necessary permissions and switched to service workers to comply with Manifest v3.
* **Content Script:** Scans web pages for Terms of Service or Privacy Policy links and retrieves their text.
* **AI Integration:** Uses **Gemini Nano’s built-in APIs** for on-device summarization and clause detection — generating both a simplified summary and a risk rating directly within the browser, without needing external API calls.
* **Revision Tracking:** Compares the latest version of each policy to previously saved versions and flags any major differences.
* **User Interface:** Designed a React-based popup that displays summaries, last-checked dates, and alerts for any updates.

---

## Challenges we ran into

We ran into several challenges along the way:

* **Manifest v3 Migration:** Adjusting to Chrome’s new service worker model and restructuring how background tasks persist.
* **CORS Restrictions:** Many websites block direct content fetching. We had to get creative with background scripts and proxies to access the content securely.
* **On-Device AI Optimization:** Running summarization locally with Gemini Nano required careful prompt engineering and performance tuning to keep results fast and accurate.
* **Meaningful Change Detection:** Text diffs weren’t enough — we had to build semantic comparison logic to detect real changes instead of formatting differences.

Each challenge taught us something new and made the final product much stronger.

---

## Accomplishments that we're proud of

We’re proud that we turned a common digital habit — blindly accepting terms — into an opportunity for awareness and empowerment.

Highlights we’re especially proud of:

* Getting the first live summary to appear over an actual Terms of Service page.
* Building a clean, intuitive UI that makes complex legal info easy to digest.
* Leveraging **Gemini Nano’s on-device AI** to deliver privacy-safe, real-time insights directly in the browser.

---

## What we learned

Even though we came in with React and TypeScript experience, this was our first time building a Chrome extension — and we learned a lot!

Some key takeaways:

* How Chrome extensions are structured and how components communicate.
* How to inject React components directly into live web pages.
* How to securely integrate **Gemini Nano’s built-in AI capabilities** for summarization and analysis.
* How to persist user data with Chrome’s storage APIs.

This project expanded our view of what’s possible when you combine front-end development with on-device AI and accessibility-focused design.

---

## What’s next for LegalLens

We’re just getting started! Here’s what’s next:

* Supporting more document types like Cookie Policies and License Agreements.
* Enhancing Gemini Nano’s summarization with readability scores and sentiment insights.
* Adding a dashboard for users to track all their accepted policies in one place.
* Publishing LegalLens to the Chrome Web Store and gathering user feedback.

Our long-term goal is to make LegalLens a go-to tool for digital transparency — helping users make informed choices every time they click “Accept.”

Tags

Make Chrome Yours/privacy make chrome yours/privacy

Privacy Practices

Not being sold to third parties, outside of the approved use cases
Not being used or transferred for purposes that are unrelated to the item's core functionality
Not being used or transferred to determine creditworthiness or for lending purposes

🔐 Security Analysis

This extension hasn't been security-scanned yet.

Adguard Adblocker

17M+ users
Unmatched adblock extension against advertising and pop-ups. Blocks ads on Facebook, YouTube and all other websites.
Make Chrome Yours/privacy

Ublock Origin Lite

16M+ users
An efficient content blocker. Blocks ads, trackers, miners, and more immediately upon installation.
Make Chrome Yours/privacy

uBlock Origin

15M+ users
Finally, an efficient blocker. Easy on CPU and memory.
Make Chrome Yours/privacy