Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Swipe Wiser (NBA Pre-Swipe Betting Demo)

Overview

Swipe Wiser is a React + Node demo that flips the betting flow: review AI-backed player analysis first, then swipe to unlock preset paper bets. The MVP focuses on today’s NBA slate (filtered to Knicks @ Magic and Spurs @ Thunder by default) with live-data fallbacks, a dark glassy UI, and a Gradient AI chat proxy for analysis.

Features

  • Today’s games with team presets; two-matchup filter for demo stability.
  • Player analysis deck with always-visible context, risk, and chat; Tinder-style swipe (X/heart) unlocks player presets.
  • Team bets directly from the games page; player bets after right swipe.
  • Live roster fetch (NBA boxscore JSON) with mock fallback; mock data retained so the demo works offline/off-hours.
  • Slip with editable stakes until games start; live vs past bets separated, showing potential payout and P&L chips.
  • Wallet bar showing available balance, total, reserved, and P&L; seeded demo P&L to keep totals near $1,000.
  • Gradient AI chat via backend proxy (/api/agent/chat) with a local fallback.

Quick Start

  1. Server
    • Optional server/.env:
      • AGENT_ENDPOINT (defaults to Gradient public chat completions URL)
      • AGENT_API_KEY (if your agent requires auth)
    • From server/: npm run dev
  2. Client
    • From client/: npm run dev
    • If needed, set VITE_API_BASE_URL=http://localhost:4000

Data Flow

  • /api/games/today: pulls NBA scoreboard JSON and filters to the two demo matchups; falls back to mock games if not found.
  • /api/games/:id/players: pulls NBA boxscore rosters; falls back to mock players if blocked/forbidden.
  • Agent proxy: /api/agent/chat forwards player context + question to Gradient; returns a fallback message if unreachable.

UI Highlights

  • Dark, glassmorphism-inspired cards, floating filter button, bottom nav with icons.
  • Deck counter, swipe animations (slide/tilt with X/heart), and skeleton loaders for live players.
  • Slip separates live/upcoming vs past; past is read-only; live bets editable until scheduled; potential payout shown.

Scope

  • NBA only; paper bets only.
  • No scraping of HTML; only public NBA JSON endpoints when available.
  • Preset probabilities are mock/deterministic for demo; real odds not implemented.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages