QuizApp is a full-stack, real-time quiz platform similar to Kahoot. It allows admins to create custom quizzes with images and various question types, and participants to join and compete in real-time from their mobile devices.
- Real-time Gameplay: Powered by native WebSockets for instant interaction.
- Admin Dashboard: Create, edit, and manage quizzes.
- Multiple Question Types:
- Multiple Choice
- True/False
- Text Entry (with case-insensitive matching against multiple correct answers)
- Image Support: Upload images to supplement your questions.
- Scoring System:
- 50 points for a correct answer.
- Up to 500 bonus points based on response speed (decaying linearly).
- Session Persistence: Participants and admins can rejoin active sessions if they refresh or disconnect.
- Master View: Large-screen display with QR code lobby, live leaderboards, and a final podium.
- Dockerized: Single-command setup for the entire stack.
- Frontend: React, Vite, Tailwind CSS, Lucide React
- Backend: Node.js, Express, Native WebSockets
- Database: MongoDB
- Containerization: Docker, Docker Compose
-
Clone the repository:
git clone <repository-url> cd quizapp
-
Run the application using Docker Compose:
docker compose up --build
-
Access the application:
- Main App/Join Page: http://localhost:5000
- Admin Login: http://localhost:5000/login
The system automatically creates a default admin account on the first startup:
- Username:
admin - Password:
password123
- Log in to the Admin Dashboard.
- Click "Create Quiz".
- Give your quiz a Title and Description.
- Add questions:
- Choose the Type (Multiple Choice, True/False, or Text Entry).
- Enter the Question Text.
- (Optional) Upload an Image.
- Set the Correct Answer(s).
- Adjust the Time Limit (seconds).
- Click "Save Quiz".
- In the Admin Dashboard, find your quiz and click "Start".
- This opens the Master View.
- Display this screen on a large monitor or projector.
- Participants can scan the QR Code displayed on the Master View or go to
http://localhost:5000/joinand enter the Game PIN. - Once they enter a nickname, their name will appear on the Master View lobby.
- Once all players have joined, the Admin clicks "START" on the Master View.
- The question will appear on the big screen and the participants' devices.
- After the time limit expires (or all participants answer), the correct answer and current leaderboard are shown.
- Click "Next" to proceed to the next question.
- After the final question, the Podium will display the Top 3 winners.
If you wish to run the project locally without Docker:
cd backendnpm install- Create a
.envfile (seebackend/.env.exampleif available, or setMONGODB_URI,JWT_SECRET,PORT). npm start
cd frontendnpm installnpm run dev