A modern Kahoot-style quiz application that combines live multiplayer gaming with solo study features, powered by AI-generated content. Built with Next.js 15, React 19, TypeScript, and Firebase.
Homepage
Dashboard
- Live Multiplayer - Host real-time quiz competitions with PIN-based joining
- Solo Study - Personal practice sessions with flashcards and quiz modes
- Player Mode - Join hosted games using PIN codes
- AI-powered quiz generation from topic descriptions
- Automated question and answer creation
- Smart content generation for any subject
- Live player joining and scoring
- Real-time leaderboards and synchronized gameplay
- Automatic game cleanup system
- Player activity tracking
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS 4
- Backend: Firebase (Realtime Database, Authentication, Firestore, Hosting)
- Icons: Lucide React, React Icons
- Build: Static export for Firebase hosting
src/
├── app/
│ ├── layout.tsx # Root layout with fonts and metadata
│ ├── page.tsx # Main app with routing logic
│ └── globals.css # Global styles
├── components/
│ ├── auth/
│ │ ├── AuthProvider.tsx # Firebase auth context
│ │ ├── AuthPage.tsx # Authentication forms
│ │ └── EmailVerificationBanner.tsx
│ ├── main/
│ │ ├── MainPage.tsx # Landing page
│ │ ├── UserDashboard.tsx # User dashboard
│ │ └── UserProfile.tsx # Profile settings
│ ├── host/
│ │ ├── HostDashboard.tsx # Game setup
│ │ ├── GameHost.tsx # Live game control
│ │ ├── QuizEditor.tsx # Quiz creation
│ │ └── QuizLibrary.tsx # Quiz management
│ ├── player/
│ │ ├── PlayerJoin.tsx # Game PIN entry
│ │ └── PlayerGame.tsx # Player game view
│ ├── solo/
│ │ ├── SoloSetup.tsx # Solo session config
│ │ ├── SoloGame.tsx # Solo quiz mode
│ │ └── Flashcard.tsx # Flashcard component
│ └── ai/
│ └── prompts.tsx # AI prompt templates
├── lib/
│ ├── firebase.ts # Firebase configuration
│ └── quizStorage.ts # Quiz data management
├── hooks/
│ ├── useFirebaseData.ts # Real-time data sync
│ └── useGameCleanup.ts # Game cleanup management
├── types/
│ └── game.ts # TypeScript interfaces
└── utils/
├── gameUtils.ts # Game logic and scoring
└── gameCleanup.ts # Cleanup utilities
- Node.js 18 or later
- Firebase account
- npm or yarn
- Clone the repository
git clone [repository-url]
cd quiz-app- Install dependencies
npm install-
Set up Firebase
- Create a new Firebase project
- Enable Authentication, Realtime Database, and Firestore
- Add your Firebase configuration to environment variables
-
Configure environment variables
# Create .env.local file with your Firebase config
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_auth_domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_storage_bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id- Run the development server
npm run dev- Open http://localhost:3000 in your browser
Build and deploy to Firebase Hosting:
npm run build
npm run deploy- Sign up/sign in to your account
- Create a new quiz or select from your library
- Start a live game and share the PIN with players
- Monitor real-time progress and leaderboards
- Enter the game PIN on the join page
- Enter your name to join the game
- Answer questions as they appear
- View your score and ranking on the leaderboard
- Browse available quizzes
- Choose between quiz mode or flashcard mode
- Study at your own pace with immediate feedback
Ensure your Firebase Realtime Database and Firestore rules are properly configured for security while allowing the necessary read/write operations.
The app uses a custom color scheme defined in Tailwind CSS:
- Primary: #568EA6
- Secondary: #305F72
- Accent: #F0B7A4
- Background: #F0F4F8
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or issues, please open an issue on GitHub or contact the development team.