Skip to content

Repository files navigation

Tab Archaeology 🏺

A privacy-first Chrome extension that tracks your full tab lifecycle — locally, on your device, with no backend, no accounts, and no data ever leaving your browser.

What it does

Tab Archaeology records every tab you open: how long it was focused, how many times you returned to it, what spawned it, and when it was closed. It turns that raw event log into a browsable history with analytics, domain rankings, cleanup suggestions, and journey chains.

All data is stored in your browser's IndexedDB. Nothing is ever sent anywhere.

Features

Page Description
Dashboard Live overview — open tabs, today's sessions, active time, recent activity
Timeline Full browsing history with date/category/domain/search filters and a session detail drawer
Tab Graveyard All closed and abandoned tabs, searchable and sortable
Analytics 6 charts + journey chains + insights: activity over time, category trends, lifespan distribution, activity by hour, revisit frequency, tab chains
Domains Sites ranked by active browsing time with abandonment and revisit stats
Cleanup Open tabs you haven't visited in N days — you decide what to close
Settings Tracking toggle, domain exclusions, retention policy, JSON export/import, data deletion

Tech stack

  • React 19 + TypeScript + Vite 8
  • Tailwind CSS v4
  • Dexie v4 (IndexedDB)
  • Recharts v3 (analytics charts)
  • Chrome MV3 service worker

Development

npm install
npm run dev       # Vite dev server (for UI development)
npm run build     # Production build → dist/
npm run lint      # ESLint

Loading the extension in Chrome

  1. Run npm run build
  2. Open chrome://extensions
  3. Enable Developer mode (top right)
  4. Click Load unpacked and select the dist/ folder

The extension icon appears in the toolbar. Click it for the popup, or use Open Dashboard for the full analytics view.

Architecture

src/
  background/     # MV3 service worker — tab lifecycle tracking
  db/
    database.ts   # Dexie schema + settings helpers + retention policy
    queries.ts    # All DB reads (never import Dexie directly from pages)
  analytics/
    sessionAnalytics.ts  # Pure analytics functions (no DB side-effects)
  dashboard/
    pages/        # One file per dashboard page
    components/   # Sidebar
    hooks/        # useQuery — generic async data fetcher
  popup/          # Extension toolbar popup
  shared/
    types.ts      # All shared TypeScript types
    categorizer.ts # Rule-based offline domain categorizer
    utils.ts      # Formatters and date helpers

Data model

  • TabSession — one record per tab lifetime: URL, domain, title, open/close times, active duration, visit count, status, category, opener relationship
  • TimelineEvent — raw event log: tab_opened, tab_activated, tab_deactivated, tab_closed, window_focus_gained, window_focus_lost
  • AppSettings — single row: tracking state, excluded domains, retention policy, thresholds

Tab statuses

Status Meaning
open Tab is currently open in Chrome
closed Tab was closed normally
abandoned Tab was open > 60s but had < 10s of active focus time
forgotten Open tab not accessed for longer than the forgotten threshold

Privacy

  • Zero network requests from the extension itself
  • No analytics SDK, no telemetry, no crash reporting
  • All data lives in chrome.storage / IndexedDB, scoped to the extension
  • Export your data at any time as JSON from Settings
  • Delete everything from Settings with one click

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages