Hoopin: AI-Powered Real-Time Basketball Competition

Hoopin transforms basketball into a global, real-time competition. Using computer vision, mobile development, and real-time communication, it lets players compete against anyone in the world with just a hoop and a phone.


Inspiration

Most basketball apps focus on training, not competition. We wanted to make basketball more social by creating a system that detects shots in real time and turns them into global matchups.


How We Built It

AI & Computer Vision

  • Custom YOLO model trained on basketball-specific data
  • Shot detection engine distinguishes shots from passes
  • Sub-100ms latency with >85% accuracy

Real-Time Communication

  • FastAPI WebSockets for video streaming and state sync
  • Base64-encoded frame transmission for web/mobile compatibility
  • Concurrent processing for multiple live matches

Cross-Platform App

  • Built with Ionic React, Capacitor, and Zustand
  • Tailwind for UI, Supabase for authentication, stats, and sessions
  • Unified codebase works on iOS, Android, and web

Architecture

  • Frontend (Ionic React) for live streaming and game state
  • Backend (FastAPI + YOLO + OpenCV) for AI detection and game logic
  • Database (Supabase/PostgreSQL) for users, matches, and leaderboards

Challenges

  • Balancing AI accuracy with real-time performance
  • Stable camera access across iOS, Android, and browsers
  • Scaling WebSocket connections for multiple concurrent games
  • Avoiding false positives in shot detection

Achievements

  • Integrated YOLO-based detection directly into live gameplay
  • Achieved smooth cross-platform performance with one codebase
  • Designed a scalable microservices system for real-time multiplayer
  • Built real-time state management with WebSockets + Zustand

What’s Next

  • Tournaments & Leagues: Move beyond 1v1 into organized global play
  • Advanced Analytics: Visualize shot trajectories and player stats
  • Community Features: Teams, leaderboards, and challenges
  • AI Enhancements: Adapt models for varied courts and environments
  • Mobile Optimization: Improve performance on low-end devices

Hoopin brings the competitive spirit of basketball into the digital world — turning every hoop into a connected arena.

Built With

Share this project:

Updates