STOREFRONT ASSET & SCRIPT INSPECTION

ShopifyThemeCheck

Shopify theme analysis / developer tooling project for inspecting active storefront assets.


Overview

ShopifyThemeCheck (Theme Inspector) is a browser extension tool designed to inspect live Shopify storefronts in real time. It extracts active theme IDs, liquid template names, third-party app script injections, and structured product JSON payloads in a single click.

The problem

Auditing live client Shopify stores during technical onboarding requires manually searching browser DevTools DOM elements, inspecting inline global scripts (`window.Shopify`), and sifting through third-party app script tags to trace storefront performance bottlenecks.

What I built

A Manifest V3 browser extension that scans the active storefront DOM, parses `window.Shopify.theme` metadata, filters injected external app scripts, and isolates product JSON schema nodes into an easy-to-read developer overlay.

How it works

The extension extracts runtime storefront state directly inside the active tab:

Active Storefront Page Target
↓
Manifest V3 Content Script Execution
↓
DOM & window.Shopify Context Extractor
↓
App Script & Schema Parser
↓
In-Browser Developer Overlay Panel

Key decisions

WARNING — Zero Remote Server Dependency

Engineered the inspection engine to run 100% locally within the browser extension runtime without calling external web servers, protecting store privacy and delivering instant execution.

Implementation

Storefront runtime inspection logic:

theme-inspector.js
JavaScript
function inspectShopifyStorefront() {
  const themeData = window.Shopify ? window.Shopify.theme : null;
  const scriptTags = Array.from(document.querySelectorAll('script[src]')).map(s => s.src);
  const productJson = document.querySelector('script[type="application/json"][id*="Product"]');
  
  return {
    theme: themeData,
    installedAppScripts: scriptTags.filter(src => src.includes('apps') || src.includes('cdn')),
    productSchema: productJson ? JSON.parse(productJson.textContent) : null
  };
}

Result

Accelerates storefront diagnostics and theme audit workflows, providing instant insight into theme architecture and third-party app script footprint.

What I learned

Understanding platform-specific global objects (`window.Shopify`) and script pattern matching allows developers to quickly inspect complex runtime behavior without intrusive debugging tools.