Skip to content

Dropback Takehome: Men's College Basketball Player Comparison Tool#3

Open
saketvissa wants to merge 5 commits intoDropback:mainfrom
saketvissa:feature/saket-takehome-implementation
Open

Dropback Takehome: Men's College Basketball Player Comparison Tool#3
saketvissa wants to merge 5 commits intoDropback:mainfrom
saketvissa:feature/saket-takehome-implementation

Conversation

@saketvissa
Copy link
Copy Markdown

@saketvissa saketvissa commented Nov 12, 2025

Dropback Takehome: Men's College Basketball Player Comparison Tool

Reviewer - @DropbackHQ

Demo

Screen.Recording.2025-11-11.at.11.32.36.PM.mov

Installation Steps

  1. Install dependencies

    npm install
  2. Start Supabase local instance

    npx supabase start
  3. Configure environment variables

    Create apps/web/.env.local with the following (get values from npx supabase status):

    NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key_here
    SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
    

    An example template is provided in apps/web/.env.example

  4. Start the development server

    npm run dev
  5. Run data ingestion

    curl -X GET http://localhost:3000/api/data-ingestion

    This will fetch and populate the local Postgres instance with ~1000 college basketball players from ESPN's 2025-2026 season.

  6. Access the app

    Open http://localhost:3000 to use the player comparison tool.

Technical Details

A full-stack college basketball player comparison tool with three core components:

Data Ingestion Service: Automated ESPN API integration that fetches player profiles and statistics, then stores them in Supabase. Handles both player metadata (name, position, year, team) and player statistics (PPG, RPG, APG, FG%, etc.).

Database Schema: Two-table design with players table for profile data and player_stats table for a player's season statistics. Includes proper foreign key relationships, indexes on frequently queried fields, and support for home/away stat tracking.

Comparison UI: Modern Next.js interface with dual player selection dropdowns (grouped by year), side-by-side stats table with difference highlighting, and advanced metrics visualizations using Recharts. Feature responsive design with dark mode support.

Advanced Metrics Visualizations:

  • Per-Minute Impact: (PTS + REB + AST + STL + BLK - TO) / MIN
  • True Shooting %: PTS / (2 × (FGA + 0.44 × FTA)) - normalized to 0-1 scale
  • Assist/Turnover Ratio: AST / TO
  • Defensive Impact: STL + BLK - PF

Also includes a player strengths analysis that identifies each player's top 3 attributes based on college basketball thresholds (12 PPG for scoring, 6 RPG for rebounding, 3 APG for playmaking, etc.).

Further Improvements

  • Add more advanced metrics (PER, Win Shares, Usage Rate, Box Plus/Minus)
  • Add team-level aggregations and roster comparisons
  • Add player search functionality instead of just dropdowns
  • Support for filtering by conference, division, or position
  • Add unit and integration tests for data ingestion and aggregation logic

Saket Vissapragada added 5 commits November 11, 2025 21:31
- Create ESPNService for fetching players and stats from ESPN hidden API
- Add SupabaseService for bulk database operations
- Build data ingestion API route with batch processing
- Store player info and stats in local Postgres instance
- Add player selection dropdowns grouped by class year
- Display player cards with headshots, jersey numbers, and stats
- Implement side-by-side stats comparison table
- Add stat highlighting (bold for better stats)
- Include modern UI: hover effects, fade-in animations, sticky headers
- Add empty state for initial page load
- Support dark mode via system preference
- Implement 4 advanced basketball metrics: Efficiency Rating, True Shooting %, Assist/Turnover Ratio, and Defensive Impact
- Add interactive bar chart visualization using Recharts library
- Include metric guide panel with formulas and descriptions
- Add player strengths summary section highlighting top 3 statistical strengths per player)
- Full dark mode support for all visualization components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant