EchoKit Documentation

EchoKit is a Chrome Manifest V3 extension that records fetch and XMLHttpRequest traffic from any tab, then replays user-edited responses for those same requests. It runs entirely in your browser.

Install

Until published to the Chrome Web Store:

git clone https://github.com/ravitejakamalapuram/echokit.git
# chrome://extensions → Developer mode → Load unpacked → pick echokit/extension/

The 30-second flow

  1. Click the EchoKit toolbar icon on any page.
  2. Press ● REC. Use your app normally.
  3. Hit STOP. Flip the master MOCK switch.
  4. Click any request. Edit body / status / headers / latency / error.
  5. Reload the page. You're hitting your mocks now. Amber banner = unmissable reminder.

Match modes

For each recorded API, pick a match mode in the detail view:

Scope system

Settings → Scope controls what recordings are visible on the active tab and which mocks can fire:

Click the scope: chip in the footer to cycle modes in one click.

Error simulation

Per-API dropdown: none, 4xx, 5xx, network failure, timeout. Combined with the latency slider, you can reproduce any flaky backend scenario.

URL blocklist

Settings → URL Blocklist. Add any Chrome urlFilter pattern (e.g. ||analytics.example.com^, *tracking*, /ads/). Blocked requests never hit the network, never get recorded. Implemented via declarativeNetRequest dynamic rules.

CORS override

Settings → CORS Override. Injects Access-Control-Allow-Origin: *, *-Methods, *-Headers, *-Credentials: true into every real response. Use only for local debugging.

Export / Import mocks

Menu → Export JSON: downloads an echokit-export-*.json file containing every recorded interaction + overrides + match keys. Menu → Import JSON: paste/upload. Choose Merge (replace by id) or Override (wipe existing first). Perfect for committing mock sets into your repo.

localStorage copy/paste

Two menu items:

Origins differ? A warning appears before you commit. Reload the target tab after pasting.

Keyboard shortcuts

Remap at chrome://extensions/shortcuts.

Architecture

injected.js (MAIN world)  ⇄postMessage⇄  content.js (isolated)  ⇄runtime⇄  background.js (SW)
                                                                                    │
                                                            IndexedDB + DNR rules + scripting.executeScript
popup/popup.js  ─────────────────────────────────────────────────────
                                                     shared/app.js (single UI module)
devtools/panel.js  ──────────────────────────────────────────

See extension/README.md for the full file map and design decisions.