Skip to content

sri/hoopsheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hoopsheet

A fast, keyboard-driven basketball stat tracker for live games.

Quick Start

# Run the app (uv will auto-install dependencies)
./app.py

# Open browser to http://localhost:5000

Screenshots

Index Page

Index Page Create a new game by entering the game name and player names

Game Tracker

Game Tracker Live stat tracking with keyboard shortcuts, undo history, and comments

Usage

Creating a Game

  1. Enter a game name (e.g., "Lakers vs Warriors")
  2. Add player names (space or comma separated)
  3. Click "Track New Game"

Desktop Controls

Player Selection:

  • Type first letter of player name to select
  • / - Navigate between players
  • Enter - Edit selected player's stats manually

Recording Stats:

  • 2 - 2-point field goal
  • 3 - 3-point field goal
  • m - Miss
  • a - Assist
  • t - Turnover
  • s - Steal
  • r - Rebound
  • f - Free throw make
  • F - Free throw miss

Navigation:

  • [ / ] - Previous/next quarter (Q1-4, OT1-3)
  • / - Decrement/increment hovered stat
  • Esc - Clear selection

Quick Entry:

  1. Hover over any stat cell
  2. Click to increment
  3. Or use keyboard shortcuts for selected player

Mobile/Touch

  • Tap player name to select
  • Tap stat cells to increment values
  • Tap quarter button to advance quarters
  • Tap game name to edit
  • Tap "+ Player" to add new players mid-game

Features

Undo

  • Every stat change is tracked in history
  • Click "Undo" to reverse the last change
  • View recent 5 changes, expand for older history
  • Undo updates both UI and database

Comments

  • Add game notes below the stats table
  • Press Enter or blur to save comment
  • Click any comment to edit
  • Clear comment to delete
  • Comments saved to database

Live Stats

  • Real-time score and FG% calculation
  • Automatic totals row
  • Per-quarter tracking
  • Sticky headers for scrolling

Minimal Mode

  • Click "Minimal Mode" button to toggle clean display
  • Hides UI elements: comments, history, controls, edit buttons, back button
  • Shows only the stats table for focused tracking or screen sharing
  • Perfect for presenting on secondary displays or during broadcasts
  • Preference saved in browser localStorage

Tech Stack

Runtime:

  • Python 3.11+
  • uv - Fast Python package manager

Backend:

  • Flask - Web framework
  • Peewee - Lightweight ORM
  • SQLite - Database

Frontend:

  • Vanilla JavaScript (no frameworks)
  • HTMX - For error handling
  • Server-side rendering with Jinja2

Dependencies (auto-installed by uv):

flask
peewee

Database Schema

  • Games - name, external_id (10-char public ID)
  • Players - name, linked to game
  • Stats - per-player stats (FG, FT, assists, etc.)
  • Comments - game notes with timestamps

Development

The app uses uv's inline script dependencies - no separate requirements.txt needed. Just run ./app.py and uv handles everything.

Data is stored in hoopsheet.db (SQLite) in the project directory.

License

MIT


This app was mostly vibe-coded with Claude Sonnet 4.5 - both the UI and backend.

About

hoopsheet - A fast basketball stat tracker for live games.

Resources

Stars

Watchers

Forks