Global deals and coupons website powered by the Cuelinks V3 API.
PROJECT-GUIDE.md is the full project and operations guide: architecture, data model, daily/weekly processing, adding deals, categories/tags, filters, deployment, troubleshooting, and instructions for AI coding agents. Start there.
- Frontend: static HTML/CSS/vanilla JS (Cloudflare Pages / GitHub Pages compatible)
- Live API proxy: Cloudflare Pages Functions (
functions/api/offers.js,functions/api/categories.js) - Data refresh:
scripts/fetch-cuelinks.jspulls offers from Cuelinks and writesdata/deals.json - Design: modern, clean, European-inspired palette
Create a V3 API key in Cuelinks with at least read:offers scope.
npm install
# optional: fetch live deals into data/deals.json
CUELINKS_API_KEY=your_key node scripts/fetch-cuelinks.js
npm startFor Cloudflare Pages Functions locally, use Wrangler and set CUELINKS_API_KEY in .dev.vars (see .dev.vars.example).
- Push this repo to a private GitHub repo.
- In Cloudflare Pages, create a project from that repo.
- Build settings:
- Framework preset: None
- Build command: (empty)
- Output directory:
/
- Add environment variable/secret in Cloudflare Pages:
CUELINKS_API_KEY= your Cuelinks V3 key
- Deploy. The frontend will call
/api/offers, which is proxied by Pages Functions using the secret key.
- Automatic/scheduled: GitHub Action
.github/workflows/fetch-cuelinks.ymlruns every 6 hours or manually. Add repo secretCUELINKS_API_KEY. - Manual: run
npm run fetch-deals(ornode scripts/fetch-cuelinks.js) withCUELINKS_API_KEYset, thennpm run sitemap.
- Never commit API keys. Use Cloudflare secrets, GitHub Actions secrets, or local
.dev.vars. - The frontend falls back to
data/deals.jsonif/api/offersis unavailable. data/offers.csvand old v1 files are legacy/reference; Cuelinks API is the new source.