• Blog
  • Docs
  • Pricing
  • Weโ€™re hiring!
Log inSign up
bmitchinson

bmitchinson

factoid-trivia

Public
Like
factoid-trivia
Home
Code
4
backend
3
frontend
4
shared
1
README.md
Environment variables
Branches
2
Pull requests
Remixes
History
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: v26
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)
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
AboutAlternativesPricingBlogNewsletterCareers
Weโ€™re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
ยฉ 2026 Val Town, Inc.