A real-time sports trivia platform that allows organizers to host interactive betting games during sporting events. Players can join rooms, place strategic bets on live events, and compete on a dynamic leaderboard.
QuickPicks Trivia enables organizers (bars, venues, or individuals) to create interactive trivia rooms for sports games. As events unfold during the game, players receive "Quick Pick" opportunities - time-limited betting events where they can wager points based on predicted outcomes. The scoring system rewards correct predictions with points proportional to the event's probability, creating strategic gameplay where players must balance risk and reward.
- Real-time Multiplayer: WebSocket-powered live gameplay with instant updates
- Strategic Wagering: Point-based betting system with risk/reward calculations
- Dynamic Leaderboards: Live score tracking and rankings
- Room-based Games: Multiple concurrent games with unique room codes
- Mobile-friendly: Responsive React Native Web interface
- Host Controls: Dedicated dashboard for game organizers
arena/
├── backend/ # FastAPI WebSocket server
│ ├── main.py # Main application entry point
│ ├── models.py # Pydantic data models
│ ├── game_data.py # Hardcoded game events and data
│ └── requirements.txt # Python dependencies
├── frontend/ # React Native Web client
│ ├── src/
│ │ ├── screens/ # Application screens
│ │ ├── components/ # Reusable components
│ │ ├── services/ # API communication
│ │ └── router/ # Navigation routing
│ └── package.json # Node.js dependencies
└── event_detection/ # Future: Live event detection
- FastAPI: High-performance Python web framework
- WebSocket: Real-time bidirectional communication
- Pydantic: Data validation and serialization
- Uvicorn: ASGI web server
- In-memory Storage: Dictionary-based game state management
- React Native for Web: Cross-platform UI framework
- React Native Paper: Material Design component library
- TypeScript: Type-safe JavaScript development
- React Router: Client-side navigation
- WebSocket Client: Real-time server communication
- Theme: Purple and dark grey color scheme (PrizePicks-inspired)
- Responsive Design: Mobile-first approach
- Component Library: React Native Paper for consistent UI
- Organizer creates a room with:
- Room name (venue/location)
- Game name (e.g., "Lions vs Ravens @ 7pm")
- Host name identification
- Players join using room ID or browse available rooms
- Enter display name (no authentication required)
- Wait in lobby until host starts the game
- Receive real-time event notifications
- Place bets within time windows
- View live leaderboard updates
- See final rankings at game end
Each Quick Pick event includes:
- Question/Scenario: What players are betting on
- Answer Choices: 2-4 possible outcomes
- Odds: Probability-based scoring multipliers
- Timer: Limited response window
- Resolution: Automated outcome determination
- Players start with base points
- Wager amount calculated based on total events
- Correct answers earn points based on probability
- Incorrect answers lose wagered points
- Lower probability events offer higher rewards
- Python 3.8 or higher
- Node.js 16 or higher
- npm or yarn package manager
-
Navigate to the backend directory:
cd arena/backend -
Install Python dependencies:
pip install -r requirements.txt
-
Start the FastAPI server:
python main.py
The backend will run on http://localhost:8000
-
Navigate to the frontend directory:
cd arena/frontend -
Install Node.js dependencies:
npm install
-
Start the development server:
npm run start
The frontend will run on http://localhost:3000
For external access during development:
-
Install ngrok globally:
npm install -g ngrok
-
Expose the backend (in a new terminal):
ngrok http 8000
-
Expose the frontend (in another terminal):
ngrok http 3000
-
Use the provided ngrok URLs to access the application remotely
GET /- Health checkGET /games- List available gamesPOST /create-game- Create new roomGET /room/{room_id}- Get room informationPOST /admin/start-demo/{room_id}- Admin game control
WS /ws/{room_id}- Real-time game communication
JOIN_ROOM- Player joins roomSTART_GAME- Host initiates gameNEW_EVENT- New question broadcastSUBMIT_ANSWER- Player submits betANSWERS_CLOSED- Betting window closedEVENT_RESOLVED- Results and scoringROOM_UPDATE- General room state changesGAME_ENDED- Final results
- Room: Game container with players and events
- Player: Individual participant with score and bets
- Event: Individual betting opportunity
- GameState: Complete room state management
- WebSocketMessage: Real-time communication format
WAITING- Room created, accepting playersIN_PROGRESS- Game active, events occurringCOMPLETED- All events finished, final scores
- Hardcoded Events: Pre-defined question set for demo
- No Authentication: Name-based player identification
- In-Memory Storage: No persistent database
- Single Game Type: "Lions vs Ravens" demo only
- Manual Event Triggers: No live sports data integration
game_data.py- Centralized event and game definitions- Easy modification of questions, timers, and scoring
- Probability-based point calculations
- Extensible for future game types
- Create a room as host
- Join as multiple players (different browsers/devices)
- Start game from host dashboard
- Place bets during event windows
- Observe real-time scoring and leaderboards
- Verify final results
- Manual game start endpoint
- Room state inspection
- Event timing controls
- Debug logging throughout
- Real-time event detection from sports APIs
- Automated question generation
- Dynamic probability calculations
- Multiple concurrent games
- User authentication and profiles
- Persistent game history
- Advanced analytics dashboard
- Custom event creation tools
- Mobile native applications
- Database integration (PostgreSQL/MongoDB)
- Redis for session management
- Horizontal scaling architecture
- Cloud deployment configurations
This project was built for HackGT 12. For development:
- Fork the repository
- Create feature branches for new functionality
- Test thoroughly with multiple concurrent users
- Submit pull requests with clear descriptions
Real-time communication is essential for synchronized gameplay. The WebSocket architecture ensures all players see events and results simultaneously.
Enables rapid development with mobile-ready components while maintaining web compatibility.
Simplifies development and reduces infrastructure requirements for hackathon timeline.
Creates strategic depth where players must evaluate risk vs reward for each betting opportunity.
This project is developed for educational and hackathon purposes.