Commit Graph

3 Commits

Author SHA1 Message Date
builtbykev d4e5e76452 Session 7h: Stripe products, tier config, scan limits, response gating, free tier 2026-06-10 13:24:11 -04:00
builtbykev 6f4a353de9 Session 7d: Audit fixes - rate limiting, error leak, parallel parlays, analyze cache, bundle analyzer 2026-06-10 03:12:20 -04:00
builtbykev 411cb6f196 feat: Feature 2.1 — Parlay Scan with correlation detection + monetization
POST /api/scan/parlay — authenticated parlay analysis:
- Supabase JWT auth middleware (auth.getUser verification)
- 5 correlation types detected between legs (same_game, same_team,
  same_player_conflicting, positive_correlation, blowout_cascade)
- Overall parlay grading (A/B/C/D) with correlation penalty adjustments
- Free tier: 5 scans/month, atomic scan count increment
- Scan 5: full analysis + personalized upgrade pitch
- Scan 6+: 403 block with upgrade pitch
- Pitch personalization from scan history (top stats, grades, tier rec)
- DB writes: picks + scan_sessions per scan

30 new tests, 158 total (131 Node.js + 27 Python), all passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:45:15 -04:00