Oscar prediction game for friends. Players pick nominees before the ceremony, then watch a live leaderboard update as winners are announced.
- Bun v1.3+
# Install dependencies
bun install
# Copy environment config
cp .env.example .env
# Edit .env — set JWT_SECRET and ADMIN_PIN at minimum# Start both server and web dev server
bun run devThis starts:
- Vite dev server at
http://localhost:5173(frontend) - Hono API server at
http://localhost:3000(backend + WebSocket)
Vite proxies /api and /socket.io requests to the backend automatically.
# Server only (watches for changes)
cd packages/server && bun dev
# Frontend only
cd packages/web && bun devThe database is SQLite (file-based, no external dependency). Migrations are managed by Drizzle Kit.
# Generate a new migration after schema changes
cd packages/server && bun db:generate
# Apply migrations (happens automatically on server start via createDb)
cd packages/server && bun db:migrate
# Browse the database
cd packages/server && bun db:studioMigrations run automatically on server startup (via createDb()). The dev database is created at packages/server/bignight.db by default. Set DB_PATH in .env to change the location.
# Run all tests
bun run test
# Run by package
cd packages/shared && bun vitest run
cd packages/server && bun run ./node_modules/.bin/vitest run
cd packages/web && bun vitest run
# Watch mode
cd packages/shared && bun vitestNote: Server tests use bun run ./node_modules/.bin/vitest to ensure Bun runtime (needed for bun:sqlite and Bun.password).
# Build the frontend
bun run build
# Start the production server (serves API + static files)
bun run startIn production, the Hono server serves the Vite build from packages/web/dist/.
- Admin navigates to
/admin, logs in withADMIN_PIN - Admin pastes a Wikipedia Academy Awards URL → Preview → Import
- Admin sets a picks lock time
- Players go to
/, enter name + PIN → redirected to/picks - Players scroll through categories, tap to select predictions
- Picks auto-lock at the configured time
- Admin opens
/admin/liveduring the ceremony - Admin taps nominees to mark winners as they're announced
- Everyone watches
/leaderboardupdate in real-time - Emoji reactions fly across the screen
packages/
├── shared/ # Zod schemas, types, constants, scoring logic
├── server/ # Hono API, Drizzle/SQLite, Socket.io, Wikipedia parser
└── web/ # Vite + React 19 + React Router v7 SPA
| Variable | Description | Default |
|---|---|---|
PORT |
Server port | 3000 |
DB_PATH |
SQLite database file path | bignight.db |
JWT_SECRET |
Secret for signing JWT tokens | bignight-dev-secret-change-in-prod |
ADMIN_PIN |
PIN for admin access | (required) |