diff --git a/docs/showcase/4point-Hoops.mdx b/docs/showcase/4point-Hoops.mdx new file mode 100644 index 0000000..f17bf9b --- /dev/null +++ b/docs/showcase/4point-Hoops.mdx @@ -0,0 +1,94 @@ +--- +title: 4Point Hoops | AI Basketball Analytics Platform +description: Advanced NBA analytics platform that combines live Basketball-Reference data with Perplexity Sonar to deliver deep-dive player stats, cross-season comparisons and expert-grade AI explanations +sidebar_position: 14 +keywords: [4point hoops, nba, basketball, analytics, ai, perplexity, sonar, sports-data, comparisons] +--- + +![4Point Hoops Dashboard](https://d112y698adiu2z.cloudfront.net/photos/production/software_photos/003/442/047/datas/original.png) + +**4Point Hoops** is an advanced NBA analytics platform that turns raw basketball statistics into actionable, narrative-driven insights. By scraping Basketball-Reference in real time and routing context-rich prompts to Perplexity's Sonar Pro model, it helps fans, analysts, and fantasy players understand the "why" and "what's next" – not just the numbers. + + + +## Features + +* **Player Analytics** with season & playoff splits, shot-type breakdowns, and performance radar for any NBA player +* **Cross-Era Comparisons** enabling side-by-side stat comparisons (e.g., Michael Jordan '97 vs. Stephen Curry '22) +* **Team Dashboards** with standings, playoff-probability Sankey flows, and auto-refreshing KPI tiles +* **AI Explain & Similar Players** providing one-click Sonar explanations of stat lines and AI-picked comparable athletes +* **Basketball AI Chat** allowing users to ask an expert LLM about NBA history, rosters, or projections +* **Credit-Based SaaS System** with Firebase Auth, Google login, credit wallets, and admin tooling + +## Prerequisites + +* Node.js 16+ and npm +* Python 3.8+ and pip +* Firebase project setup +* Perplexity API key (Sonar Pro) +* Basketball-Reference access + +## Installation + +```bash +# Clone the frontend repository +git clone https://github.com/rapha18th/hoop-ai-frontend-44.git +cd hoop-ai-frontend-44 +npm install + +# Clone the backend repository +git clone https://github.com/rapha18th/4Point-Hoops-Server.git +cd 4Point-Hoops-Server +pip install -r requirements.txt +``` + +## Configuration + +Create `.env` file in the backend directory: +```ini +PERPLEXITY_API_KEY=your_sonar_pro_api_key +FIREBASE_PROJECT_ID=your_firebase_project_id +FIREBASE_PRIVATE_KEY=your_firebase_private_key +FIREBASE_CLIENT_EMAIL=your_firebase_client_email +``` + +## Usage + +1. **Start Backend**: + ```bash + cd 4Point-Hoops-Server + python app.py + ``` + +2. **Start Frontend**: + ```bash + cd hoop-ai-frontend-44 + npm run dev + ``` + +3. **Access Application**: Open the frontend URL and explore NBA analytics with AI-powered insights + +4. **Use AI Features**: Click "AI Explain" on any player or stat to get intelligent analysis powered by Perplexity Sonar + +## Code Explanation + +* **Frontend**: React with shadcn/ui components and Recharts for data visualization +* **Backend**: Python Flask API serving Basketball-Reference data and managing Perplexity API calls +* **Data Pipeline**: BRScraper for real-time data collection with Firebase caching +* **AI Integration**: Perplexity Sonar Pro for intelligent basketball analysis and explanations +* **Authentication**: Firebase Auth with Google login and credit-based access control +* **Deployment**: Frontend on Netlify, backend on Hugging Face Spaces with Docker + +## Links + +- [Frontend Repository](https://github.com/rapha18th/hoop-ai-frontend-44) +- [Backend Repository](https://github.com/rapha18th/4Point-Hoops-Server) +- [Live Demo](https://4pointhoops.netlify.app/) +- [Devpost Submission](https://devpost.com/software/4point-hoops)