Skip to content

Repository files navigation

SessionSync

End-to-end encrypted cross-device browser session sync. No registration required.

中文文档

Install the Extension

Install SessionSync from Chrome Web Store

The browser extension is live on the Chrome Web Store. For most users, we recommend installing it directly and using the built-in shared cloud backend with zero setup.

SessionSync Chrome extension popup

Features

  • Zero Registration — System-generated random key, no email or account needed
  • End-to-End Encrypted — AES-256-GCM with PBKDF2 (600K iterations), server only stores ciphertext
  • Write-Protected — All writes go through an RPC function that verifies a write_token; no one can tamper with or delete another user's data
  • Self-Hostable — Uses a shared cloud by default, or configure your own Supabase instance
  • Open Source — Fully transparent, auditable code

How It Works

One key derives three independent values:

Derived Value Purpose Algorithm
user_hash Database lookup HMAC-SHA-256(key, session-sync:user-id)
write_token Write authorization HMAC-SHA-256(key, session-sync:write-token)
AES key Encrypt / decrypt data PBKDF2(key, random_salt) → AES-256-GCM

Usage

Option A: Install from Chrome Web Store (Recommended)

SessionSync on Chrome Web Store

Install the published extension directly and start syncing right away. The default shared cloud backend is included, so no setup is required.

Option B: Self-Host (Build from Source)

If you want to run your own backend or customize the extension, follow the steps below.

1. Create a Supabase project

Go to supabase.com, create a project, and grab the URL and anon key from Settings → API.

2. Set up environment variables

cp .env.example .env
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key

3. Initialize the database

Copy the SQL from supabase/schema.sql and run it in the Supabase SQL Editor.

4. Build the extension

pnpm install
pnpm run build

5. Load in Chrome

Open chrome://extensions/ → Enable Developer ModeLoad Unpacked → select the dist folder.


Database Schema

All public SQL is in a single file: supabase/schema.sql

  • sync_data table — stores encrypted session payloads per user per origin
  • read_sync_data() — reads encrypted data by user_hash + origin
  • upsert_sync_data() — writes with write_token verification and size limits
  • list_user_origins() — lists all synced origins for a user
  • delete_sync_data() — removes a synced origin (requires write_token)

Project Structure

├── src/
│   ├── shared/
│   │   ├── crypto.ts           # Key generation + E2EE (AES-256-GCM)
│   │   ├── config.ts           # Config persistence (chrome.storage)
│   │   ├── supabaseClient.ts   # Supabase client factory
│   │   ├── messaging.ts        # Extension message passing
│   │   ├── i18n.ts             # Internationalization helper
│   │   └── toast.ts            # Toast notification utility
│   ├── background/index.ts     # Push / Pull via Supabase RPC
│   ├── content/index.ts        # Read/write page storage
│   ├── popup/                  # Popup UI
│   ├── options/                # Settings page
│   └── manifest.json
├── supabase/
│   └── schema.sql              # Database schema (public)
└── public/
    └── _locales/               # i18n messages (en, zh_CN)

Tech Stack

Manifest V3 · TypeScript · Vite · CRXJS · Tailwind CSS · Supabase · Web Crypto API

License

MIT

About

End-to-end encrypted cross-device browser session sync. No registration required.

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages