Skip to content

Repository files navigation

Event Ticket Tracker

Live dashboard: https://event-ticket-tracker.neeti-tickets.workers.dev

Cloudflare Worker that tracks resale ticket prices, stores price history, and sends push notifications when prices drop below your target. Uses the Ticketmaster Discovery API to search for and track events. Supports multiple independent users, each with their own isolated account.

Features

  • Multi-user: each account gets a short numeric token, its own tracked events/settings, and an auto-generated ntfy topic — no passwords
  • Search and track any event on Ticketmaster
  • Monitors resale get-in prices via a Playwright scraper
  • Price history charts per event
  • Alerts via ntfy.sh push notifications or SMS
  • City-level watch for newly announced events
  • Cron-triggered resale scrape, interval configurable from the dashboard

Setup

1. Prerequisites

2. Install dependencies

npm install

3. Create a KV namespace

npx wrangler kv namespace create PRICE_DATA

Copy the id from the output into wrangler.toml.

4. Set secrets

npx wrangler secret put TICKETMASTER_API_KEY
npx wrangler secret put RESEND_API_KEY    # sends account-recovery emails
npx wrangler secret put SCRAPER_SECRET    # shared secret between the Worker and the GitHub Actions scraper
npx wrangler secret put NTFY_TOKEN        # optional, for protected ntfy topics
npx wrangler secret put GITHUB_PAT        # optional, to trigger the resale scraper

Add the same SCRAPER_SECRET value as a SCRAPER_SECRET repository secret in GitHub (Settings → Secrets and variables → Actions) — the scraper workflow won't authenticate without it.

5. Deploy

npm run deploy

Usage

Visit the live URL and enter your email to create an account — no password, just a short numeric account number and a link (/u/{token}). Bookmark the link, or return to the bare domain and a cookie will remember you on that browser. Lost your link? Use Recover Access to get it re-emailed.

Once in, use the Explore Events tab to search for events on Ticketmaster. Click Track to start monitoring a specific event — set your max price and the number of tickets you need. Each account gets its own auto-generated ntfy topic (shown under Settings → Your Account) — subscribe to it in the ntfy app to get alerts.

You'll get an alert when any tracked source drops to or below your target price.

Resale prices (get-in scraper)

Resale "get-in" prices are fetched by a Playwright scraper that runs via GitHub Actions across every account's tracked events. From the dashboard, click Scrape Prices on any tracked event to trigger it early. Requires a GITHUB_PAT secret with repo scope to dispatch the workflow, and SCRAPER_SECRET for the scraper to authenticate back to the Worker.

API

Method Path Auth Description
GET / Landing page, or redirect to your account if cookied
POST /api/signup Create (or look up) an account by email
POST /api/recover Email the account link to an existing account
GET /u/:token Dashboard for a specific account
GET /api/watches cookie List tracked events
POST /api/watches cookie Add or update a tracked event
DELETE /api/watches/:slug cookie Remove a tracked event
GET /api/prices/:slug cookie Price history for an event
GET /api/settings cookie Get alert settings
POST /api/settings cookie Save alert settings
POST /api/scrape cookie Trigger the GitHub Actions scraper
GET /api/scraper/watches scraper secret List due watches across all accounts (used by the scraper)
POST /api/ingest scraper secret Ingest price snapshots for an account (used by the scraper)
GET /api/should-scrape Whether any account is due for a scrape (used by the cron gate)
GET /api/status Health check

Local development

npm run dev

Opens http://localhost:8787.

Architecture

  • Runtime: Cloudflare Workers (TypeScript)
  • Storage: Cloudflare KV — every key is scoped under a u:{token}: prefix per account (price history, watched events, settings); a small set of account:*/email:* keys map tokens to accounts
  • Accounts: short numeric token issued at signup, session kept via an HTTP-only cookie; email-based recovery via Resend; per-IP rate limiting on signup/recovery/account-lookup
  • Price source: Playwright scraper (ticketdata.com) for resale get-in prices, authenticated to the Worker via a shared SCRAPER_SECRET; Ticketmaster Discovery API is used only for event search/tracking, not price polling
  • Alerts: ntfy.sh push notifications (one auto-generated topic per account) and/or SMS carrier gateway
  • Dashboard: Server-rendered HTML + Chart.js, no separate static hosting needed

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages