A real-time multiplayer egg timer for board games to measure how long each player takes.
This is a monorepo with three packages:
- frontend/ - Vite + TypeScript web application
- backend/ - Node.js + Express + WebSocket server
- shared/ - Shared TypeScript protocol types
- ✅ Join/leave rooms with real-time presence updates
- ✅ WebSocket-based real-time communication
- ✅ UUID-based player identification (stored in localStorage)
- ✅ Ephemeral in-memory room state
- ✅ Automatic disconnect detection
- ✅ No authentication required
- Node.js >= 20.0.0
- npm >= 10.0.0
npm cinpm run buildnpm run start:backendThe server runs on http://localhost:3000 by default.
# Check linting
npm run lint
# Fix formatting
npm run formatBuild and run using Docker:
# Build the image
docker build -t multiplayer-egg-timer .
# Run the container
docker run -p 3000:3000 multiplayer-egg-timerThe multi-stage Dockerfile builds both frontend and backend into a single optimized image.
A manual workflow is available for building and pushing to GitHub Container Registry:
- Go to Actions tab in GitHub
- Select "Build and Push Docker Image"
- Click "Run workflow"
- Optionally specify a tag (default: latest)
.
├── frontend/ # Vite + TypeScript frontend
│ ├── index.html # Join page
│ ├── lobby.html # Lobby/participants page
│ └── src/
│ ├── index.ts # Join page logic
│ ├── lobby.ts # Lobby page logic
│ └── styles.css # Shared styles
├── backend/ # Express + WebSocket backend
│ └── src/
│ └── server.ts # Main server with room management
├── shared/ # Shared protocol types
│ └── src/
│ └── protocol.ts # WebSocket message types
├── Dockerfile # Multi-stage build
└── .github/
└── workflows/
└── docker-manual.yml # Manual CI workflow
- Navigate to
http://localhost:3000 - Enter your name and a room ID
- Click "Join Room"
- Share the room ID with other players
- See participants join and leave in real-time
In Browser:
- Open the browser's developer console (F12)
- Version information is automatically logged on page load with:
- Git SHA and branch
- Build timestamp
- Backend version comparison