Skip to content

Davidcode-png/QuizBlitz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuizBlitz ⚡

A real-time multiplayer quiz platform built with React, FastAPI, and WebSockets

Demo Screen shots Demo Screen shots Demo Screen shots Demo Screen shots Demo Screen shots

🚀 Quick Start

Prerequisites

  • Node.js 16+ & npm
  • Python 3.10+
  • MongoDB
  • Redis
  • React.js (Client)

🛠️ Installation

Backend Setup

cd server
python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate    # Windows
pip install -r requirements.txt

# Create environment file
echo "MONGO_CONNECTION_STRING=mongodb+srv://<user>:<password>@cluster0.lerychw.mongodb.net/" > app/.env

Frontend Setup

cd client
npm install

⚙️ Configuration

Update API endpoints in:

  • client/src/hostScreen.jsx
  • client/src/playerScreen.jsx
  • client/src/joinScreen.jsx

Replace localhost:8000 with your server URL if needed

🏃 Running the Application

  1. Start Redis
redis-server
  1. Launch Backend
cd server
uvicorn app.main:app --reload
  1. Start Frontend
cd client
npm start

Host Experience

  1. Create new game from Host Dashboard
  2. Share 6-digit game PIN with players
  3. Control quiz flow (start/next question)
  4. Monitor live leaderboard

Player Experience

  1. Join with game PIN & nickname
  2. Answer questions in real-time
  3. Receive instant feedback
  4. Track position on live leaderboard

✨ Key Features

  • Real-time WebSocket communication
  • Auto-reconnect functionality
  • Animated score updates
  • Redis-backed connection management
  • MongoDB game state persistence
  • Responsive UI with progress indicators

📌 Important Notes

  1. Keep both server and client running simultaneously
  2. Default API runs on port 8000, client on 3000
  3. Requires active MongoDB and Redis instances
  4. Demo quiz data in server/app/services/default_quiz.json

About

An interactive quiz platform developed with FastAPI and React, inspired by Kahoot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published