Table of Contents
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.
- Next.js - React framework
- Tailwind CSS - CSS framework
- Supabase - Database and backend
- Anthropic & OpenAI API - AI for summarization
Note if you want to host the summarize endpoint on a docker file we you can
docker-compose up --build
- 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
-
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)"
-
Once Homebrew is installed, you need to tap the Bun repository. Run the following command in the Terminal:
brew tap oven-sh/bun
-
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.
-
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.
-
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
-
To upgrade Bun to the latest version in the future, you can use the following command:
brew upgrade bun
-
Get a free API Key at https://supabase.com & https://anthropic.com
-
Clone the repo
git clone https://github.com/arnenoori/tos-buddy.git
-
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=""
-
Install bun packages and to run the web application
cd web/app bun install bun run dev
-
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 Hosting (navigate to the chrome_extension directory) -
- Open Chrome (or any Chromium based browser) and navigate to chrome://extensions
- Enable "Developer mode" in the top right corner
- Click "Load unpacked."
- Select the chrome_extension directory
- Test the extension which is now loaded in Chrome
- And you should be able to access the extension's popup by clicking the TOS Buddy icon in the Chrome toolbar
- The extension will use the environment variables you set in the .env.local file to connect to your Supabase database and AI services
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
Distributed under the MIT License. See LICENSE.txt
for more information.
Arne Noori - @arnenoori - arne@arne.ai Connor O'Brien - github