Skip to content

a privacy-first tool that analyzes complex Terms of Service and Privacy Policies instantly.

Notifications You must be signed in to change notification settings

shreejaykurhade/PolicyChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

PolicyChecker — Real-time Privacy Forensics & Automation

Decode the Fine Print. Purge the Noise. Travel through History.

PolicyChecker is a privacy-first tool that analyzes complex Terms of Service and Privacy Policies instantly. It transforms dense legalese into an easy-to-read "Nutrition Label" and provides automated tools to protect your digital rights.


🌟 Key Features

🔍 Instant Policy Audit

  • Gemini 1.5 Analysis: High-fidelity scanning of both raw text and visual UI elements (screenshots).
  • Risk Scoring: Cumulative safety score (0-100) based on data collection, sale, and rights retention.
  • Red Flag Detection: Automatic highlighting of predatory clauses (e.g., forced arbitration, waiver of class actions).

🕰️ Privacy Time Travel

  • Wayback Integration: Detects "Stealth Edits" by comparing current policies against historical versions via the Wayback Machine.
  • Verdict Engine: Identifies exactly what changed and how it affects your rights.

⚡ Auto-Fix (Privacy Orchestrator)

  • AI Agent Automation: An intelligent agent that identifies and executes opt-out steps directly on the page.
  • One-Click Privacy: Automatically navigates settings menus to disable invasive tracking.

🧹 Site Data Purge

  • Deep Clean: One-click removal of all cookies, LocalStorage, SessionStorage, and IndexedDB data for the active domain.

🛠️ Tech Stack

  • Extension: Manifest V3, Chrome Scripting API, Cookies API.
  • Backend: FastAPI (Python), Google Gemini 1.5 Flash.
  • Vector Memory: ChromaDB (Semantic storage for cross-policy comparison).
  • Embeddings: Sentence Transformers (all-MiniLM-L6-v2).
  • Frontend: Vite + React.js (Neo-Brutalist Design System).

🏗️ Architecture

graph TD
    User([User In Extension]) --> Popup[Popup UI]
    Popup --> Capture[Scripting/Capture API]
    Capture --> Backend[FastAPI Backend Engine]

    subgraph "Backend Processing"
        Backend --> LLM[Gemini 1.5 Flash]
        Backend --> Vector[ChromaDB Memory]
        Backend --> Wayback[Wayback Machine API]
        
        LLM --> Audit[Policy Audit]
        LLM --> Compare[History Comparison]
        LLM --> Orchestrate[Opt-Out Steps]
    end

    Audit --> Score[(Safety Score & Red Flags)]
    Compare --> Verdict[(Stealth Edit Verdict)]
    Orchestrate --> Execution[Content Script Executor]
    
    Score --> Popup
    Verdict --> Popup
    Execution --> Page[(Active Webpage)]
    
    Vector -. "Semantic Similarity" .-> Audit
Loading

🚀 Getting Started

Prerequisites

Backend Setup

cd backend
pip install -r requirements.txt
# Create .env with GEMINI_API_KEY=your_key
python main.py

Extension Setup

  1. Open Chrome and go to chrome://extensions/.
  2. Enable Developer mode.
  3. Click Load unpacked and select the extension folder.

Frontend (Dashboard) Setup

cd frontend
npm install
npm run dev

📂 Project Structure

PolicyChecker/
├── backend/
│   ├── main.py             # FastAPI Entry Point
│   ├── services/           # Analysis, Time Travel, Vector Storage
│   └── models.py           # Pydantic Data Models
├── extension/
│   ├── manifest.json       # Extension Config
│   ├── popup.html/js/css   # Main Interface
│   └── content.js          # DOM Manipulation & Extraction
├── frontend/
│   └── src/                # React Dashboard Components
└── README.md

About

a privacy-first tool that analyzes complex Terms of Service and Privacy Policies instantly.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published