Skip to content

Distributed Quiz Game created using SpringBoot, Rest and Kafka

Notifications You must be signed in to change notification settings

tfiroze/quiz-game-distributed

 
 

Repository files navigation

QuizQuest- A Distributed QuizApp

This is a distributed quiz game application that utilizes Kafka, Springboot, Maven and Docker.

Instructions on how to compile and run your code

Prerequisites

Make sure you have the following tools installed on your machine:

Getting Started

  1. Clone the repository:

    git clone https://github.com/your-username/quiz-game-distributed.git
    
  2. Navigate to the project directory:

    cd quiz-game-distributed
    

Maven Package

Package each service using:

```bash
mvn clean package

Docker Compose

Start the application with Docker Compose:

```bash
docker-compose up -d

This command will start Kafka, the backend services, and the frontend.

Wait for at least a minute to allow Kafka to set up and the services to connect.

Accessing the Application

Stopping the Application

To stop the application, run:

docker-compose down

A brief summary of what your code does

  • quizService: SpringBoot application that creates API endpoints that can be used to create a quizMaster and a quiz and persist the same in the DB.
  • roomService: SpringBoot application that creates a unique Room, keeps players joined linked to the room and closes the room once the game ends.
  • playerService: SpringBoot application that connects a player to a room, stores player and the player's score in the DB.
  • gameService: SpringBoot application that fetches the questions for a started quiz and sends each question one by one after a time interval to a websocket connected to the UI.
  • scoreService: SpringBoot application that has endpoints to send score details which will create a gameEvent to update scores that will be published to a kafka topic. The listener of the topic will update the score for the player in the DB.

Video and Report

  • The demo video has been attached with the submission. The file name is QuizQuestDemoVideo.mp4
  • The report has been attached with the submission. File name is The_QuizQuest_Crew.pdf

About

Distributed Quiz Game created using SpringBoot, Rest and Kafka

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 58.5%
  • JavaScript 36.8%
  • HTML 2.4%
  • Dockerfile 2.2%
  • CSS 0.1%