Keshav Sundararaman

Case study · Chrome Extension

BestPick

Amazon listings can have dozens of variants, each with its own third-party offers in five conditions. Checking them by hand means opening every variant. BestPick scans them all in one pass and shows the cheapest option.

Conditions priced per variant
5
Concurrent fetch workers
5
Faster than one-at-a-time fetching
~2×
From launch to v1.1
24 h

How it works

  1. 1

    Detect variants

    Content script finds every variant swatch on the product page

  2. 2

    Queue

    Each variant's offer listing goes into a shared queue

  3. 3

    Fetch

    Pool of 5 workers, each with a randomized 250–600 ms delay

  4. 4

    Parse

    Match condition headings in the markup and take the lowest price under each

  5. 5

    Stream

    One result message per variant as it completes, then a done signal

  6. 6

    Display

    Best overall price, a card per condition, and a sortable detail table

Design decisions

  • Rate-limit aware: if Amazon's bot check appears repeatedly, the scan stops and starts a cooldown (5 minutes, doubling up to a 1-hour cap) instead of reporting a false “no offers found”.
  • Resilient parsing: prices are found by matching the condition heading text, not CSS class names, which Amazon changes over time.
  • No account ties: every fetch omits credentials, so scans are not linked to the shopper's Amazon session.
  • No telemetry: the only network calls are to amazon.com for the scan itself.
  • One scan, all conditions: each variant is fetched once, and switching tabs or sort order never re-fetches.

Architecture

  • Manifest V3 with no build step or bundler.
  • The service worker is an ES module split by concern: config, parser, scanner, cooldown and entry point.
  • The panel UI runs as content scripts sharing one namespace object, split into state, rendering and event binding.
  • Built with AI assistance: I designed the architecture first, then implemented and iterated with Claude.

Figures

BestPick panel open on an Amazon product page, showing the best overall price and a price per condition
BestPick open on a product page with many color variants.
BestPick summary view with the best overall price and a best-price card for each condition
Summary view.

Built with

JavaScriptChrome ExtensionsManifest V3Async/ConcurrencyHTML Parsing