A live, interactive Jeopardy game built with Laravel 12, Livewire 3 with Flux UI, and Tailwind CSS 4 - designed for Laravel Live Denmark and other live events.
- Real-time Game Board: Interactive Jeopardy board with categories and clues
- WebSocket Buzzer System: Hardware buzzer integration via Raspberry Pi (using Pinout package)
- Team Management: Multiple teams with real-time score tracking
- Special Features:
- Daily Double clues with wagering
- Lightning Round for rapid-fire questions
- Timer system with automatic timeouts
- Sound effects for enhanced gameplay (correct/incorrect answers, countdown timer)
- Game State Recovery: Persistent game state with full recovery capabilities
- Admin Controls: Host interface for managing gameplay
- Real-time Broadcasting: Laravel Reverb for WebSocket connections
- Volunteer Picker: Random volunteer selection from attendee list
- PHP 8.2 or higher
- Node.js 18+ and npm
- Composer
- SQLite (or MySQL/PostgreSQL)
-
Clone the repository
git clone https://github.com/geocodio/laravel-jeopardy.git cd laravel-jeopardy
-
Install PHP dependencies
composer install
-
Install Node dependencies
npm install
-
Environment setup
cp .env.example .env php artisan key:generate
-
Database setup
touch database/database.sqlite php artisan migrate --seed
-
Start development server
composer run dev
This command starts:
- Laravel server on
http://0.0.0.0:8000
- Vite dev server for hot module replacement
- Queue worker for background jobs
- Pail for real-time log monitoring
- Reverb WebSocket server for real-time events
- Laravel server on
- Navigate to the admin dashboard
- Create teams and assign buzzers
- Configure categories and clues
- Start the game session
The game supports hardware buzzers via Raspberry Pi using the Pinout package.
To set up the buzzer system:
- Connect buzzers to GPIO pins (see
app/Console/Commands/BuzzerServer.php
for pin configuration) - Run the buzzer server:
php artisan buzzer-server
- The buzzer server sends events to
/api/buzzer
when buttons are pressed
- Backend: Laravel 12 with Livewire 3
- UI Components: Flux UI 2 (Livewire component library)
- Frontend: Tailwind CSS 4, Alpine.js (included with Livewire)
- Real-time: Laravel Reverb for WebSocket connections
- Database: SQLite (default), MySQL/PostgreSQL supported
- Testing: Pest PHP 3
- Asset Bundling: Vite 7
- Hardware Integration: Pinout package for GPIO control
laravel-jeopardy/
├── app/
│ ├── Livewire/ # Livewire components
│ ├── Models/ # Eloquent models
│ ├── Services/ # Business logic services
│ └── Events/ # Broadcasting events
├── resources/
│ ├── views/
│ │ ├── livewire/ # Livewire component views
│ │ └── flux/ # Custom Flux UI components
│ ├── css/ # Stylesheets
│ └── js/ # JavaScript files
├── database/
│ ├── migrations/ # Database migrations
│ └── seeders/ # Database seeders
├── public/
│ └── sounds/ # Game sound effects
│ └── buzzer/ # Team-specific buzzer sounds
└── tests/ # Test files
- GameBoard: Main game controller and UI
- ClueDisplay: Modal for displaying questions
- TeamScoreboard: Real-time score tracking
- BuzzerListener: WebSocket event handler
- LightningRound: Speed round implementation
- HostControl: Admin interface for game management
- Leaderboard: Display team standings
- VolunteerPicker: Random attendee selection
Run the test suite:
# Run all tests
composer test
# Run specific test
php artisan test tests/Feature/GameBoardTest.php
# With coverage
php artisan test --coverage
Format code with Laravel Pint:
./vendor/bin/pint
# Development
composer run dev # Start all dev services
php artisan serve # Laravel server only
npm run dev # Vite dev server only
php artisan queue:listen # Queue worker
php artisan pail # Real-time logs
# Building
npm run build # Build frontend assets
php artisan optimize # Cache for production
# Database
php artisan migrate # Run migrations
php artisan migrate:fresh --seed # Fresh install with data
GET /api/buzzer
Query Parameters:
- pin_id: The GPIO pin index of the pressed buzzer
Receives buzzer events from the hardware buzzer server running on the Raspberry Pi.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is open-sourced software licensed under the MIT license.
- Built for Laravel Live Denmark
- Inspired by the classic Jeopardy game show
Made with ❤️ by Laravel Denmark