An AI-assisted Chrome extension for reading arXiv papers and PDFs — bridging the language and time gap of frontier research.
- 📖 Three reading layouts — focus (paper + margin notes), classic (paper + side drawer), canvas (full-screen mind map)
- 🤖 Inline AI actions — select any text, then press
E(Explain),S(Summarize),T(Translate), orH(Hint) - 🎯 Margin notes anchor to paragraphs — AI responses pin to their source so you never lose context
- 🌍 Built-in translation — read the latest research in your native language without context-switching
- 📚 Library, annotations & chat history — every paper you open builds a personal knowledge base
- ☁️ Cross-device sync — Supabase Postgres + Realtime keeps your library consistent across browsers
- 🔑 BYOK or managed AI — bring your own OpenAI-compatible key, or use the managed proxy with usage quotas
- ⌨️ Keyboard-first —
⌘Kcommand palette ·⌘\outline ·⌘Llibrary - 🎨 Warm paper aesthetic — light/dark themes, adjustable typography, page width, grain, and margins
PaperFlow is not yet published to the Chrome Web Store. Install via Load unpacked.
- Download the latest
paperflow-vX.Y.Z.zipfrom Releases - Unzip it somewhere stable on disk
- Open
chrome://extensions/and enable Developer mode (top-right) - Click Load unpacked and select the unzipped folder
- Visit any
arxiv.org/abs/...page — PaperFlow injects automatically
git clone https://github.com/machuw/PaperFlow.git
cd PaperFlow/chrome-extension
npm install
npm run build # production build → dist/Then Load unpacked the chrome-extension/dist/ folder via chrome://extensions/.
- Open any arXiv paper, e.g. https://arxiv.org/abs/2402.13753
- Click the PaperFlow button injected on the page (or the extension icon)
- Select a passage → the floating toolbar appears → press
Tto translate,Eto explain - Press
⌘Lto add the paper to your library and⌘Kto search across everything
┌──────────────────────────────────────────────┐
│ Chrome MV3 Extension (chrome-extension/) │
│ ├─ Vite + React 18 + TypeScript │
│ ├─ Reader UI (focus / classic / canvas) │
│ ├─ pdfjs-dist (PDF rendering) │
│ └─ Service worker + content script │
└──────────────────────┬───────────────────────┘
│ HTTPS / WSS
┌──────────────────────▼───────────────────────┐
│ Supabase Backend (supabase/) │
│ ├─ Postgres + RLS │
│ │ (papers, library, annotations, chat, │
│ │ subscriptions, ai_usage_log) │
│ ├─ Auth (magic link) │
│ ├─ Realtime (subscription-tier sync) │
│ └─ Edge Functions │
│ ├─ ai-proxy (managed AI streaming) │
│ ├─ create-checkout-session (Stripe) │
│ ├─ stripe-webhook │
│ └─ create-portal-session │
└──────────────────────────────────────────────┘
- Auth & sync — Supabase Postgres + Realtime
- Payments — Stripe (Checkout + Billing Portal + signed webhook)
- AI — OpenAI-compatible via
@ai-sdk/openai-compatible - PDF —
pdfjs-dist
Three subscription tiers: Free (BYOK only) · Sync (cloud library) · Pro (managed AI quotas).
For deeper architecture notes, see CLAUDE.md.
PaperFlow uses two build modes — local Supabase for everyday work, hosted Supabase for release validation only.
cd chrome-extension
# Daily development (local Supabase) — the default
npm run build:dev # one-shot
npm run dev:local # watch mode
# Release validation (hosted Supabase) — pre-ship only
npm run buildAfter every build, reload the extension at chrome://extensions/.
A dev build renders an orange DEV pill next to the PaperFlow logo. If you do not see it, you are running the hosted build — re-run build:dev.
supabase start # Postgres + Auth + Realtime
supabase functions serve --env-file ./supabase/.env # Edge FunctionsWithout these running, the dev build will hang on login, AI calls, and sync.
npm test # Vitest — unit + integration
npm run test:e2e # Playwright — end-to-end (CLI, not MCP)
npm run typecheck # tsc --noEmitThe full contributor guide lives in CLAUDE.md.
To hand the extension to non-developers (no local Supabase, no Node toolchain), build a production-only zip they can Load unpacked. PaperFlow is not on the Chrome Web Store, so this is the standard distribution path.
cd chrome-extension
# 1. Bump the version (syncs manifest.json + package.json, commits, tags v{version})
npm run bump patch # or: minor | major | 1.2.3
# 2. Build production bundle and zip it
npm run release # → chrome-extension/paperflow-v{version}.zip
# 3. Push the commit and the tag
git push && git push --tagsWhat npm run release (scripts/release.sh) does:
- Forces a clean
npm run build(production mode → hosted Supabase). Never zips a dev build. - Refuses to continue if it detects the local Supabase URL
127.0.0.1:54321insidedist/assets/(catches accidentalbuild:devoutput). - Refuses to continue if
manifest.jsonandpackage.jsonversions disagree. - Zips
dist/→paperflow-v{version}.zipat the repo root ofchrome-extension/.
The zip is gitignored — don't commit the artifact. Upload it to a GitHub Release (attach to the v{version} tag), internal share, or cloud drive.
- Unzip
paperflow-v{version}.zipto a stable folder on disk - Open
chrome://extensions/and enable Developer mode (top right) - Click Load unpacked and select the unzipped folder
- Visit any
arxiv.org/abs/...page
Chrome will show a yellow "disable developer mode extensions" bar on each launch — that's the expected warning for non-Web-Store installs and can be dismissed.
PaperFlow/
├── chrome-extension/ # MV3 extension — Vite + React + TypeScript (source of truth)
│ ├── reader/ # Reader UI (components, lib, styles)
│ ├── content/ # Content script for arxiv.org injection
│ ├── background/ # Service worker
│ ├── manifest.json
│ └── tests/ # Vitest + Playwright
├── supabase/
│ ├── migrations/ # SQL migrations + RLS policies
│ ├── functions/ # Edge Functions (ai-proxy, stripe-webhook, …)
│ └── config.toml
├── docs/
│ ├── prototype/ # Archived no-bundler React prototype (UI reference)
│ └── assets/ # README assets
├── scripts/ # Build / release helpers
├── CLAUDE.md # Detailed contributor guide
└── README.md # ← you are here
Contributions are very welcome! Please read CLAUDE.md for the development workflow and coding guidelines.
- 🐛 Bug reports — open an issue
- 💡 Feature ideas — start a discussion first
- 🛠️ Pull requests — branch off
main, write tests, keep changes surgical
Generated docs (specs / plans / reviews under
docs/) are written in Chinese; code and inline comments stay in English.
PaperFlow is built on the shoulders of giants:
- React · Vite · TypeScript
- Supabase — auth, database, realtime, edge functions
- Stripe — subscriptions and billing portal
- pdf.js — PDF rendering
- Vercel AI SDK — AI streaming
- @xyflow/react — canvas mind-map view