Open source · Web & UX

Responsive Route Snapshotter

Compare saved route screenshot manifests across viewport and device profiles; it does not capture images.

v1.0.0 · Node.js 22+ · MIT

Browse the public repository · View releases

TOOLID=responsive-route-snapshotter. Zero-dependency Node 22+ auditor of two pre-captured local route screenshot manifests. It does not launch Playwright, drive a browser, capture images, or save new screenshots. This is the offline scope adaptation of the original capture-oriented matrix row. A separate capture process must supply both manifests and their image files. The tool reads and hashes those files, compares controlled runs, and emits a deterministic JSON report.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.

Run the checked-in example

node bin/responsive-route-snapshotter.mjs --root examples/pass --baseline baseline.json --current current.json
node bin/responsive-route-snapshotter.mjs --root examples/fail --baseline baseline.json --current current.json
npm run check

Read the result

The examples exit 0 and 1. --help prints usage; --human adds a terse stderr summary. The library exports TOOLID, LIMITS, and async compareSnapshots(baseline,current,{readScreenshot,now}). The direct library callback is trusted evidence; only the CLI verifies that image bytes came from a regular local file whose realpath stays inside --root. No screenshot read occurs without the supplied callback. The CLI never writes or fetches.