Catch retail pricing glitches before they go viral. Validate with AI. Profit instantly.
In the complex world of algorithmic pricing, retailers make mistakes every single day. Decimal errors, coupon stacking glitches, and currency conversion mishaps create instant arbitrage opportunities.
The problem? By the time you see a deal on social media, it's already dead. The solution? Pricehawk.
| Category | Typical Price | Glitch Price | Potential Profit |
|---|---|---|---|
| ๐บ OLED TVs | $2,499 | $249.99 | $2,250 |
| ๐ป Laptops | $1,200 | $120.00 | $1,080 |
| ๐ง Audio | $350 | $35.00 | $315 |
| ๐ Home | $600 | $60.00 | $540 |
Pricehawk monitors 100+ retailers 24/7, detecting anomalies in seconds and delivering them to you before the public finds out.
Pricehawk combines distributed web scraping with Generative AI to filter out "fake" sales and identify true pricing errors.
graph LR
subgraph Detection ["๐๏ธ Detection Layer"]
A[Scraper Engine] -->|Raw HTML| B(Price Parser)
B -->|Price Update| C{Anomaly?}
end
subgraph Validation ["๐ง AI Validation Layer"]
C -->|Yes| D[Context Assembler]
D -->|History + Competitors| E[DeepSeek V3 Agent]
E -->|Confidence Score| F{Is Legitimate?}
end
subgraph Delivery ["๐ Delivery Layer"]
F -->|Yes >80%| G[Notification Router]
G -->|Instant| H[Discord / SMS]
G -->|Digest| I[Email / Twitter]
end
style Detection fill:#e1f5fe,stroke:#01579b
style Validation fill:#f3e5f5,stroke:#4a148c
style Delivery fill:#e8f5e9,stroke:#1b5e20
Pricehawk employs 5 statistical methods to identify pricing errors with high precision:
-
Decimal Error Detection - Flags prices with ratio < 0.1 or > 10 (e.g., $249.99 vs $2,499)
-
Z-Score Analysis - Detects deviations >3ฯ from historical mean (requires โฅ30 samples)
-
Double MAD (Median Absolute Deviation) - Asymmetric outlier detection for right-skewed retail pricing
-
Adjusted IQR with Medcouple - Boxplot-based outlier detection with skewness correction
-
Category-Specific Thresholds - Dynamic sensitivity tuning per product category:
- ๐ฅซ Grocery: 30% drop threshold (most sensitive)
- ๐ป Electronics/Computers: 40% threshold
- ๐ Fashion: 60% threshold (least sensitive)
- ๐ Home/Toys: 50-55% threshold
All algorithms run in parallel, with confidence scores aggregated for final anomaly classification.
Built for speed, reliability, and scale. Pricehawk operates on an event-driven architecture designed to handle thousands of concurrent price checks.
- โก Framework: Next.js 14 (App Router) + TypeScript 5.7
- ๐๏ธ Database: PostgreSQL + Prisma ORM 7.2
- ๐จ Job Queue: BullMQ 5.66 + Redis 5.10 Streams
- ๐ง AI Validation: DeepSeek V3 via OpenRouter
- ๐ท๏ธ Scraping: Dual-strategy approach
- Playwright 1.57 - Browser automation for complex sites
- Jina Reader - API-based scraping alternative
- ๐ Authentication: Clerk + Stripe 20.1 (SaaS tiers)
- ๐ณ DevOps: Docker Compose + Railway deployment
Six specialized BullMQ workers power the event-driven architecture:
- Anomaly Validator - AI-validates detected pricing errors
- Notification Sender - Multi-channel alert distribution
- Deal Verifier - Re-scrapes active deals to detect expiration
- Social Poster - Publishes to Twitter/X and Facebook
- Newsletter Digest - Batches deals for email/Beehiiv campaigns
- Telegram Bot - Interactive
/dealscommand handler
Pricehawk delivers alerts across 8 channels with priority-based routing:
- ๐ฎ Discord - Instant embeds with rich formatting
- ๐ง Email - Via Resend with daily digest support
- ๐ฑ SMS - Via Twilio (Pro/Elite only)
- ๐ฌ Telegram - Direct bot messaging + interactive commands
- ๐ฒ WhatsApp - Via Twilio (Pro/Elite only)
- ๐ฆ Twitter/X - OAuth integration for automated posting
- ๐ Facebook - Social media presence with engagement tracking
- ๐ Webhooks - Custom integrations for power users
- Affiliate Monetization: Automatically injects affiliate tags (Amazon, etc.) into shared links.
- Deal Lifecycle: Auto-expires deals when prices return to normal via verification worker.
- Smart Filtering: Subscribers set min/max prices, categories, retailers, and profit margins.
- Temporal Context: Detection adjusts confidence during known maintenance windows (2-5 AM).
- Chart Generation: Price history visualization with Sharp image processing.
- Audit Logging: Comprehensive event tracking for compliance and debugging.
Deploying Pricehawk requires Docker, PostgreSQL, Redis, and several API keys for full functionality.
- Docker & Docker Compose
- API Keys (see .env.example for complete list):
- OpenRouter (AI validation)
- Clerk (authentication)
- Stripe (payments)
- Twilio (SMS/WhatsApp - optional)
- Twitter/X API (social posting - optional)
- Telegram Bot Token (notifications - optional)
- Resend (email - optional)
# Clone the repository
git clone https://github.com/clduab11/pricehawk.git
cd pricehawk
# Copy environment template and configure keys
cp .env.example .env
# Edit .env with your API keys
# Start the full stack (App + Workers + DB + Redis)
docker compose up --build -d# Generate Prisma client
npm run prisma:generate
# Run migrations
npx prisma migrate deploy
# Seed initial data (optional)
npm run db:seedVisit http://localhost:3000 to access the admin console and view live pricing feeds.
Workers can run in Docker or separately for development:
# Run all workers
npm run worker
# Or run specific workers
npm run worker:validate # Anomaly validator
npm run worker:notify # Notification senderPricehawk operates as a SaaS platform with three monetization channels:
| Tier | Price/mo | Features |
|---|---|---|
| Free | $0 | Discord alerts, Email digest, 3 tracked products |
| Starter | $9.99 | + Twitter, Telegram, 10 tracked products |
| Pro | $29.99 | + SMS, WhatsApp, Priority routing, 50 products |
| Elite | $99.99 | + API access, Custom webhooks, Unlimited products, White-label dashboard |
- ๐ณ SaaS Subscriptions - Tiered access with feature gating (60% of revenue)
- ๐ Affiliate Commissions - Automatic tag injection on all shared deal links (25%)
- ๐ API Licensing - Enterprise data stream for high-volume resellers (10%)
- ๐ Data Reselling - Anonymized pricing trends to market research firms (5%)
pie title Revenue Streams
"SaaS Subscriptions" : 60
"Affiliate Commissions" : 25
"API Licensing" : 10
"Data Reselling" : 5
Users can fine-tune notifications by:
- Categories: Electronics, Fashion, Home, Toys, Grocery, etc.
- Retailers: Amazon, Best Buy, Walmart, Target, etc.
- Price Range: Min/max thresholds
- Profit Margin: Only notify if potential profit > $X
- Channel Selection: Enable/disable specific notification types
- Phase 1: Foundation - Scrapers, PostgreSQL + Prisma, Clerk Auth
- Phase 2: Intelligence - Multi-algorithm anomaly detection, Redis + BullMQ pipeline
- Phase 3: AI Validation - DeepSeek V3 integration, context-aware confidence scoring
- Phase 4: Expansion - Twitter/X, Telegram bot, Facebook, WhatsApp, SMS via Twilio
- Phase 5: Monetization - Stripe SaaS tiers, affiliate injection, subscription management
- Phase 6: Mobile - React Native app with push notifications
- Phase 7: Global - International retailer support (UK, EU, Asia)
- Phase 8: Advanced Analytics - Price prediction ML models, competitor analysis dashboards
We welcome contributions! Please see CONTRIBUTING.md for details.
Pricehawk is dual-licensed:
- ELv2: Free for personal/non-commercial use.
- Commercial: Required for business use or resale.