跳到正文
DEV Community· Weiyi Wang·· 38 分鐘前AI 評分42

我如何構建零伺服器 Shopify 檢查 Chrome 擴充功能(MV3)及完整 Micro-SaaS 技術堆疊

How I Built a Zero-Server Shopify Inspector Chrome Extension (MV3) + My Full Micro-SaaS Stack

AI 導讀

ShopScope 是一款零後端運算的 Shopify 檢查 Chrome 擴充功能,透過用戶目前開啟的瀏覽器分頁檢查商店主題、應用程式、追蹤像素及 SKU 定價。

正文

Weiyi Wang

Most indie Chrome extensions burn money on backend proxies and headless browsers from day one. When I built ShopScope (a Chrome Manifest V3 extension that inspects any Shopify storefront's theme, installed apps/pixels, and SKU pricing), I flipped that constraint: zero backend compute, zero AI token bills, and strict minimal permissions.

Because every inspection runs inside the user's active browser tab, it unlocks a clean Freemium -> $39 Lifetime Pro model without worrying about heavy power users eating server margin.

1. How Zero-Server Shopify Inspection Works

Every public Shopify storefront exposes two high-signal local inspection surfaces on the same origin:

  1. DOM + Script Signatures: When the user opens the ShopScope popup, chrome.scripting.executeScript inspects loaded script tags, global objects, and DOM markers on the active tab to match 30+ app & tracking pixel signatures (Klaviyo, Yotpo, Gorgias, Judge.me, Loox, Recharge, Privy, Smile.io, Okendo, Omnisend, Attentive, Postscript, Triple Whale, Hotjar, Microsoft Clarity, Meta Pixel, TikTok Pixel, Pinterest Tag, Shop Pay, Klarna, Afterpay, and more) alongside the active theme metadata.
  2. Same-Origin Catalog Endpoints: Fetching /products.json?limit=250&page=N and /collections.json directly from the active origin bypasses CORS and proxy costs while delivering live variant pricing (min, median, avg, max), vendors, and SKU tables.

2. Manifest V3 Minimal Permissions

Chrome Web Store reviewers reject overly broad host permissions quickly. ShopScope only requests:

  • "activeTab" & "scripting" — runs only when the user clicks the toolbar icon on the current tab.
  • "storage" — caches the user's optional Pro activation state locally in chrome.storage.local.
  • "https://api.gumroad.com/*" — only host permission, used solely to verify user-submitted Gumroad Pro license keys.

Free users get unlimited tech-stack + price audits and the first 15 products exported to RFC-4180 CSV; ShopScope Pro ($39 lifetime) unlocks multi-page scraping (up to 1,250 SKUs per store) and 1-click Markdown agency audit reports.

3. Instant License Verification with Gumroad API

Instead of maintaining a billing database, Pro keys verify directly from the popup via:

const body = new URLSearchParams({
  product_id: GUMROAD_PRODUCT_ID,
  license_key: licenseKey,
  increment_uses_count: "false",
});

const res = await fetch("https://api.gumroad.com/v2/licenses/verify", {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: body.toString(),
});

Checking !data.purchase.refunded && !data.purchase.chargebacked gives clean lifetime license enforcement with zero webhook servers to maintain.


My Complete Live Developer & E-Commerce Toolkit

If you build data pipelines, AI agents, or audit Shopify stores in bulk, here is the full live stack we shipped alongside ShopScope:

Product What It Does Tier / Pricing Link
ShopScope (Shopify Store, App & SKU Inspector) 1-click Chrome MV3 inspector for Shopify themes, 30+ apps/pixels, SKU pricing stats & CSV/Markdown exports Free + $39 Lifetime Pro Docs · Pro Key
B2B Commerce, SEC Filings & Domain Intel API Cloud REST API for headless Shopify catalogs, SEC EDGAR XBRL financials & SPF/DMARC domain scoring Free (100/mo) · $19–$149/mo RapidAPI
AI Dev Utils API Deterministic RAG chunker, JSON Schema sanitizer & semantic diff API on Cloudflare Workers Free (100/mo) · $9–$99/mo RapidAPI
AI Dev Radar Daily synced GEO & llms.txt Index, MCP Server Directory & LLM API Pricing Calculator 100% Free Web Tools ai-dev-radar
5 Apify RAG & GEO Actors docs-to-rag-chunks, geo-readiness-auditor, webpage-diff-monitor, openapi-to-mcp-and-rag, rss-feed-to-rag Pay-Per-Event ($0.001–$0.004) Apify Store

Questions or feedback? Drop a comment below or reach out on X (@weiyi_ai).

來源:DEV Community · dev.to