A fun and interactive music quiz application built with React and Vite. Test your music knowledge by listening to songs and answering questions about them!
- 🎧 Play songs using YouTube integration
- 🎯 5 questions per song
- 🎮 Interactive quiz interface
- 📊 Score tracking
- 🎨 Modern, Spotify-inspired UI
- 🔄 Random song selection for each new quiz
- React
- Vite
- React YouTube
- CSS3
- Node.js (v14 or higher)
- npm (v6 or higher)
- Clone the repository:
git clone https://github.com/Pranav-Vinodh/MusixQuiz.git
cd MusixQuiz- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
- Click the "Start Quiz" button on the landing page
- A random song will be selected
- Use the play button to listen to the song
- Answer 5 questions about the song
- View your score at the end
- Click "New Quiz" to try another song
MusixQuiz/
├── src/
│ ├── components/
│ │ └── Quiz.jsx
│ ├── data/
│ │ └── quizData.js
│ ├── App.jsx
│ ├── App.css
│ ├── main.jsx
│ └── index.css
├── public/
├── package.json
├── vite.config.js
└── README.md
To add new songs to the quiz, edit the quizData.js file in the src/data directory. Follow this format:
{
id: number,
title: "Song Title",
artist: "Artist Name",
youtubeId: "YouTube Video ID",
questions: [
{
question: "Question text",
options: ["Option 1", "Option 2", "Option 3", "Option 4"],
correctAnswer: "Correct Option"
},
// ... more questions
]
}The app uses CSS variables for theming. You can customize the colors in the :root section of App.css:
:root {
--spotify-green: #1db954;
--spotify-black: #191414;
--glow-color: rgba(29, 185, 84, 0.2);
}Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by Spotify's design
- Uses the YouTube API for music playback
- Built with React and Vite