Files
vyndr/BUILD-STATE.md
T
builtbykev 2366660f5e feat: Feature 2.2 — Line Movement + Cascade Detection
Line movement system:
- Baseline capture on first odds fetch of the day
- Movement detection >= 0.5 points with direction (up/down)
- Sharp money heuristic (sharp_action/public_action/unknown)
- GET /api/movements with player, stat_type, min_movement filters
- Movements included in GET /api/odds/nba live responses

Cascade detection system:
- Scratch detection: player props disappear from 2+ books
- Affected user lookup via scan_sessions + picks
- Parlay re-grade without scratched legs
- cascade_alerts created for affected users
- GET /api/alerts (Analyst/Desk only), PATCH /api/alerts/:id/read

Zero extra Odds API credits — all detection piggybacks on existing fetches.
Migration 002: line_baselines, line_movements, cascade_alerts tables.

30 new tests, 188 total (161 Node.js + 27 Python), all passing.
Phase 2 Core Product COMPLETE.

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

2.5 KiB
Executable File

BetonBLK — Build State

Last Updated

2026-03-21

Current Phase

Phase 2 — Core Product (COMPLETE)

What Has Shipped

Phase 1 — Foundation (COMPLETE)

  • Feature 1.1 — Odds API Integration
  • Feature 1.2 — NBA_API Stats Wrapper (FastAPI microservice)
  • Feature 1.3 — Prop Analysis Engine (6-step grading pipeline)
  • Feature 1.4 — Database Schema (6 tables + 3 new tables, RLS, triggers)

Feature 2.1 — Parlay Scan (COMPLETE)

  • POST /api/scan/parlay — full parlay analysis with auth
  • 5 correlation types, parlay grading, scan count tracking
  • Monetization: 5-scan free limit, personalized upgrade pitch at scan 5

Feature 2.2 — Line Movement + Cascade Detection (COMPLETE)

  • Line movement: baseline capture on first fetch, movement detection >= 0.5 points
  • Sharp money heuristic (sharp_action/public_action/unknown)
  • Cascade detection: scratch detection via props disappearing from 2+ books
  • Re-grade affected parlays, create cascade_alerts for affected users
  • GET /api/movements — today's line movements with filters
  • GET /api/alerts — unread cascade alerts (Analyst/Desk only)
  • PATCH /api/alerts/:id/read — mark alert as read
  • Enhanced GET /api/odds/nba — movements included in live fetch response
  • Zero extra Odds API credits — piggybacks on existing fetches
  • Migration 002: line_baselines, line_movements, cascade_alerts tables

Test Summary

  • Node.js: 161 tests passing (unit + integration)
  • Python: 27 tests passing
  • Total: 188 tests, all green

What's Next

  • Feature 1.5 — Bet Submission (3 methods: screenshot, quickslip, sync)
  • Phase 3 — Web MVP (landing page, scan UI, bet tracker, Stripe)

Active Blockers

  • BLOCKER-003: WSL2 DNS cannot resolve *.supabase.co
  • Migration 002 needs manual apply via Supabase SQL Editor

Session Log

Sessions 1-4 — 2026-03-21

  • Built Phase 1 (Features 1.1-1.4) + Feature 2.1 (Parlay Scan)
  • 158 tests passing

Session 5 — 2026-03-21

  • Built Feature 2.2: Line Movement + Cascade Detection
    • lineMovementService.js (baseline, movement detection, sharp heuristic)
    • cascadeService.js (scratch detection, affected user lookup, re-grade, alert creation)
    • alertService.js (alert CRUD)
    • routes: movements.js, alerts.js
    • Migration 002: 3 new tables (line_baselines, line_movements, cascade_alerts)
    • Integrated into oddsService.js (piggybacks on live fetch)
    • Enhanced odds route with movements in response
    • 30 new tests (unit + integration)
  • Phase 2 Core Product is now COMPLETE
  • Total: 188 tests (161 Node.js + 27 Python), all green