A full-stack trivia game with integrated radio player! Built with React, TypeScript, Node.js, and MongoDB. Features trivia gameplay, AI-powered hints, and a fully functional radio widget with thousands of live stations.
🎮 Live Demo: Frontend | Backend API
- ✨ What's New in 3.0
- 📱 Progressive Web App
- 🎯 Features
- 🛠️ Tech Stack
- 🎮 How to Play
- 🙏 Acknowledgments
- Installation
- 📻 30,000+ live radio stations worldwide
- 🔍 Search by country, tags, or station name
- ⭐ Favorite stations with persistent storage
- 🔊 Real-time audio streaming with Howler.js
- 🎛️ Volume control and playback management
- 📱 Responsive retro-style design
- 👤 User registration and authentication
- 🔐 JWT token-based authentication
- 🗄️ MongoDB user data storage
- 📱 Persistent login sessions
- 🛡️ Proxy server for Radio Browser API
- ⚡ Load balancing across multiple radio servers
- 💾 Caching for improved performance
- 🔄 Exponential backoff for error handling
TriviaFlair is installable as a Progressive Web App, providing a native app-like experience:
- Installable - Add to home screen on mobile or desktop for quick access
- Standalone Mode - Runs without browser UI for an immersive experience
- Optimized Loading - Service worker caching for faster subsequent visits
- App-like Feel - Custom theme colors and splash screen
Desktop (Chrome/Edge):
- Visit the live app
- Click the install icon in the address bar (or three-dot menu → "Install TriviaFlair")
- Click "Install" in the popup
- Launch from your desktop or start menu
Mobile (Chrome/Safari):
- Visit the live app
- Tap the share button or three-dot menu
- Select "Add to Home Screen"
- Confirm installation
Note: Full offline gameplay is not yet supported as the app relies on external APIs (OpenTriviaDB, Radio Browser, DeepInfra). The app shell is cached for faster loading, with full offline mode planned for future updates.
- 🎯 Customizable categories, difficulty, and question count
- ⚡ Fast game flow with smooth animations
- 🧠 AI-powered hints & fun facts (DeepInfra Llama 3)
- 🐢 Minimal Mode: disable sound/animations/illustrations
- 📱 Fully responsive and accessible
- 🌍 Global station database
- 🔍 Advanced search and filtering
- ⭐ Favorites system with localStorage
- 🔊 High-quality audio streaming
- 🎛️ Professional playback controls
- React 19 + TypeScript
- Tailwind CSS 4.0 with custom themes
- Framer Motion for animations
- SVGR for SVG component transformation
- ShadCN/Radix UI components
- Howler.js for audio handling
- React Hook Form + Zod for validation
- Axios for API calls
- React Virtuoso for performant lists
- React Fast Marquee for scrolling text/UI effects
- Fuse.js for search & fuzzy matching
- Sonner for notifications
- @dnd-kit for drag-and-drop interactions
- PWA with service worker and web manifest
- Node.js + Express
- MongoDB + Mongoose
- JWT authentication + bcrypt hashing
- Radio Browser API integration
- Caching and load balancing
- Start Trivia
- Set the number of questions (10-50)
- Choose from various categories like Science, History, Entertainment, and more
- Select your preferred difficulty level (Easy, Medium, Hard)
- Click "Start Game"
- Answer Questions
- Use keyboard or mouse to select answers
- Track your score and see correct/incorrect answers after each question
- Click the Trivia Flavor button to reveal extra info or fun facts about the question
- Get Help
- Use 50/50 elimination or Get a hint from AI when stuck
- Listen to Radio
- Click the radio icon in the bottom corner
- Browse 30,000+ stations from around the world
- Search by popular, country, music genre, or station name
- Control volume and playback without leaving your game
- Save Favorites by clicking the star icon
- You can dock/minimize the radio while playing trivia
- Adjust Settings
- Disable animations/illustrations for better performance
- Toggle background patterns, sounds, or minimal mode for a cleaner interface
- OpenTriviaDB for trivia questions
- DeepInfra for AI-powered hints
- Radio Browser API for radio station data
- Lucide for icons
- react-icons (Ionicons & Game Icons) for additional iconography
- Game Icons for favicon (GiPerspectiveDiceSixFacesRandom)
- Storyset for illustrations
- Freepik for SVGs
- Vecteezy for additional vector graphics
- Clone the repository
git clone https://github.com/Akiz-Ivanov/trivia-game-v3-frontend
cd trivia-game-v3-frontend
- Install dependencies
npm install
- Environment setup
- Create .env in the frontend root:
VITE_API_URL=your_backend_url_here
VITE_DEEPINFRA_API_KEY=your_deepinfra_api_key
- Run development server
npm run dev