Skip to content

rakesh0x/100xlearn

Repository files navigation

Trivia Game

A fun, interactive trivia game built with React, designed to test your knowledge on various topics! 🚀


Features

  • 🎮 Multiple categories (Science, Movies, History, etc.)
  • ⏳ Timed questions for added challenge
  • 🎯 Score tracking with a leaderboard
  • 🎨 Responsive design for mobile and desktop
  • 🔀 Randomized questions for replayability
  • 🔒 Secure user authentication (optional, for saving scores)

Getting Started

Prerequisites

Ensure you have the following installed:

  • Node.js (v16 or later)
  • npm or yarn package manager

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/trivia-game.git
    cd trivia-game
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Start the development server:

    npm start
    # or
    yarn start
  4. Open the app in your browser at http://localhost:3000.


Project Structure

trivia-game/
├── public/          # Static assets
├── src/             # Source code
│   ├── components/  # React components
│   ├── pages/       # Page components
│   ├── utils/       # Helper functions
│   ├── App.js       # Main app component
│   ├── index.js     # App entry point
│   └── styles/      # CSS/SCSS files
└── package.json     # Project configuration

How to Play

  1. Select a trivia category from the homepage.
  2. Answer questions before the timer runs out.
  3. Earn points for correct answers and see how you rank on the leaderboard!

Technologies Used

  • React for UI development
  • React Router for navigation
  • Axios for fetching trivia questions from an API
  • Open Trivia Database API (OTDB)
  • CSS/SCSS for styling
  • Optional: Firebase or Supabase for authentication and leaderboard storage

Roadmap

  • Add support for multiplayer mode
  • Include customizable difficulty levels
  • Improve UI/UX with animations (e.g., using Framer Motion)
  • Integrate more APIs for trivia questions

Contributing

Contributions are welcome! To get started:

  1. Fork the repository.
  2. Create a new branch for your feature: git checkout -b feature-name.
  3. Commit your changes: git commit -m 'Add a new feature'.
  4. Push to your branch: git push origin feature-name.
  5. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments

  • Thanks to the Open Trivia Database for providing the trivia questions.
  • Inspired by classic trivia games and pub quizzes!

Trivia_Game

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published