---> MADE WITH CURSOR !!!
A real-time multiplayer guessing game built with Next.js, Socket.io, and shadcn/ui. Players take turns asking yes/no questions and eliminating options to guess their secret assignments.
- 🤖 For AI Agents: Start with AI_AGENT_HANDOFF.md - specifically designed for agent continuation
- 👨💻 For Developers: Read PROJECT_CONTEXT.md → Then DEVELOPMENT.md
- ⚡ Need Quick Reference?: Check QUICK_REFERENCE.md for code examples
- 📖 All Documentation: See DOCS_INDEX.md for complete guide to all docs
- 👥 For Players/Users: Continue reading below ↓
- 🎮 Real-time Multiplayer: Play with friends using WebSocket connections
- 🎨 Modern UI: Beautiful interface built with shadcn/ui components
- 🎯 Turn-based Gameplay: Take turns asking questions and eliminating options
- 👥 Lobby System: Create or join rooms with room codes
- 🎲 Custom Options: Add your own list of items to guess (TV shows, movies, characters, etc.)
- 🏆 Admin Controls: Room creator has admin privileges to start the game
- Create a Room: One player creates a room and adds a list of options (e.g., TV series names)
- Join the Lobby: Other players join using the room code
- Secret Assignment: Each player is secretly assigned one option
- Ask Questions: Take turns asking yes/no questions about the options
- Eliminate: After each question, all players can eliminate options based on the answer
- Win: The last remaining option wins!
- Node.js 18+ installed
- npm or yarn package manager
- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser
├── app/
│ ├── page.tsx # Home page (create/join room)
│ ├── lobby/[roomId]/ # Lobby waiting room
│ └── game/[roomId]/ # Active game page
├── components/ui/ # shadcn/ui components
├── lib/
│ ├── socket.ts # Socket.io client
│ ├── store.ts # Zustand state management
│ └── utils.ts # Utility functions
├── types/
│ └── game.ts # TypeScript type definitions
└── server.mjs # Custom Next.js server with Socket.io
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Real-time: Socket.io
- State Management: Zustand
- Each player is secretly assigned one option from the list
- Players take turns in round-robin fashion
- On your turn, ask a yes/no question about the options
- After the question, all players can eliminate options
- Continue until only one option remains
- The player with that secret option wins!
- TV Series: Game of Thrones, The Office, Breaking Bad, Stranger Things
- Movies: The Matrix, Inception, Pulp Fiction, The Godfather
- Characters: Harry Potter, Sherlock Holmes, Batman, Wonder Woman
- Countries: Japan, Brazil, Egypt, Australia
- Animals: Lion, Penguin, Elephant, Dolphin
To build for production:
npm run build
npm startMIT License - feel free to use this project for learning or personal use!
├── app/
│ ├── page.tsx # Home page (create/join room)
│ ├── lobby/[roomId]/ # Lobby waiting room
│ └── game/[roomId]/ # Active game page
├── components/ui/ # shadcn/ui components
├── lib/
│ ├── socket.ts # Socket.io client
│ ├── store.ts # Zustand state management
│ └── utils.ts # Utility functions
├── types/
│ └── game.ts # TypeScript type definitions
├── server.mjs # Custom Next.js server with Socket.io
├── README.md # This file (user guide)
└── DEVELOPMENT.md # Technical documentation for developers
Want to extend this project? Check out DEVELOPMENT.md which includes:
- Complete architecture overview
- File-by-file documentation
- Game logic deep dive
- WebSocket communication patterns
- State management strategy
- Testing procedures
- Deployment guides
- Known limitations and improvement ideas
- Code patterns and conventions
This is a prototype project. Feel free to fork and enhance it! See DEVELOPMENT.md for technical context.
Suggested Improvements:
- Chat system for player communication
- Question history display
- Database persistence (PostgreSQL/MongoDB)
- Player reconnection after disconnect
- Mobile touch optimization
- Vote-based elimination system
- Multiple game modes
- Sound effects and animations