c8c0962e56
Core intelligence for BetonBLK prop analysis: - POST /api/analyze/prop — single prop analysis - POST /api/analyze/batch — multi-prop analysis for parlay scanner - 6-step pipeline: season avg → recent form → situational splits → cross-book lines → kill conditions → grade (A/B/C/D) - 6 kill conditions: low_minutes, small_sample, b2b_high_usage, blowout_risk, split_conflict, no_opponent_data - Composite scoring with confidence (30-95), bonuses, penalties - Added spreads market to Odds API fetch (zero extra credits) - Full reasoning output with step-by-step breakdown 36 new tests (unit + integration), 128 total across all features Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
78 lines
3.4 KiB
Markdown
Executable File
78 lines
3.4 KiB
Markdown
Executable File
# BetonBLK — Build State
|
|
|
|
## Last Updated
|
|
2026-03-21
|
|
|
|
## Current Phase
|
|
Phase 1 — Foundation (COMPLETE)
|
|
|
|
## What Has Shipped
|
|
|
|
### Feature 1.1 — Odds API Integration (COMPLETE)
|
|
- GET /api/odds/nba — live NBA player props from DraftKings, FanDuel, BetMGM
|
|
- GET /api/odds/ncaab — NCAAB props (with off-season detection)
|
|
- Normalizer: pairs Over/Under outcomes, maps 8 market types, filters to 3 books
|
|
- Spreads market added for blowout risk detection (Feature 1.3)
|
|
- Redis cache: 15-min TTL, stale fallback on API failure
|
|
- Quota tracking via response headers, 429 when exhausted
|
|
- Query filters: stat_type, player (partial match), book
|
|
|
|
### Feature 1.2 — NBA_API Stats Wrapper (COMPLETE)
|
|
- FastAPI microservice in nba-service/ on port 8000
|
|
- GET /stats/season-avg (24hr cache), /stats/last-n (1hr), /stats/splits (6hr), /players/search (7-day)
|
|
- PRA computed as derived stat, 0.6s rate limiting with retry
|
|
- 27 Python tests passing
|
|
|
|
### Feature 1.3 — Prop Analysis Engine (COMPLETE)
|
|
- POST /api/analyze/prop — single prop analysis with full 6-step pipeline
|
|
- POST /api/analyze/batch — multi-prop analysis for parlay scanner
|
|
- 6-step pipeline: season avg → recent form → situational splits → cross-book lines → kill conditions → grade
|
|
- Grading: composite score → A/B/C/D with confidence 30-95
|
|
- 6 kill conditions: low_minutes, small_sample, b2b_high_usage, blowout_risk, split_conflict, no_opponent_data
|
|
- Full reasoning output: step-by-step breakdown with signals
|
|
- Cross-book line comparison identifies best/worst lines
|
|
|
|
### Feature 1.4 — Database Schema (COMPLETE)
|
|
- 6 tables applied to Supabase: users, picks, scan_sessions, bets, outcomes, performance
|
|
- RLS enabled on all tables with auth.uid() policies
|
|
- 3 triggers: auto-create user, updated_at, scan count reset
|
|
- 37 schema validation tests passing
|
|
|
|
## Test Summary
|
|
- Node.js: 101 tests passing (unit + integration)
|
|
- Python: 27 tests passing
|
|
- Total: 128 tests, all green
|
|
|
|
## What's Next
|
|
- Feature 2.1 — Parlay Scan (depends: 1.3 + 1.4)
|
|
- Feature 2.2 — Real-Time Line Movement + Cascade Detection (depends: 1.1)
|
|
- Feature 1.5 — Bet Submission (depends: 1.4)
|
|
|
|
## Active Blockers
|
|
- BLOCKER-003: WSL2 DNS cannot resolve *.supabase.co (verify-schema.js cannot run from CLI)
|
|
|
|
## Session Log
|
|
|
|
### Session 1 — 2026-03-21
|
|
- Made live Odds API test call, documented raw response format in DECISIONS.md
|
|
- Built Feature 1.1: oddsNormalizer.js, oddsService.js, routes/odds.js, teamMap.js, redis.js, app.js
|
|
- 28 tests (unit + integration), all passing
|
|
- Logged DECISION-001 (API response format) and DECISION-002 (credit conservation)
|
|
- Credits used: 2 of 500 (498 remaining)
|
|
|
|
### Session 2 — 2026-03-21
|
|
- Built Feature 1.2: FastAPI microservice wrapping nba_api (27 Python tests)
|
|
- Built Feature 1.4: Full database schema SQL (37 tests), applied manually via Supabase SQL Editor
|
|
- Logged DECISION-003 (Python microservice) and DECISION-004 (Supabase Auth)
|
|
- Created startup script, Supabase client module, schema verification script
|
|
|
|
### Session 3 — 2026-03-21
|
|
- Built Feature 1.3: Prop Analysis Engine
|
|
- propAnalyzer.js (orchestrator), grader.js, killConditions.js, nbaStatsClient.js, signals.js
|
|
- routes/analyze.js (POST /api/analyze/prop + /batch)
|
|
- Added spreads market to Odds API fetch (zero extra credits)
|
|
- 36 new tests (unit + integration)
|
|
- Logged DECISION-005 (spreads for blowout risk)
|
|
- Phase 1 Foundation is now COMPLETE
|
|
- Total: 128 tests (101 Node.js + 27 Python), all green
|