A Chrome Extension that parses, visualizes, and validates
sellers.jsoninventory metadata with a fast, in-page inspection and verification workflow.
Note
This project is implemented as a browser extension focused on sellers.json validation workflows. It behaves like an auditing/diagnostics tool for supply-path data rather than a standalone backend library.
- Features
- Tech Stack & Architecture
- Getting Started
- Testing
- Deployment
- Usage
- Configuration
- License
- Contacts & Community Support
- Real-time parsing and syntax highlighting of raw
sellers.jsondocuments in-page. - Color-customizable JSON tokens (
key,string,number,boolean) from extension settings. - Interactive overview panel with seller-level and domain-level aggregate stats.
- Seller-domain deduplication logic for unique domain counting.
- Validation pre-filtering for malformed or missing seller domains.
- Parallelized remote validation against both:
https://<domain>/ads.txthttps://<domain>/app-ads.txt
- Badge-level per-seller status rendering (
Ads: OK/NO,App: OK/NO). - Aggregate anomaly categories:
- Invalid domain
- Invalid
ads.txtline - Invalid
app-ads.txtline - Total invalid sellers (not found in both files)
- Total found sellers (found in at least one file)
- Interactive stat rows with tooltip hints and click-to-filter modal drill-down.
- Export and operator productivity features:
- Copy filtered JSON subset to clipboard
- Save filtered subset as
.json
- Storage-backed runtime preferences via
chrome.storage.local. - Background fetch broker with timeout protection for resilient cross-domain checks.
Tip
The extension is most useful for SSP/Exchange QA, ad-ops verification, and compliance checks where seller record integrity is critical.
- Language: JavaScript (ES6+) + HTML + CSS
- Runtime Platform: Chrome Extension Manifest V3
- Browser APIs:
chrome.storage.localchrome.runtime.sendMessagechrome.tabs.reload
- Content processing approach:
- Parse body text as JSON
- Replace page body with syntax-highlighted renderer
- Overlay a fixed analytics panel for domain and seller diagnostics
Sellers.json-Inspector/
βββ background.js # Service worker: URL validation, caching, fetch relay with timeout
βββ content.js # Core logic: Parsing, IAB spec validation queue, rendering, modal UI
βββ content.css # Visual system: Syntax highlighting, panel, badges, tooltips
βββ index.html # Extension popup settings UI root
βββ popup.css # Popup styling
βββ popup.js # Settings persistence, quick links, and page reload handling
βββ manifest.json # Extension metadata, MV3 permissions
βββ trigger action/ # Python script for AI-driven PR/Commit analysis
βββ .github/ # Comprehensive CI/CD workflows, issue templates, dependabot
βββ icons/ # Extension icon assets
βββ LICENSE
- Separation of concerns via extension contexts:
content.jshandles parsing/rendering and user interactions.background.jshandles remote fetch execution with abort timeout.
- Asynchronous fan-out validation:
- Seller domain checks are processed in a bounded-concurrency queue (
CONCURRENCY_LIMIT = 10) to balance speed and network pressure.
- Seller domain checks are processed in a bounded-concurrency queue (
- Stat-centric UX for triage:
- The panel surfaces aggregate counters first, then lets operators drill into filtered records.
- Data-preserving export strategy:
- Export payload keeps original top-level network fields and only swaps
sellerswith filtered slices.
- Export payload keeps original top-level network fields and only swaps
flowchart LR
A[Page with sellers.json] --> B[content.js parses JSON]
B --> C[Syntax-highlighted renderer]
B --> D[Overview panel + stats]
D --> E[Analyze domains queue]
E --> F[Message to background.js]
F --> G[Fetch ads.txt/app-ads.txt]
G --> H[Return results]
H --> I[Per-seller badges + aggregate counters]
I --> J[Modal drill-down + copy/export]
Important
The extension rewrites the visible body content for matching sellers.json pages to provide a rich inspection UI.
- Google Chrome (or Chromium-based browser with MV3 extension support)
- Git
- Optional for local quality checks:
- Node.js 18+ (for custom scripts if you add them)
- Python 3.8+ (for JSON validation helpers)
git clone <your-fork-or-repo-url>
cd Sellers.json-InspectorLoad the extension:
- Open
chrome://extensions/. - Enable
Developer mode. - Click
Load unpacked. - Select the project root directory.
- Navigate to any URL matching
*sellers.json*to activate inspector UI.
Warning
The extension currently requests broad host access (*://*/*) to validate remote ads.txt and app-ads.txt files. Restrict this scope in hardened environments if required.
This repository does not include an automated test suite at this time. Use the checks below as a practical validation baseline.
# Validate extension manifest JSON syntax
python -m json.tool manifest.json >/dev/null
# Find accidental non-English content if you enforce English-only docs/UI
rg -n "[Π-Π―Π°-ΡΠΡ]" .
# Spot whitespace issues
git diff --checkManual test checklist:
- Open a valid
sellers.jsonpage and confirm syntax highlighting appears. - Open extension popup, modify colors/toggles, click
Save & Reload, confirm persistence. - Run domain analysis and verify progress bar, badges, and stat counters update.
- Click stat labels to open modal and validate copy/export actions.
Caution
Domain verification depends on remote host availability and response latency; some failures may be environmental, not functional defects.
Because this is a browser extension, deployment typically means packaging and publishing to a browser store or distributing a signed zip.
# From repository root
zip -r sellers-json-inspector.zip . -x ".git/*" "*.DS_Store"- Add pipeline steps for:
- JSON validation (
manifest.json) - static checks (optional ESLint/Prettier if introduced)
- artifact packaging (
zip)
- JSON validation (
- Store signing credentials in secure CI secrets.
- Gate releases with semantic version bumps in
manifest.json.
A Docker runtime is typically unnecessary for client-side extension packaging, but CI containers can be used for deterministic lint/package tasks.
- Navigate to a matching endpoint such as:
https://example.com/sellers.json
- The extension auto-renders an enhanced inspection interface.
Use the popup to set display behavior and visual palette.
// popup.js (runtime behavior example)
chrome.storage.local.get(defaults, (cfg) => {
// Applies persisted options to popup controls
});
chrome.storage.local.set(newConfig, () => {
// Persists options then reloads active tab
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
chrome.tabs.reload(tabs[0].id);
});
});// content.js (queue-driven checks)
const [adsText, appAdsText] = await Promise.all([
fetchFromBackground(`https://${sellerObj.domain}/ads.txt`),
fetchFromBackground(`https://${sellerObj.domain}/app-ads.txt`)
]);
const hasAds = adsText && adsText.includes(sellerObj.seller_id);
const hasAppAds = appAdsText && appAdsText.includes(sellerObj.seller_id);- Click a stat label to open filtered JSON.
- Use
Copy to Clipboardfor quick sharing. - Use
Save .jsonfor offline analysis or ticket attachments.
Configuration is persisted in chrome.storage.local and controlled through the popup UI.
| Key | Type | Default | Description |
|---|---|---|---|
keyColor |
string | #FF8C00 |
JSON key token color. |
strColor |
string | #7bbf8e |
JSON string token color. |
numColor |
string | #F0FFF0 |
JSON numeric token color. |
boolColor |
string | #F0FFF0 |
JSON boolean/null token color. |
showPanel |
boolean | true |
Show/hide the right-side overview panel. |
showTotalSellers |
boolean | true |
Show total seller records stat. |
showUniqueSellers |
boolean | true |
Show unique-domain sellers stat. |
showInvalidDomains |
boolean | true |
Show invalid/missing domain stat. |
showInvalidAds |
boolean | true |
Show missing ads.txt match stat. |
showInvalidAppAds |
boolean | true |
Show missing app-ads.txt match stat. |
showTotalInvalid |
boolean | true |
Show total invalid (not found in both) stat. |
showTotalFound |
boolean | true |
Show total found (at least one match) stat. |
storage: persisting extension settingshost_permissions: ["*://*/*"]: requesting remote domain resources for validation
Note
There is no .env file or CLI startup flags in the current implementation. All runtime options are managed through extension UI controls and persisted storage keys.
This project is distributed under the MIT License. See LICENSE for full terms.
If you find this tool useful, consider leaving a star on GitHub or supporting the author directly.
