factoid-trivia
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v36View latest version
A realtime trivia game themed like a USPS post office, supporting up to 30 concurrent users.
- USPS post office themed design
- Real-time user presence (see who's online)
- Name entry and user management
- Support for up to 30 concurrent players
- NEW: Complete trivia game functionality:
- Fact submission by each player
- Random fact selection for rounds
- Voting system where players guess whose fact it is
- Real-time vote tracking and display
- Answer reveal with vote results
- Scoring system and leaderboard
- Skip functionality for rounds
- Join the Game: Enter your name to join the post office
- Submit a Fact: Share an interesting fact about yourself
- Wait for Others: Game starts when at least 2 players have submitted facts
- Vote on Facts: When a fact is displayed, guess which player it belongs to
- See Results: After voting, reveal answers to see who was correct
- Earn Points: Get 1 point for each correct guess
- Climb the Leaderboard: Track your score against other players
Join Game โ Submit Fact โ Wait for Others โ
Vote on Random Facts โ See Results โ Earn Points โ
Next Round โ Repeat
โโโ backend/
โ โโโ index.ts # Main Hono server with WebSocket support
โ โโโ database/
โ โ โโโ migrations.ts # SQLite schema setup
โ โ โโโ queries.ts # Database query functions
โ โโโ routes/
โ โโโ websocket.ts # WebSocket connection handling
โโโ frontend/
โ โโโ index.html # Main HTML template
โ โโโ index.tsx # React frontend entry point
โ โโโ components/
โ โ โโโ App.tsx # Main app component
โ โ โโโ NameEntry.tsx # Name entry form
โ โ โโโ UserList.tsx # Online users display
โ โโโ style.css # USPS-themed styles
โโโ shared/
โโโ types.ts # Shared TypeScript types
- The backend runs on Hono with WebSocket support for real-time features
- Frontend uses React with WebSocket client for real-time updates
- SQLite stores user sessions and game state
- USPS-themed styling with postal colors and typography
- โ User name entry
- โ Real-time user presence (up to 30 players)
- โ USPS theming
- ๐ง Team knowledge trivia functionality (coming next)