/tos-buddy

Chrome extension powered by AI to track how your information is managed online

Primary LanguageTypeScriptMIT LicenseMIT


Logo

TOS Buddy

tosbuddy.com
View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact

About The Project

TOS Buddy is a chrome extension that helps users understand and control their privacy on the internet. It tells users if a website's terms of service are good or bad and warns them about privacy risks. The extension also keeps track of what personal information users share with websites.

Tech Stack

Running locally

Note if you want to host the summarize endpoint on a docker file we you can

docker-compose up --build

Prerequisites

  • Bun
  • Claude API Key (for claude haiku)

If you haven't used bun before here's a quick guide on how to get started:

Windows: How to Install Bun on Windows: A Step-by-Step Guide Installing Bun.js on Windows: Step-by-Step Guide for Beginners

Linux: How to install Bun JS on Ubuntu 22.04 LTS Linux How to install Bun on Ubuntu 22.04 LTS Install Bun on Linux

Installing Bun on macOS using Homebrew

  1. Make sure you have Homebrew installed on your Mac. If you don't have it installed, you can install it by running the following command in the Terminal:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Once Homebrew is installed, you need to tap the Bun repository. Run the following command in the Terminal:

    brew tap oven-sh/bun
  3. Now you can install Bun using Homebrew with the following command:

    brew install bun

    This will download and install the latest version of Bun on your macOS system.

  4. After the installation is complete, you can verify the installation by running:

    bun --version

    This should display the version number of Bun installed on your system.

  5. If you want to install a specific version of Bun, you can include the version in the install command. For example, to install Bun version 1.1.3, run:

    brew install bun@1.1.3
  6. To upgrade Bun to the latest version in the future, you can use the following command:

    brew upgrade bun

Self-Host

Hosting Web App

  1. Get a free API Key at https://supabase.com & https://anthropic.com

  2. Clone the repo

    git clone https://github.com/arnenoori/tos-buddy.git
  3. Change the .env.local.example file to .env.local under the web/app folder and populate with:

    SUPABASE_HOSTNAME="xxxx.supabase.co"
    NEXT_PUBLIC_SUPABASE_URL=""
    NEXT_PUBLIC_SUPABASE_ANON_KEY=""
    ANTHROPIC_API_KEY=""
  4. Install bun packages and to run the web application

    cd web/app
    bun install
    bun run dev
  5. On supabase within your new project. Create a storage bucket named "terms_of_service_files" to store terms of service files. And implement the schema outlined in web/app/supabse/schema.sql

Chrome Extension

Chrome Extension Hosting (navigate to the chrome_extension directory) -

  1. Open Chrome (or any Chromium based browser) and navigate to chrome://extensions
  2. Enable "Developer mode" in the top right corner
  3. Click "Load unpacked."
  4. Select the chrome_extension directory
  5. Test the extension which is now loaded in Chrome
  6. And you should be able to access the extension's popup by clicking the TOS Buddy icon in the Chrome toolbar
  7. The extension will use the environment variables you set in the .env.local file to connect to your Supabase database and AI services

Bonus Scripts

We have made a 4 scripts to populate your database and keep it updated (located in the web/scripts folder)

check_and_update_tos.py: Checks for outdated terms of service (if its older than 3 months), and updates them with a new version if found.

update_tos_prompt.py: Update all existing terms of service entries in your database when we update with a new prompt.

populate_database.py: Populate the database with initial sites.

  • populate_initial_sites.txt: change this with the sites you want to add to the database.

get_svgs.py: Ping svgl.app/api to get the svgs for the sites in the database and also saves the svg for the logos in logo_svgs.csv

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Arne Noori - @arnenoori - arne@arne.ai Connor O'Brien - github

(back to top)