# 🛍 Shopify Webhook Product Viewer
A Node.js + Express application that listens to Shopify product update webhooks, verifies webhook authenticity using HMAC, fetches product metafields via Shopify Admin API, and displays structured product data in a clean UI dashboard instead of raw JSON.
## 🚀 Features
- Shopify webhook HMAC verification
- Real-time product update handling
- Fetch product metafields using Shopify Admin API
- Displays product details including:
- Title
- Description
- Vendor
- Tags
- Variants (price, SKU, inventory)
- Custom metafields
- Clean browser-based UI dashboard
- Environment-based configuration using `.env`
- Beginner-friendly and interview-ready project
## 🧰 Tech Stack
- Node.js
- Express.js
- Shopify Admin API
- Crypto (HMAC verification)
- node-fetch
- dotenv
## ⚙️ Setup & Installation
```bash
git clone <your-repo-url>
cd spgetter
npm installCreate a .env file in the root directory:
PORT=3000
SHOPIFY_STORE=your-store.myshopify.com
SHOPIFY_ADMIN_API_TOKEN=your_admin_api_token
SHOPIFY_WEBHOOK_SECRET=your_webhook_secretnode app.jsServer will run at:
http://localhost:3000
Webhook endpoint:
POST /webhooks/product-update
For local testing, expose your server using ngrok:
ngrok http 3000Use the generated HTTPS URL in Shopify webhook settings.
- Shopify sends a product update webhook
- Server verifies request using HMAC signature
- Product data is extracted from the webhook payload
- Metafields are fetched using Shopify Admin API
- Data is stored in memory
- UI dashboard displays the latest product in a structured format
Open in browser:
http://localhost:3000
The UI displays:
-
Product title, vendor, description
-
Variants with price, SKU, and stock
-
Custom metafields such as:
- custom.product_name
- custom.collection
- custom.gender
- custom.limited_edition
- custom.features_1
-
Ensure metafields are created and assigned in Shopify admin
-
Webhook must be properly configured in Shopify
-
Use ngrok for local development
-
API token must include:
- read_products
- read_metafields
- Shopify webhook integration learning
- Backend API + webhook handling practice
- QA / SQA testing scenarios
- Real-time product monitoring system
- Portfolio / interview project
Shehroz fazal(SQA)