Your AI-powered legal assistant that reads the fine print so you don't have to.
Otto is a friendly Chrome Extension that analyzes Terms & Conditions, Privacy Policies, and other legal texts using Google's Gemini AI. It identifies risks, detects "dark patterns," and summarizes key points to help you protect your digital rights.
extension/: Chrome Extension (Manifest V3, React, TypeScript, Vite, Tailwind CSS).backend/: Node.js Backend (Fastify, TypeScript, Gemini SDK, Zod).landing/: The project's landing/marketing page.
graph TD
User((User))
Chrome[Chrome Extension]
Back[Backend API]
Store[(Trust Store / Cache)]
Gemini[Google Gemini AI]
User -- "Clicks Analyze" --> Chrome
Chrome -- "Sends Text/URL" --> Back
Back -- "Check Cache (Hash)" --> Store
Store -- "Return Cached Result" --> Back
subgraph Analysis
Back -- "Prompt + Text" --> Gemini
Gemini -- "JSON Analysis" --> Back
end
Back -- "Save Result" --> Store
Back -- "Analysis Result" --> Chrome
Chrome -- "Display Report" --> User
You can set up Otto using Docker (Recommended) or manually using Node.js.
- Google Gemini API Key: Get one for free at aistudio.google.com.
- Docker Desktop (for Docker setup) OR Node.js v18+ (for manual setup).
No need to install Node.js on your machine!
Navigate to the backend/ folder and create a file named .env:
GEMINI_API_KEY=your_actual_api_key_hereOpen a terminal in the project root and run:
docker-compose up --buildThe server is now running at http://localhost:3000. Keep this terminal open.
Open a new terminal in the project root and run this command to build the extension using a temporary container:
Windows (PowerShell):
docker run --rm -v "${PWD}\extension:/app" -w /app node:20-alpine /bin/sh -c "npm install && npm run build"Mac/Linux:
docker run --rm -v "$(pwd)/extension:/app" -w /app node:20-alpine /bin/sh -c "npm install && npm run build"Requires Node.js v18+ installed.
cd backend
npm install
# Create .env file with GEMINI_API_KEY=...
npm run devcd extension
npm install
npm run buildOnce you have built the extension (using either method above), you will have a dist folder inside extension/.
- Open Chrome and go to
chrome://extensions/. - Enable Developer mode (toggle in the top right).
- Click Load unpacked.
- Select the
extension/distfolder.
- Ensure the backend server is running.
- Navigate to any webpage containing Terms & Conditions (e.g., a signup page or footer link).
- Click the Otto icon in your Chrome toolbar.
- Click Analyze Terms.
- Watch Otto react as he reads, thinks, and presents the risk assessment!
- Frontend: React, Tailwind CSS, Vite
- Backend: Node.js, Fastify, Zod
- AI: Google Gemini (via
@google/genaiSDK) - Containerization: Docker & Docker Compose
- Language: TypeScript throughout