A real-time multiplayer guessing game built with Next.js where teams compete to guess character names within a time limit.
- Real-time multiplayer gameplay
- Automatic team balancing
- Admin-controlled game flow
- Mobile-friendly interface
- Server-Sent Events for live updates
- Lightweight SQLite database
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open your browser: Navigate to http://localhost:3000
- Click "Create New Game" on the home page
- Enter your name and configure:
- Number of characters per player (3-10)
- Turn duration in seconds (30-120)
- Share the generated join code with other players
- Wait for players to join and submit their characters
- Click "Start Game" when everyone is ready
- Control the game flow on your device:
- Read Character → Start → Tap screen to guess → Next Turn
- Click "Join Game" and enter the join code
- Enter your display name
- Submit your character names (famous people, fictional characters, etc.)
- Wait for all players to submit
- Watch the game unfold on your device!
- Players are randomly divided into two teams
- Teams take turns guessing characters
- During each turn:
- A character name is revealed
- The active player has a set time to make their team guess it
- Each correct guess awards 1 point
- Tap the screen to move to the next character
- The round ends when all characters have been played
- The team with the most points wins!
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Database: SQLite (via @libsql/client)
- Real-time: Server-Sent Events (SSE)
littlepapers/
├── app/ # Next.js app directory
│ ├── admin/create/ # Game creation page
│ ├── join/[joinCode]/ # Player join page
│ ├── lobby/[gameId]/ # Lobby & character submission
│ ├── game/[gameId]/ # Main gameplay screen
│ ├── results/[gameId]/ # Final scores
│ └── api/ # API routes
├── lib/ # Utilities and helpers
│ ├── db.ts # Database setup
│ ├── types.ts # TypeScript types
│ ├── game-helpers.ts # Game logic
│ └── event-emitter.ts # SSE events
└── claude.md # Detailed documentation
For detailed architecture and specifications, see claude.md
# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run linter
npm run lintCreate a .env.local file:
# Database URL (defaults to local SQLite file)
DATABASE_URL=file:local.db
# App URL
NEXT_PUBLIC_APP_URL=http://localhost:3000The application uses SQLite by default with a local local.db file. For production, you can use Turso by setting the DATABASE_URL environment variable.
- Push your code to GitHub
- Import the project to Vercel
- Set up environment variables
- Deploy!
Note: For production, consider using Turso for the database instead of local SQLite.
- Open multiple browser windows or devices on the same network
- Create a game in one window (admin)
- Join from other windows using the join code
- Play the game!
This project was created as a demonstration. Feel free to fork and modify for your own use!
MIT License - Feel free to use this project for educational or personal purposes.
For detailed documentation and architecture information, refer to claude.md.