CourtVision is a polished NBA analytics web app built with Next.js 14, TypeScript, Tailwind CSS, shadcn-style UI primitives, Framer Motion, Recharts, and a modular Python modeling package. It ships with offline-ready mock data and a graph-based MVP prediction system for standings, matchup comparison, and playoff bracket projections.
- Premium dark sports dashboard UI
- Dashboard with title odds, projected records, risers/fallers, and win-total chart
- Predicted playoff bracket with East/West structure, finals projection, and manual bracket mode
- Team comparison workflow with stat-by-stat winners and correct higher/lower-is-better logic
- Standings and projection tables
- Model overview page
- Next.js API routes:
GET /api/teamsGET /api/team-statsGET /api/standingsGET /api/projectionsGET /api/compare?teamA=BOS&teamB=LALGET /api/bracketGET /api/model-info
- Python modeling package with separable ingestion, graph scoring, feature engineering, and simulation modules
app/
api/
bracket/
compare/
model/
standings/
components/
layout/
ui/
data/mock/
lib/
python/
courtvision/
scripts/
- Install dependencies:
npm install- Start the Next.js app:
npm run dev- Open
http://localhost:3000.
- Create and activate a virtual environment.
- Install Python dependencies:
pip install -r python/requirements.txt- Run the sample modeling pipeline:
cd python
py -3 -m courtvision.pipelineOr run the refresh helper:
py -3 python/scripts/refresh_data.py- The app currently uses bundled mock JSON under
data/mock/east.jsonanddata/mock/west.json. - The Next.js API layer is already structured so you can swap the mock source for live
nba_api, SQLite, or PostgreSQL later. - The Python package is intentionally modular so the MVP logistic workflow can later be replaced with a GNN or another graph-native model.
Copy .env.example to .env.local and adjust values as needed:
COURTVISION_DATA_MODE=mock
COURTVISION_MODEL_SEASON=2025-26- This implementation follows the earlier explicit Next.js 14 + React + TypeScript stack and uses Next API routes for the web backend.
- The repo does not require live NBA connectivity to render.
- shadcn/ui is represented through local component primitives and config, so the app remains self-contained.