A Chrome (MV3) extension that detects a PDF in the browser, sends it to Binect for physical mail, and tracks that document through its Binect lifecycle — backend-free and with zero stored document content.
Sending a cloud-app PDF as physical mail normally means download → re-upload into Binect. BinectChrome collapses that into one click from the browser: it detects the PDF, re-fetches the bytes using the user's own session, uploads via the [`@binect/js`](../binect-js) SDK, and tracks the document through its Binect lifecycle — storing only metadata, never the PDF itself. See [`INTENT.md`](INTENT.md) for the full intent and inviolable principles.
- **PDF detection (`src/utils/pdf-detector.ts`)** — completed PDF downloads via the Chrome Downloads API (`.pdf`/`application/pdf`), recent-download scan on popup open, best-effort current-tab detection, and re-fetch of PDF bytes from the original URL with `credentials: 'include'`.
- **Document proxy queue & lifecycle (`src/utils/pdf-queue.ts`)** — metadata-only `DocumentProxy` records (never PDF content), dedup by filename + content hash, lifecycle `pending → uploading → in_basket → ordering → in_production → sent` (+ `failed`/`canceled`), live vs. archived views, and server sync/reconciliation.
- **Binect API operations (`src/utils/binect-api.ts`, via `@binect/js`)** — `uploadPDF`, `shipDocument`, `getDocumentStatus`, `listServerDocuments`, `deleteDocument`, `testConnection`, with structured error mapping. All Binect access delegated 1:1 to the SDK.
- **Authentication & credentials (`src/utils/crypto.ts`, `storage.ts`)** — username + password (HTTP Basic), AES-GCM (256-bit) encryption at rest via Web Crypto, 60-day inactivity expiry, manual wipe, self-deleting corrupted ciphertext.
- **UI (`src/popup/`, `src/tracking/`)** — login + lifecycle-grouped document list with send/order/refresh/archive/restore/delete actions, toolbar badge, and a tracking/help page.
- Upstream dependencies: the Binect REST API (third-party service; see `tpsc.yaml`) and the [`@binect/js`](../binect-js) SDK (local `file:` dependency — sibling repo must be present to build).
- Downstream consumers: end users (the published Chrome extension).
- Often used with: cloud apps that produce PDFs (the detection source).
- Preferred terms: **proxy** (metadata-only record of a detected/sent PDF), **basket** (Binect shippable state), **order** (the explicit dispatch step), **transfer log** (local tracking).
- Also known as: "score" for the local tracking view.
- Potentially confusing terms: *uploaded ≠ sent* — upload places a document in the basket; physical dispatch is a separate confirmed order. `computeMD5` is a sampled non-cryptographic dedup hash, not true MD5.
description: Chrome MV3 extension that detects PDFs in the browser and sends them to Binect for physical mail, tracking each document through its lifecycle. Backend-free, zero document retention.
description: AES-GCM (256-bit) Web Crypto credential storage with 60-day inactivity expiry and manual wipe, for authenticating browser-side calls to a third-party API without a backend.
- Uploaded ≠ sent: dispatch is a separate, explicitly confirmed order step.
-`<all_urls>` host permission is required to re-fetch PDFs from arbitrary source domains using the user's session; it is a known Chrome Web Store review cost and should be justified or narrowed, not silently expanded.
- Two capped stores: lifecycle proxies (~100, ~30-day archive aging) are distinct from the transfer log (~500 events).
- Scope-change process: confirm against [`INTENT.md` §4](INTENT.md) (zero-retention, explicit intent, no backend); add Binect API coverage upstream in `@binect/js`; document any permission expansion before adding.