Skip to content

The fastest and easiest way to capture hand histories to study poker later

License

Notifications You must be signed in to change notification settings

LuminRabbit/handhistory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฐ Poker Hand History Tracker PWA

A sleek, mobile-first Progressive Web App for tracking poker hand history with a sophisticated casino-noir aesthetic.

Live Demo: https://luminrabbit.github.io/handhistory/

โœจ Features

  • Hero Cards Selection: Tap to select your 2 hole cards from an interactive card grid
  • Villain Cards Selection: Optional villain hole cards tracking
  • Board Cards Selection: Select up to 5 community cards with automatic street detection (Flop/Turn/River)
  • Game Info: Quick blind selection (1/2, 1/3, 2/5), position picker, and stack size
  • Player Configuration: Select which players are in the hand and mark Hero
  • Auto-Advancing Actions: Automatically cycles through players in correct order
  • Fold Tracking: Folded players automatically removed from action buttons
  • Action Entry: Select street, then action - player auto-advances
  • Keyboard Shortcuts: Lightning-fast action recording (F/C/K/B/R/A keys)
  • Action Log: Organized in 4 columns (Preflop/Flop/Turn/River)
  • Undo Function: Fix mistakes with one tap (or Ctrl/Cmd+Z)
  • Hand History: Save hands to localStorage, expand to see full details, delete unwanted hands
  • PWA Support: Install on mobile devices and use offline
  • Mobile-First Design: Optimized for touch interactions and small screens

๐Ÿš€ Quick Start

Option 1: Python HTTP Server (Recommended)

# Navigate to the project directory
cd poker-hand-tracker

# Python 3
python -m http.server 8000

# Python 2
python -m SimpleHTTPServer 8000

Then open: http://localhost:8000

Option 2: Node.js HTTP Server

# Install http-server globally (if not already installed)
npm install -g http-server

# Run server
http-server -p 8000

Then open: http://localhost:8000

Option 3: VS Code Live Server

  1. Install the "Live Server" extension in VS Code
  2. Right-click on index.html
  3. Select "Open with Live Server"

Important: Do NOT use file:// protocol as it will block PWA features and localStorage in most browsers.

๐Ÿ“ฑ Installing as PWA

On Mobile (Android/iOS)

  1. Open the app in your mobile browser
  2. Android Chrome: Tap the menu (โ‹ฎ) โ†’ "Install app" or "Add to Home screen"
  3. iOS Safari: Tap the Share button โ†’ "Add to Home Screen"

On Desktop (Chrome/Edge)

  1. Look for the install icon in the address bar (โŠ• or computer icon)
  2. Click it and follow the prompts
  3. Or: Menu โ†’ "Install Poker Hand Tracker..."

๐ŸŽฎ How to Use

1. Select Hero Cards

  • Tap the "Hero Cards" slot
  • Select exactly 2 cards from the grid
  • Cards are organized by suit (โ™ โ™ฅโ™ฆโ™ฃ)
  • Tap close button when done

2. Select Board Cards

  • Tap the "Board" slot
  • Select up to 5 community cards
  • Street is automatically detected:
    • 3 cards = Flop
    • 4 cards = Turn
    • 5 cards = River

3. Set Game Info

  • Blinds: Choose from 1/2, 1/3, or 2/5
  • Position: Tap to select your position (SB, BB, UTG, etc.)
  • Stack: Choose 50bb, 100bb, 150bb, or enter custom

4. Record Actions

  • Select Player: Tap a player button (SB, BB, UTG, etc., or Hero)
  • Select Action: Tap an action (Fold, Call, Check, Bet, Raise, All-in)
  • Actions are automatically logged to the correct street column

5. Save Hand

  • Tap "๐Ÿ’พ Save Hand" to save to localStorage
  • All data is preserved: cards, board, blinds, position, stack, actions, and timestamp

6. View History

  • Tap "๐Ÿ“š View Hand History" to see all saved hands
  • Hands are displayed with full details

๐ŸŽจ Design Features

  • Casino-Noir Aesthetic: Dark theme with gold accents
  • Sophisticated Typography: Playfair Display for headers, Space Mono for body
  • Smooth Animations: Card drops, button ripples, modal transitions
  • Touch-Optimized: Large tap targets, active states, haptic-like feedback
  • Visual Hierarchy: Clear sections with subtle borders and shadows

๐Ÿ—‚๏ธ Project Structure

poker-hand-tracker/
โ”œโ”€โ”€ index.html          # Main HTML with mobile-first layout
โ”œโ”€โ”€ app.js              # All JavaScript functionality
โ”œโ”€โ”€ manifest.json       # PWA manifest
โ”œโ”€โ”€ service-worker.js   # Service worker for offline support
โ””โ”€โ”€ README.md          # This file

๐Ÿ’พ Data Storage

All hands are saved to browser localStorage with the following structure:

{
  id: timestamp,
  date: "MM/DD/YYYY, HH:MM:SS",
  heroCards: ["Aโ™ ", "Kโ™ "],
  boardCards: ["Qโ™ ", "Jโ™ ", "10โ™ "],
  blinds: "1/2",
  position: "BTN",
  stack: "100bb",
  actions: {
    preflop: ["Hero: Raise", "BB: Call"],
    flop: ["BB: Check", "Hero: Bet"],
    turn: ["BB: Fold"],
    river: []
  }
}

๐Ÿ”ง Customization

Changing Colors

Edit CSS variables in index.html:

:root {
    --accent-gold: #d4af37;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    /* etc. */
}

Adding More Blind Levels

In index.html, add more buttons to the blinds section:

<button class="btn blind-btn" data-blind="5/10">5/10</button>

Custom Positions

Edit the position grid in positionModal in index.html

๐Ÿ› Troubleshooting

PWA Not Installing

  • Make sure you're using a proper web server (not file://)
  • Check that manifest.json and service-worker.js are accessible
  • Try in Chrome/Edge (best PWA support)

Cards Not Saving

  • Check browser console for errors
  • Ensure localStorage is not disabled
  • Try clearing browser cache and reloading

Layout Issues on Mobile

  • The app is designed for portrait orientation
  • Works best on screens 320px - 600px wide
  • Use Chrome DevTools mobile emulation for testing

๐Ÿ“„ Browser Support

  • โœ… Chrome/Edge (full support)
  • โœ… Safari (iOS/macOS)
  • โœ… Firefox
  • โš ๏ธ Opera (limited PWA support)

๐Ÿ“ License

Free to use and modify for personal projects.

๐ŸŽฏ Future Enhancements

Potential features to add:

  • Bet sizing input
  • Hand strength calculator
  • Export to CSV/JSON
  • Hand replayer
  • Statistics dashboard
  • Cloud sync
  • Dark/light theme toggle

Enjoy tracking your poker hands! ๐Ÿƒโ™ โ™ฅโ™ฆโ™ฃ

About

The fastest and easiest way to capture hand histories to study poker later

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published