A comprehensive quiz gamification platform that transforms learning into an engaging, competitive experience. Built with React, Firebase, and AI-powered features to create, manage, and participate in interactive quizzes.
- Secure Authentication: Email/password login and registration
- User Profiles: Personalized user accounts with progress tracking
- Profile Management: Display names, avatars, and account settings
- Real-time Statistics: Dynamic XP tracking, quiz completion counts, and performance metrics
- Weekly Progress: Percentage changes and weekly quiz completion tracking
- Performance Charts: Visual representation of quiz performance over time
- Personalized Suggestions: AI-driven recommendations based on user performance
- Manual Quiz Creation: Create custom quizzes with multiple-choice questions
- AI-Powered PDF Generation: Upload PDF documents and automatically generate quizzes using AI
- Edit & Delete: Full CRUD operations for quiz questions before publishing
- Rich Question Editor: Support for multiple-choice questions with correct answer marking
- Category & Difficulty: Organize quizzes by subject and difficulty level
- Interactive Quiz Interface: Smooth, engaging quiz-taking experience
- Real-time Scoring: Immediate feedback and score calculation
- XP & Leveling System: Earn experience points and level up
- Performance Tracking: Detailed analytics for each quiz attempt
- Timer Support: Optional time limits for competitive quizzing
- XP System: Earn experience points for quiz completion and performance
- Level Progression: User levels based on accumulated XP
- Badge System: Achievement badges for various milestones
- Leaderboards: Competitive rankings based on performance
- Streak Tracking: Maintain quiz completion streaks
- Performance History: Track quiz performance over time
- Weekly Statistics: Dynamic weekly progress indicators
- Rank Tracking: Monitor position changes in global rankings
- Detailed Metrics: Comprehensive analytics dashboard
- Intelligent Chatbot: AI-powered assistant for quiz help and guidance
- Contextual Support: Personalized assistance based on user progress
- Learning Recommendations: AI-driven suggestions for improvement
- Mobile-First: Optimized for all device sizes
- Touch-Friendly: Enhanced mobile interactions
- Cross-Platform: Consistent experience across devices
- Real-time Database: Firebase Firestore for instant data synchronization
- File Upload: PDF processing for AI quiz generation
- Security: Secure authentication and data protection
- Performance: Optimized loading and caching
- Error Handling: Comprehensive error management
- React 18: Modern React with hooks and functional components
- React Router: Client-side routing for SPA navigation
- Tailwind CSS: Utility-first CSS framework for styling
- FontAwesome: Icon library for UI elements
- Firebase Authentication: Secure user authentication
- Firebase Firestore: NoSQL database for real-time data
- Node.js Backend: Express server for AI processing
- AI Integration: PDF processing and quiz generation
- Vite: Fast build tool and development server
- ESLint: Code linting and formatting
- Git: Version control
- Node.js (v16 or higher)
- npm or yarn package manager
- Firebase account
- Git
-
Clone the Repository
git clone https://github.com/shkhfzn9/QuizGamifiAi.git cd QuizGamifiAi -
Install Dependencies
# Install frontend dependencies cd QuizGamification npm install # Install backend dependencies (if applicable) cd ../backend npm install
-
Firebase Setup
a. Create a new Firebase project at Firebase Console
b. Enable Authentication with Email/Password provider
c. Create a Firestore database
d. Get your Firebase configuration and create
.envfile:# In QuizGamification folder cp .env.example .enve. Add your Firebase configuration to
.env:VITE_FIREBASE_API_KEY=your_api_key VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id VITE_FIREBASE_APP_ID=your_app_id
-
Backend Setup (for AI features)
# In backend folder npm install # Add your OpenAI API key to backend .env OPENAI_API_KEY=your_openai_api_key PORT=5000
-
Start Development Servers
# Start backend server (Terminal 1) cd backend npm start # Start frontend development server (Terminal 2) cd QuizGamification npm run dev
-
Access the Application
- Frontend:
http://localhost:5173 - Backend:
http://localhost:5000
- Frontend:
The application uses the following Firestore collections:
/users/{userId}
- displayName: string
- email: string
- xp: number
- level: number
- quizzesCompleted: number
- badges: array
- quizPerformance: array
- weeklyStats: object
- createdAt: timestamp
/quizzes/{quizId}
- title: string
- category: string
- difficulty: string
- description: string
- questions: array
- createdAt: timestamp
- timeEstimate: string
-
Navigate to Upload Quiz Page
- Click on "Upload" tab in navigation
-
Choose Creation Method
- Manual: Create questions manually
- PDF: Upload PDF and let AI generate questions
-
Fill Quiz Details
- Quiz title and category
- Difficulty level
- Description
-
Add Questions
- Question text
- Four answer options
- Mark correct answer
-
Edit/Delete Questions
- Use edit icon to modify questions
- Use delete icon to remove questions
-
Save Quiz
- Review all questions
- Click "Save Quiz" to publish
-
Browse Available Quizzes
- Go to "Quizzes" tab
- Filter by category or difficulty
-
Start Quiz
- Click on any quiz to begin
- Read instructions carefully
-
Answer Questions
- Select your answer for each question
- Navigate between questions
-
View Results
- See your score and XP earned
- Review correct answers
- Track your progress
- XP Tracking: Monitor your learning progress
- Weekly Changes: See percentage improvements
- Quiz History: Review past performance
- Personalized Insights: Get AI-powered recommendations
- Experience Points: Earn XP for every quiz
- Levels: Progress through different skill levels
- Badges: Unlock achievements for milestones
- Leaderboards: Compete with other users
- PDF Quiz Generation: Convert documents to quizzes
- Smart Recommendations: Personalized learning paths
- Chatbot Assistant: Get help and guidance
- Performance Analytics: AI-driven insights
Frontend (.env)
VITE_FIREBASE_API_KEY=
VITE_FIREBASE_AUTH_DOMAIN=
VITE_FIREBASE_PROJECT_ID=
VITE_FIREBASE_STORAGE_BUCKET=
VITE_FIREBASE_MESSAGING_SENDER_ID=
VITE_FIREBASE_APP_ID=Backend (.env)
OPENAI_API_KEY=
PORT=5000
CORS_ORIGIN=http://localhost:5173Firestore Rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
match /quizzes/{quizId} {
allow read: if request.auth != null;
allow write: if request.auth != null;
}
}
}We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow React best practices
- Use TypeScript for new components
- Write comprehensive tests
- Follow the existing code style
- Update documentation for new features
QuizGamifiAi/
โโโ QuizGamification/ # Frontend React application
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โ โโโ common/ # Shared components
โ โ โ โโโ dashboard/ # Dashboard components
โ โ โ โโโ quizzes/ # Quiz-related components
โ โ โ โโโ ui/ # UI components
โ โ โ โโโ chatbot/ # AI chatbot components
โ โ โโโ pages/ # Page components
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ context/ # React context providers
โ โ โโโ firebase/ # Firebase configuration
โ โ โโโ utils/ # Utility functions
โ โโโ public/ # Static assets
โ โโโ package.json
โโโ backend/ # Backend server (if applicable)
โ โโโ routes/ # API routes
โ โโโ middleware/ # Express middleware
โ โโโ package.json
โโโ README.md
Firebase Connection Issues
- Verify your Firebase configuration
- Check if authentication is enabled
- Ensure Firestore rules allow access
PDF Upload Not Working
- Check if backend server is running
- Verify OpenAI API key is set
- Ensure CORS is configured properly
Build Errors
- Clear node_modules and reinstall
- Check Node.js version compatibility
- Verify all environment variables are set
- Check the Issues page
- Join our Discord community
- Read the Documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- React team for the amazing framework
- Firebase for backend services
- OpenAI for AI capabilities
- Tailwind CSS for styling
- All contributors and testers
- Project Maintainer: Sheikh Faizan
- Email: sheikhfaizan.w@gmail.com
- LinkedIn: Sheikh Faizan
Made with โค๏ธ by the Sheikh Faizan
Transform your learning experience with gamified quizzes!


















