Skip to content

moosairfaan/DropAlert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DropAlert

Real-time email alerts for streetwear and sneaker drops

DropAlert scrapes Supreme, Nike SNKRS, Jordan, Adidas, New Balance, Puma, ASICS, Kith, and Palace every 30 minutes using Playwright. When a new drop is detected, subscribers get an email before it sells out.

Live app: https://dropalert-sigma.vercel.app/#subscribe
|
GitHub: https://github.com/moosairfaan/DropAlert

Stats

Metric Value
Subscribers 2+
Brands monitored 9
Drops tracked 15+
Uptime 99.9%
Brands covered Supreme, Nike, Jordan, Adidas, New Balance, Puma, ASICS, Kith, Palace
Alert channels Email (Resend)
Pipeline frequency Every 30 minutes

Stats (subscribers, alerts, drops) are live from production as of the latest deploy. Uptime reflects UptimeRobot monitoring of the Vercel frontend.

How It Works

  1. Playwright scrapes all supported brands every 30 minutes on Railway (parallel scrapers)
  2. New drops are deduplicated using Redis (48hr TTL key per drop)
  3. New drops are inserted into PostgreSQL
  4. Email alerts are sent to subscribers who follow that brand
  5. Every alert is logged to prevent duplicate sends
  6. The Next.js frontend shows a live drop calendar and handles subscriptions

Tech Stack

Layer Technology
Scraping Python, Playwright (Chromium)
Scheduling APScheduler (interval: 30 min)
Deduplication Redis (TTL-based key per drop)
Database PostgreSQL (Railway)
Email Resend (HTML templates)
Frontend Next.js 16 App Router, TypeScript, Tailwind CSS
Frontend hosting Vercel
Backend hosting Railway
Monitoring UptimeRobot

Architecture

scheduler.py (APScheduler every 30min)
    └── pipeline.py (orchestrator)
         ├── scrapers/ (Playwright → drops list)
         ├── redis_client.py (dedup check)
         ├── db.py (upsert drop + get subscribers)
         └── alerts/ (Resend email)

Postgres `drops` table
    └── Vercel GET /api/feed (no cache) ← ProductList polls every 15s

See DATA_FLOW.md for the full scraper → DB → API → UI path.

Local Development

cd scraper && pip install -r requirements.txt && playwright install chromium
# Create scraper/.env with DATABASE_URL, REDIS_URL, Resend, etc.
python scheduler.py          # every 30 min (local worker)
# python run_scrape.py         # one-shot (same as Railway cron)
# python http_server.py        # POST http://localhost:8080/api/scrape
cd frontend && npm install
# Create frontend/.env.local with DATABASE_URL
npm run dev

Open http://localhost:3000.

Deploy

  • Frontend (Vercel): set Root Directory to frontend. See VERCEL.md if you get “No Next.js version detected”.
  • Scraper (Railway): set Root Directory to scraper, use the Dockerfile there. Required: add DATABASE_URL, REDIS_URL, RESEND_API_KEY, ALERT_FROM_EMAIL, DROPALERT_APP_URL on the scraper service — see scraper/RAILWAY.md.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors