Headless Gold Price Monitoring Boilerplate & Real-Time Alert Engine.
aurum-alert is a high-performance, minimalist technical showcase designed to monitor gold prices in real-time using a completely serverless architecture.
Built with Svelte 5 (Runes) and Cloudflare Workers, this project demonstrates how to build a production-grade monitoring tool on the Cloudflare Free Tier ($0/mo).
This project is the server-side evolution of the Myntra Gold Deal Finder Extension.
While the extension required an open browser tab, aurum-alert runs autonomously in the cloud. It uses a Cron Trigger to scrape prices, KV Storage to manage subscribers, and the Web Push Protocol to hit your phone directly.
Before you begin, ensure you have:
npx web-push generate-vapid-keys.Instead of unreliable HTML scraping, aurum-alert calculates the true India market rate by combining Live Gold Spot Prices (XAU/XAG) with real-time USD/INR exchange rates, factoring in the precise import duty and GST.
For product deals, we skip heavy headless browsers. We hit server-rendered HTML and extract inline JSON product arrays directly. Faster, cheaper, and resilient.
This project demonstrates how to use VAPID keys and the native web-push protocol to send alerts directly from a Worker to a Service Workerβno Firebase or third-party servers required.
Powered by $state and $derived for a ultra-reactive UI that feels like a premium desktop application.
aurum-alert is built with a clean Adapter Pattern. Want to track gold on Amazon, Flipkart, or a local jeweler?
Just implement the BaseAdapter interface:
export interface BaseAdapter {
fetchProducts(): Promise<any[]>;
processItems(items: any[]): GoldProduct[];
}
PRs for new store adapters are highly encouraged.
cd worker
npm install
# Update wrangler.toml with your VAPID keys and KV ID
npx wrangler deploy
cd app
npm install
npm run dev
This boilerplate is a "Lite" edition of the production-grade engine at thegolddeals.com.
The Pro version includes:
MIT. Built with β€οΈ by Vinayak Naik.