Command Palette
Search for a command to run...
Here's the recommended architecture for a Manifest V3 data-capture extension:
textContent Script (per tab) Service Worker (background) Popup UI | | | | Observe DOM / intercept XHR | Receive messages | Show status | Extract structured data | Queue & batch sync | Configure settings | Send via chrome.runtime | POST to backend API | |------ message passing ------>| | | |------- fetch() ------------->| Backend
Key components:
Content Scripts — Injected into target pages (e.g., ChatGPT, Claude). They observe the DOM or intercept network requests to capture conversation data.
Service Worker (background) — Receives data from content scripts via chrome.runtime.onMessage. Handles batching, deduplication, and syncing to your backend.
Popup UI — React-based settings panel. Configures sync endpoint, shows sync status.
Critical design decisions:
chrome.runtime.sendMessage, NOT direct fetch to backend