Session 25: Fix all data rendering — proxy routes, Tank01 normalizer, box-score bridge, inline streaks (1579 tests)
This commit is contained in:
@@ -73,6 +73,19 @@ empty. NONE of these spend odds-api credits:
|
||||
- Dead providers: set `status: 'dead'` in `config/providers.js` to drop a
|
||||
provider from fallback chains + configured list (ParlayAPI host is dead).
|
||||
|
||||
## Frontend ↔ Backend Wiring (Session 25 — non-obvious)
|
||||
A new Express route under `/api/*` is NOT reachable from the browser until
|
||||
a matching **Next.js proxy route** exists at `web/src/app/api/.../route.ts`
|
||||
that forwards to `${BACKEND_URL}/api/...`. The browser hits the Next origin,
|
||||
not Express directly. This bit us: schedule/gamelines/streaks/hotlist
|
||||
endpoints worked on Express but 404'd in the UI for two sessions. When
|
||||
adding a backend endpoint the frontend calls, ALWAYS add the proxy too
|
||||
(pattern: `web/src/app/api/odds/nba/route.ts`).
|
||||
|
||||
Tank01 betting-odds real shape: sportsbooks are TOP-LEVEL keys on each
|
||||
game object (`{ awayTeam, homeTeam, bet365:{...} }`), not a `sportsBooks`
|
||||
array. Filter `NON_BOOK_KEYS` to extract books (see `gameLines.js`).
|
||||
|
||||
## Active Skills
|
||||
- vyndr-voice (all user-facing output)
|
||||
- prop-analysis (grading methodology)
|
||||
|
||||
Reference in New Issue
Block a user