A comprehensive arcade management system for tracking games, play statistics, revenue, and maintenance with advanced work logging capabilities and real-time skeeball integration.
- Game Inventory: Track arcade games with detailed information (manufacturer, year, genre)
- Location Tracking: Monitor game locations (Floor, Warehouse, Shipped) with specific positions
- Status Management: Track game status (Working, Being Fixed, Not Working, Retired)
- Image Support: Upload and display cabinet photos
- Revenue Analytics: Automatic play and revenue calculation from coin counts
- Create Work Orders: Report issues with detailed descriptions
- Status Tracking: Open, In Progress, Fixed, Deferred status management
- Technician Assignment: Assign work orders to specific technicians
- Individual Work Entries: Each update creates a new timestamped work log entry
- Detailed Work History: Complete audit trail of all work performed
- Work Session Tracking:
- Work description with detailed notes
- Time spent per work session (hours)
- Parts/materials used per session
- Cost breakdown per work session
- Technician attribution per entry
- Chronological Display: Work entries shown in timeline format with timestamps
- Color-coded Information: Different colors for timestamps, technicians, time, and costs
- Comprehensive Details: Full work descriptions, parts used, and session costs
- Professional Layout: Clean, organized presentation of work history
- Time-filtered Reports: View maintenance data for 7, 30, 90 days or full year
- ๐ PDF Reports with Work Logs: Professional reports including detailed work history
- CSV Export: Export game data for external analysis
- Performance Analytics: Top/worst performing games with charts and graphs
- View game information and statistics
- View maintenance reports
- Basic dashboard access
- All Read Only permissions
- Log work entries in maintenance orders
- View detailed work order history
- Create maintenance requests
- All Operator permissions
- Update and manage work orders
- Record play data and revenue
- Add and edit games
- Access complete work logging system
- Generate and export reports
- All Manager permissions
- User management (create, disable users)
- Database backups and restoration
- Delete games and associated data
- Access maintenance order via "๐๏ธ View" or "โ๏ธ Update" button
- Fill out work performed during session:
- Work Description: Detailed notes of what was done
- Parts Used: Materials consumed during this session
- Time Spent: Hours worked (e.g., 2.5 hours)
- Session Cost: Cost incurred for this specific work
- Click "๐ Log Work Entry"
- New timestamped entry is created and added to work history
- View complete work history via "๐๏ธ View" button
- See chronological timeline of all work performed
- Track total time and costs across all work sessions
- Export detailed reports with work summaries
- Update overall order status and assignments
-
Run the application:
python app.py
-
Access the app:
- Open your web browser and go to:
http://localhost:5000 - Complete initial admin setup
- The database will be created automatically on first run
- Open your web browser and go to:
If you prefer to set up manually:
cd arcade-tracker
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.pyArcade Tracker includes a complete Raspberry Pi-based skeeball scoring system with automatic scoring, real-time revenue tracking, and scalable multi-lane architecture.
- 7-Sensor Configuration: Coin input + ball counter + 5 scoring holes
- Score 10: 5 switches (10 points each)
- Score 50: 2 switches (50 points each)
- Lane Track: Ball roll detection (50 points)
- Infrared Sensors: Break-beam detection for accurate, reliable scoring
- Debounce Logic: Prevents double-counting from sensor bounce (configurable)
- Real-time Score Display: Instant feedback on each ball scored
- 9-Ball Standard Games: Traditional skeeball format
- Bonus Games: Automatic bonus game awards at configurable thresholds
- Ball Timeout: Configurable timeout between balls (prevents stuck games)
- Coin Integration: Start games via coin acceptor or manual trigger
- Persistent State: Game state survives power loss and restarts
- Revenue Reconciliation: Daily automated revenue sync with Arcade Tracker database
- Single Lane Mode: Raspberry Pi 4 connected directly to one machine
- Multi-Lane Mode: Unlimited scalability
- Pi 4 acts as coordinator running Arcade Tracker
- One Raspberry Pi Pico per skeeball lane
- USB serial communication between Pi 4 and Picos
- Independent lane operation (isolated failures)
- Simplified wiring per machine
- Main Hub (
/skeeball/): Overview, lane selection, and navigation - Control Panel (
/skeeball/control): Real-time game monitoring with 0.5-second updates- Live score tracking during active gameplay
- Ball counter showing remaining balls
- Game active status (playing/ready/offline)
- Instant feedback on coin insertions
- Simulator (
/skeeball/simulator): Full gameplay testing without GPIO hardware - Statistics (
/skeeball/stats): Live revenue analytics with 1-second updates- Total coins inserted (cumulative)
- Total games played
- Real-time revenue tracking
- GPIO Testing (
/skeeball/gpio-test): Real-time hardware diagnostics and sensor monitoring - RESTful API: Authenticated endpoints for programmatic control and monitoring
- Raspberry Pi (any model with GPIO - Pi 4 recommended)
- MicroSD Card: 16GB+ recommended
- Power Supply: Appropriate for Pi model (Pi 4: 5V 3A USB-C)
- Coin Acceptor: Standard arcade coin mechanism or pushbutton
- Ball Counter Sensor: Detects balls entering play area
- Scoring Sensors: 7 infrared break-beam sensors
- 5 for 10-point holes
- 2 for 50-point holes
- 1 for lane track (roll-down)
- Wiring: Breadboard, jumper wires, pull-up resistors (if not built into sensors)
- TM1637 Display: 4-digit 7-segment display for on-machine score display
- Raspberry Pi Pico: For multi-lane setups (one per lane)
- USB Cables: For Pi Pico โ Pi 4 communication
- Relay Modules: For solenoid control (ball release) and LED power management
Coin Input: GPIO 2
Ball Counter: GPIO 3
Score 10 (5x): GPIO 4, 5, 6, 7, 8
Score 50 (2x): GPIO 9, 10
Lane Track: GPIO 11
Solenoid Relay: GPIO 10 (output)
LED Power Relay: GPIO 26 (output)
The skeeball system is integrated into Arcade Tracker. Dependencies are installed automatically:
source venv/bin/activate
pip install -r requirements.txt# Start Arcade Tracker
python app.py
# Navigate to simulator
open http://localhost:5000/skeeball/simulator
# Test game logic by clicking buttons:
# - Insert Coin โ Start Game
# - Score buttons โ Simulate scoring
# - Watch game state and revenue tracking- Wire sensors to GPIO pins (see pin assignments above)
- Configure settings in
/skeeball/control - Test sensors at
/skeeball/gpio-test- Monitor real-time pin states
- Trigger each sensor to verify connections
- Check debounce behavior
- Launch games from
/skeeball/control
See DEPLOYMENT_CHECKLIST.md for comprehensive deployment instructions including:
- Sensor wiring diagrams
- Pi Pico firmware setup (multi-lane)
- Production configuration
- Troubleshooting guide
- Per-Game Revenue: Each coin insertion tracked with timestamp
- Daily Reconciliation: Automated daily sync at midnight
- Database Integration: Revenue stored in Arcade Tracker's play_records table
- Statistics Dashboard: Real-time revenue analytics per lane
- CSV Export: Revenue data exportable with all other game data
- Live Game State Tracking: Control panel displays current score, balls remaining, and active game status
- File-Based State Sharing: Raspberry Pi writes game state to JSON file every second
- Stats API Server: Flask API on Pi (port 5002) serves real-time data to main application
- Fast Polling: Control panel updates every 0.5 seconds, statistics every 1 second
- Seamless Integration: Works with existing
skeeball_main.pywithout GPIO conflicts
Data Flow:
Hardware (GPIO sensors) โ skeeball_main.py โ skeeball_state.json
โ state_sync.py (watches file) โ realtime_state.json
โ stats_api_server.py (HTTP API) โ Flask app โ Web UI
- Player inserts coin โ Revenue logged to lane controller
- Game completes โ Final score and revenue stored
- Daily scheduler (midnight) โ Sync all lane revenue to database
- Arcade Tracker reports โ Include skeeball revenue in analytics
All configuration is done via Python config files:
config.py: GPIO pin assignments, point values, game parameters.env.skeeball: Environment-specific settings (production vs development)- Web Interface: Runtime configuration via control panel
Comprehensive documentation included:
SKEEBALL_INTEGRATION_SUMMARY.md: Integration overview and verificationDEPLOYMENT_CHECKLIST.md: Step-by-step production deploymentFLASK_INTEGRATION.md: Technical integration detailsMULTI_LANE_ARCHITECTURE.md: Multi-lane system architectureGPIO_TESTING_README.md: Hardware testing and troubleshootingSKEEBALL_TROUBLESHOOTING.md: Common issues and solutions
All skeeball features protected by:
- Flask-Login: Authentication required for all endpoints
- CSRF Protection: All forms secured via Flask-WTF
- Role-Based Access: Same permission model as main Arcade Tracker
- API Authentication: All API endpoints require valid session
- Arcade Operators: Automated revenue tracking without manual coin counting
- Family Entertainment Centers: Multi-lane management from single interface
- Developers: Test game logic with simulator before hardware deployment
- Technicians: Hardware diagnostics and sensor testing tools
- Managers: Real-time performance analytics and revenue reports
- Click "Add Game" in the navigation
- Fill in the game details (only name is required)
- Set the status: Active, Maintenance, or Storage
- From the dashboard or games list, click "Record Plays" for any game
- Enter the number of plays you read from the machine
- Set the date (defaults to today)
- Add any notes if needed
- Click "Reports" to see:
- Top 10 games by total plays
- Daily play counts for the last 30 days
- Summary statistics
The app uses SQLite database stored in arcade.db. Your data is stored locally and persists between sessions.
This basic version can be extended with:
- Revenue tracking: Add coin/revenue data per play session
- Maintenance logs: Track repairs and maintenance activities
- Photo uploads: Add images of games
- Export data: CSV/Excel export functionality
- User accounts: Multi-user support with different access levels
- Mobile app: Responsive design or native mobile app
- Backup system: Automated data backups
- Advanced reports: Charts, graphs, and trend analysis
- โ Complete game inventory management with location tracking
- โ Revenue and play tracking with automatic calculations
- โ Advanced maintenance system with timestamped work logs
- โ Inventory management with low stock alerts
- โ Role-based access control (readonly, operator, manager, admin)
- โ Professional PDF reports and CSV exports
- โ Database backup and restore with encryption
- โ Automated daily backups with cron job setup
- โ Real-time skeeball integration with live scoring
- โ Responsive cyberpunk-themed UI
New in 1.0! Set up automated daily backups at 2 AM:
./scripts/setup_daily_backup.sh- Backs up database automatically every day
- Removes backups older than 30 days
- Logs all activity to
logs/backup.log
New in 1.0! Live game state updates:
- Control panel updates every 0.5 seconds showing current score, balls remaining, game status
- Statistics page updates every 1 second with cumulative totals and best scores
- State synchronization from Raspberry Pi hardware to web interface
- No page refresh needed - see scores update as you play!
- Monthly Top 5/Top 10 Rankings: Automatic monthly updates on the 1st of each month
- Historical Performance Counters: Track how many times games rank in top 5 and top 10
- Previous Month Revenue: Rankings based on prior month's total revenue
- Smart Update Logic: Updates at most once per calendar month, preventing double-counting
- Revenue Overview: Total 30-day revenue with Top 5 and Bottom 3 games at a glance
- Inventory Status: Real-time low stock alerts and pending request tracking
- Maintenance Dashboard: Active work orders with priority and status indicators
- Actionable Insights: Quick links to games, orders, and inventory items
- Multi-Photo Upload Fix: Resolved duplicate file input causing upload issues
- 30-Day Login Persistence: Fixed "Remember Me" functionality for extended sessions
- Clean Interface: Removed all emoji characters for consistent cross-platform rendering
- Database Migration: Added last_ranking_update field for tracking monthly updates
- New WorkLog Database Table: Stores individual work entries with timestamps
- Enhanced Update Process: Each update creates new work entry instead of overwriting
- Complete Audit Trail: Full history of who did what work and when
- Visual Timeline Interface: Professional timeline view of all work performed
- Consistent Button Styling: Maintenance tables now match games table formatting
- Smaller, Organized Buttons: Professional compact button layout
- Enhanced Visual Hierarchy: Better organization of information
- PDF Format Fixes: Eliminated text cutoff issues with proper column sizing
- Work History Integration: Reports now include actual work performed
- Professional Layout: Improved fonts, spacing, and organization
- CSRF Protection: All forms now properly secured
- Database Optimization: Efficient queries and relationships
- User Role Management: Hierarchical permission system
- games: Game inventory and statistics
- play_records: Revenue and play tracking
- maintenance_records: Work order management
- work_logs: ๐ Individual work entries with timestamps
- users: User management and authentication
- Backend: Flask, SQLAlchemy, Flask-Login
- Frontend: Jinja2 templates with custom CSS
- Security: Flask-WTF with CSRF protection
- Reports: ReportLab for PDF generation
- Charts: Chart.js for analytics visualization
arcade-tracker/
โโโ app.py # Main application
โโโ requirements.txt # Python dependencies
โโโ run.sh # Startup script
โโโ arcade.db # SQLite database (created on first run)
โโโ templates/ # HTML templates
โ โโโ base.html
โ โโโ index.html
โ โโโ games.html
โ โโโ add_game.html
โ โโโ game_detail.html
โ โโโ record_plays.html
โ โโโ reports.html
โโโ README.md # This file
- Track which games make the most money
- Monitor maintenance costs and frequency
- Document detailed repair work with timestamps
- Generate reports for business decisions
- Log detailed work entries with time tracking
- Record parts used and costs per work session
- Build comprehensive work history for each machine
- Track repair trends and recurring issues
- View complete maintenance audit trails
- Analyze repair costs and technician productivity
- Export professional reports with work details
- Make data-driven decisions about game lifecycle
If upgrading from an older version, run:
python create_work_log_table.pyThis will add the new WorkLog table for timestamped work entries.
- First Time Setup: Navigate to the setup page to create your admin account
- Add Games: Start by adding your arcade games to the inventory
- Create Users: Set up accounts for technicians and operators
- Start Tracking: Begin logging plays and maintenance work!
โ Complete Game Inventory Management โ Revenue & Play Tracking with Analytics โ Professional Work Order System โ Timestamped Work Logging with Audit Trail โ Visual Work Timeline Interface โ Role-based User Management โ Professional PDF Reports โ Secure CSRF-Protected Forms โ Database Backup & Restore
๐ฎ Keep your arcade running smoothly with comprehensive tracking and professional work documentation! ๐ง