A modern, touch-screen friendly web application for managing NFL squares boards for Super Bowl parties and other games. Features real-time scoring via ESPN API, professional TV-style scorebug displays, payment tracking (PayPal/Venmo/Cash), and automatic winner calculation.
- Professional TV-Style Display: Broadcast-quality scorebug with team logos, wordmarks, and gradient backgrounds
- Touch-Screen Optimized: Full on-screen keyboard support for kiosks and touch devices
- Multiple Square Selection: Click multiple squares to buy them all at once with one payment
- Multiple Boards: Support for multiple simultaneous boards (main board, kids board, etc.)
- Smart Auto-Cycling: Boards automatically rotate on display (pauses when viewing square details)
- Player Initials Display: Quick view of who owns each square with clickable details
- Payment Options: Integrated PayPal and Venmo QR codes, plus cash option
- Live Scoring: Real-time game updates from ESPN API every 30 seconds
- Winner Tracking: Automatic winner calculation and display for each quarter
- Team Branding: Authentic NFL team colors, logos, and wordmarks throughout
- Secure Admin Area: PIN-protected with password recovery
- Board Management: Create, view details, delete, and archive boards
- Game Selection: Choose from upcoming NFL games via ESPN API
- Flexible Payouts: Customize payout percentages for each quarter (Q1-Q4)
- Payment Method Control: Enable/disable PayPal, Venmo, or Cash per board
- Payment Tracking: Monitor which squares are paid/unpaid with visual indicators
- Bulk Payment Marking: Mark all unpaid squares as paid with one click
- Per-Player Bulk Actions: Mark all squares for a specific player as paid at once
- Board Finalization: Reveal randomized numbers when ready
- Backup/Restore: Export and import all data as JSON
- On-Screen Keyboard Toggle: Optional keyboard for touch-screen admins
- Rounded corners with gap in the middle (just like ESPN/NFL Network)
- Team logos that overhang the scorebug for dramatic effect
- Gradient backgrounds using each team's primary and secondary colors
- Team wordmarks with white outline for visibility on any background
- Large scores with black stroke and shadow effects
- Authentic NFL team logos (SVG format for crisp display)
- Official team wordmarks for professional look
- Team-specific colors for grid rows and columns
- Gradient effects using team secondary colors
- Player initials shown in claimed squares (2-3 letters)
- Payment status icons (Venmo, PayPal, Cash)
- Click any square to see full player details in a modal
- Color-coded by team (rows = away team, columns = home team)
- Auto-pause board cycling when viewing square details
- Node.js 20+ and npm
- Docker and Docker Compose (for containerized deployment)
-
Clone the repository:
git clone https://github.com/neilyboy/nfl-squares.git cd nfl-squares npm install -
Set up environment:
cp .env.example .env
-
Initialize database:
npx prisma generate npx prisma migrate dev
-
Run development server:
npm run dev
-
Open browser:
http://localhost:3000
-
Build and run with Docker Compose:
docker-compose up -d --build
-
Access the app:
http://your-server-ip:3000 -
View logs:
docker-compose logs -f
-
Stop the app:
docker-compose down
-
Install Chromium:
sudo apt-get update sudo apt-get install chromium-browser unclutter
-
Set up autostart (
~/.config/lxsession/LXDE-pi/autostart):@chromium-browser --kiosk --disable-restore-session-state http://your-server-ip:3000 @unclutter -idle 0 -
Disable screen blanking (in
/etc/lightdm/lightdm.conf):xserver-command=X -s 0 -dpms
- On first launch, you'll be prompted to create an admin PIN (4 or 6 digits) and a recovery password (minimum 8 characters)
- Complete the setup to access the application
- Click Admin button and enter your PIN
- Click Create New Board
- Select a game from the ESPN schedule
- Enter board details:
- Board Name: e.g., "$1 Per Square" or "Kids Board"
- Cost Per Square: e.g., $1.00, $0.25, $10.00
- Quarter Payouts: Percentages for Q1, Q2, Q3, Q4 (must total 100%)
- Accepted Payment Methods:
- β Enable/disable PayPal (enter username if enabled)
- β Enable/disable Venmo (enter username if enabled)
- β Enable/disable Cash payments
- Click Create Board
- On the main screen, click Buy Square
- Select which board (if multiple)
- Click one or more available squares to select them
- Click a square to select it (highlighted)
- Click again to deselect
- Total cost updates automatically
- Enter your name (on-screen keyboard available)
- Click Continue to Payment
- Choose payment method and scan QR code or mark as paid
- Payment amount includes all selected squares
- All your squares are now reserved with one purchase!
- Go to Admin β Manage Boards
- Find your board and click Finalize
- This will:
- Generate random 0-9 numbers for rows and columns
- Reveal the numbers to all users
- Close the board to new purchases
- Boards will automatically update with live scores from ESPN
- The app highlights the current potential winning square
- Winners are calculated automatically at the end of each quarter
- Go to Admin β Manage Boards
- Click View Details on a board
- You'll see all filled squares with payment status
- Individual marking: Click "Mark Paid" or "Mark Unpaid" for each square
- Bulk marking options:
- Click "Mark All Paid" button (top right) to mark ALL unpaid squares at once
- Click "Mark All" next to a player's name to mark all their unpaid squares
- Delete squares if payment fails or needs to be refunded
Backup:
- Go to Admin Dashboard
- Click Backup Data
- A JSON file will download with all data
Restore:
- Go to Admin Dashboard
- Click Restore Data
- Select your backup JSON file
nfl-squares/
βββ prisma/
β βββ schema.prisma # Database schema
βββ public/
β βββ team_logos/ # NFL team logos (SVG)
β βββ team_wordmarks/ # NFL team wordmarks (SVG)
β βββ team_colors/ # Team colors CSV
β βββ vendor_logos/ # PayPal/Venmo logos
βββ src/
β βββ app/
β β βββ api/ # API routes
β β βββ admin/ # Admin pages
β β βββ buy/ # Buy square page
β β βββ setup/ # First-time setup
β β βββ page.tsx # Main board display
β β βββ layout.tsx # Root layout
β β βββ globals.css # Global styles
β βββ components/
β β βββ ui/ # shadcn/ui components
β β βββ squares-grid.tsx # 10x10 grid component
β β βββ game-header.tsx # Game info display
β β βββ winners-display.tsx
β β βββ qr-code-display.tsx
β β βββ pin-entry-dialog.tsx
β β βββ on-screen-keyboard.tsx
β βββ lib/
β βββ db.ts # Prisma client
β βββ auth.ts # Authentication utilities
β βββ espn-api.ts # ESPN API integration
β βββ utils.ts # Helper functions
βββ Dockerfile # Docker configuration
βββ docker-compose.yml # Docker Compose setup
βββ package.json # Dependencies
βββ README.md # This file
Create a .env file:
DATABASE_URL="file:./dev.db"
NODE_ENV="production"The app uses ESPN's unofficial public API endpoints. No API key is required. The app polls for updates every 30 seconds during live games to minimize load.
- PayPal: Uses
paypal.melinks for instant payment - Venmo: Uses Venmo profile links
- Cash: Simple tracking with admin confirmation
- All buttons are minimum 44x44px for easy tapping
- On-screen keyboard automatically appears for all text inputs
- Large, easy-to-read fonts and high contrast
- Swipe-friendly board navigation
- No hover-dependent features
# Reset database
rm -f prisma/dev.db
npx prisma migrate dev# Change port in package.json or use:
PORT=3001 npm run dev# Rebuild from scratch
docker-compose down -v
docker-compose up -d --build- Make sure firewall allows port 3000
- For Docker, ensure port mapping is correct in
docker-compose.yml
- Admin PIN is hashed using bcrypt
- Recovery password is also hashed
- No sensitive data is stored in plain text
- SQLite database file should be backed up regularly
- For production use, consider adding HTTPS
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Prisma - Database ORM with SQLite
- TailwindCSS - Utility-first CSS framework
- shadcn/ui - Beautiful, accessible components
- Lucide React - Icon library
- react-simple-keyboard - On-screen keyboard
- qrcode - QR code generation
- ESPN API - Live game data and scores
- bcrypt - Secure password hashing
- Docker - Containerization
- Docker Compose - Multi-container orchestration
Screenshots coming soon! Check out the live demo or run locally to see the app in action.
Key views include:
- Main board display with TV-style scorebug
- Admin dashboard and board management
- Touch-friendly square selection
- Payment method selection with QR codes
- Real-time winner tracking
Contributions are welcome! Feel free to:
- π Report bugs via GitHub Issues
- π‘ Suggest new features
- π§ Submit pull requests
- β Star the repo if you find it useful!
MIT License - feel free to use and modify for your parties and events!
Built by @neilyboy with:
- Next.js 14, React, TypeScript, and TailwindCSS
- UI components from shadcn/ui
- On-screen keyboard by react-simple-keyboard
- QR codes by qrcode library
- Live game data from ESPN API
- NFL team assets (logos, wordmarks, colors)
Having issues? Check out:
- Troubleshooting section above
- GitHub Issues
Enjoy your Super Bowl party! ππ
Made with β€οΈ for football fans everywhere