FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
bmitchinson
bmitchinsonfactoid-trivia
Public
Like
factoid-trivia
Home
Code
4
backend
3
frontend
4
shared
1
README.md
Branches
2
Pull requests
Remixes
History
Environment variables
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/13/2025
Viewing readonly version of main branch: v28
View latest version
README.md

USPS Trivia Game

A realtime trivia game themed like a USPS post office, supporting up to 30 concurrent users.

Features

  • 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
  • Prepared for team knowledge trivia functionality

Project Structure

├── 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

Getting Started

  1. The backend runs on Hono with WebSocket support for real-time features
  2. Frontend uses React with WebSocket client for real-time updates
  3. SQLite stores user sessions and game state
  4. USPS-themed styling with postal colors and typography

Current Status

  • ✅ User name entry
  • ✅ Real-time user presence (up to 30 players)
  • ✅ USPS theming
  • 🚧 Team knowledge trivia functionality (coming next)
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.