Create quiz rooms on any topic • AI generates unique questions instantly • Battle friends in real-time
| Feature | Description |
|---|---|
| 🤖 AI Question Generation | Powered by Llama 3.1 via Hugging Face - generates unique quiz questions on any topic |
| ⚡ Real-Time Multiplayer | Up to 4 players can compete simultaneously with live score updates |
| 🎯 Any Topic | Enter any topic and get instant quiz questions - unlimited possibilities |
| 🏆 Speed Scoring | Faster answers = higher multipliers (2x, 1.5x, 1x, 0.5x) |
| 📱 QR Code Sharing | Share room codes via QR or direct link for easy joining |
| 🎨 Beautiful UI | Modern glassmorphic design with smooth animations |
| 🔒 No Account Needed | Jump straight into the action - no signup required |
- Node.js 18+
- npm or yarn
- Hugging Face API Token (Get one here)
-
Clone the repository
git clone https://github.com/Abhishekmishra2808/quiz.git cd quiz -
Install frontend dependencies
npm install
-
Install server dependencies
cd server npm install -
Set up environment variables
Create
server/.env:HF_TOKEN=your_huggingface_token_here PORT=3001
-
Start the server
cd server node index.js -
Start the frontend (in a new terminal)
npm run dev
-
Open your browser
http://localhost:5173
- Create a Room - Enter your name and click "Create Room"
- Share the Code - Share the 6-character room code or QR with friends
- Choose a Topic - The host enters any topic (e.g., "Space Exploration", "90s Movies")
- Start the Quiz - AI generates 5 unique questions instantly
- Answer Fast! - You have 10 seconds per question. Faster = more points!
- Win! - Highest score at the end wins 🏆
| Response Time | Multiplier |
|---|---|
| 0-2 seconds | 2x 🟢 |
| 2-5 seconds | 1.5x 🟡 |
| 5-9 seconds | 1x 🟠 |
| 9-10 seconds | 0.5x 🔴 |
- React 18 - UI framework
- Vite - Build tool & dev server
- TailwindCSS - Utility-first styling
- Socket.io Client - Real-time communication
- Lucide React - Beautiful icons
- Canvas Confetti - Winner celebrations 🎉
- Node.js - Runtime environment
- Express - Web framework
- Socket.io - WebSocket server
- Hugging Face API - AI question generation (Llama 3.1)
quizora/
├── public/
│ └── Quizora.png # Logo
├── server/
│ ├── index.js # Express + Socket.io server
│ ├── package.json
│ └── .env # HF_TOKEN (not committed)
├── src/
│ ├── App.jsx # Main React component
│ ├── socket.js # Socket.io client
│ ├── index.css # Global styles + Tailwind
│ └── main.jsx # React entry point
├── index.html
├── tailwind.config.js
├── vite.config.js
└── package.json
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
Abhishek Mishra
- GitHub: @Abhishekmishra2808
Made with ❤️ and lots of ☕
⭐ Star this repo if you found it helpful!