Firefox-first browser extension plus a lightweight backend proxy for capturing a Facebook Marketplace listing and comparing it against eBay Browse API matches.
- Facebook Marketplace is the source capture surface.
- eBay Browse API is the comparison source.
- A small backend proxy stores the eBay client secret and mints application tokens server-side.
- The extension stores the backend URL and an optional proxy access key in Options instead of an eBay token.
- Capture the active Facebook Marketplace listing with title, description, price, condition, seller, and location when available
- Preserve partial captures with notes so missing fields can be completed manually in the popup
- Flag placeholder prices like
Freeor$1and detect offer language from the listing text - Prefer listing-scoped Facebook signals before broad page fallbacks for cleaner source extraction
- Require both title and description before searching
- Build normalized query variants that preserve brand and likely model identifiers
- Search the eBay Browse API from the background worker with a fixed-price-first strategy by default
- Enrich stronger matches with follow-up item detail requests for better comparison signals
- Rank results with effective price, shipping, tax, seller standing, and match-confidence signals
- Compare source and result condition, location, offer language, and price bands
- Detect likely variant mismatches and downgrade clearly worse or suspicious matches
- Hide auction-only results by default, with popup filters for auctions, worse-condition items, and likely mismatches
- Clear stale eBay results when the source listing or draft changes
- Persist settings, filters, drafts, source listing state, and consent-gated history in extension storage
- Keep the eBay client secret server-side, with the extension storing only the backend proxy URL plus any user-provided proxy access key in Options
- Start the local or hosted backend proxy with your eBay client credentials and optional proxy access key.
- Open a Facebook Marketplace listing in Firefox.
- Open the extension popup.
- Click
Capture Facebook Listing. - Review the captured source summary and complete any missing title or description fields.
- Configure the backend proxy URL in Options if needed, plus a proxy access key if your server requires one.
- Click
Search eBay Matches. - Review ranked matches in the popup.
- If the source listing changes, re-run the search for fresh matches.
There is no established install/build pipeline in this repo yet. Start the proxy, then load the extension as a temporary Firefox add-on:
- Copy
server/.env.exampletoserver/.envand add your eBay client ID + secret. - Run
node server/index.js. - Open
about:debugging#/runtime/this-firefox. - Click
Load Temporary Add-on.... - Select
manifest.jsonfrom this repository. - Open the extension Options page and enter your backend URL, for example
http://localhost:8787. - If you set
PROXY_ACCESS_KEYon the server, enter the same value in Options. - Accept the Firefox host-permission prompt for that backend origin.
- The extension should never contain the eBay client secret.
- The backend proxy mints eBay application tokens and calls Browse API endpoints.
- The included proxy binds to
127.0.0.1by default. - Non-local proxy bindings require
PROXY_ACCESS_KEY, and non-local proxy URLs should use HTTPS. - The included proxy now applies a required extension header, optional access-key auth, reflected extension-only CORS, and basic per-IP rate limiting.
- Facebook extraction is heuristic and needs ongoing selector maintenance.
- Public Marketplace pages and login-gated pages can expose different DOM shapes.
- Facebook extraction prefers scoped Marketplace signals before broad page fallbacks.
- Description capture is section-aware to reduce UI chrome leaking into the source description.
- Price and location capture use scored heuristics to prefer listing-specific values over nearby noise.
- Search results are tied to the current source snapshot so old comparisons are dropped when the source changes.
src/
adapters/facebook.js Facebook Marketplace extraction heuristics
background.js eBay proxy search and enrichment flow
content.js page-side capture bridge
popup.js popup actions, validation, and rendering
options.js saved proxy URL and defaults
lib/ normalize, filters, ranking, history, state
server/
index.js minimal Node proxy for eBay token minting + Browse API calls
docs/
IMPLEMENTATION_PLAN.md
manifest.json Firefox extension manifest
- Replace the current shared-key proxy gate with stronger multi-user auth before broad distribution
- Add deployment-ready proxy configuration and operational safeguards for non-local hosting
- Improve Facebook Marketplace extraction quality across more DOM variants
- Improve eBay result quality, seller heuristics, and landed-cost filtering
- Continue Firefox-targeted validation and polish
- Add stronger proxy auth for deployed multi-user use instead of the current shared access key
- Add deployment/config guidance for remote proxy hosting, secrets management, and ops defaults
- Add repeatable fixture-based tests for Facebook capture, normalization, ranking, and popup filtering behavior
- Validate more Facebook Marketplace DOM variants across public, login-gated, and mobile-ish layouts
- Improve distance, seller-quality, tax, and shipping heuristics beyond the current defaults
- Add Firefox-targeted validation and release-readiness checks
- Decide whether inactive adapter scaffolds should be removed or fully implemented