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)