Coder Social home page Coder Social logo

alexonthespot7 / quizhacker_back-end Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 230 KB

The backend of QuizHacker project, built on Spring Boot, powers the quiz creation, management, and user interactions providing RESTful API endpoints.

Home Page: https://quiz-hacker-back-end.onrender.com/

License: MIT License

Java 100.00%
back-end java spring-boot

quizhacker_back-end's Introduction

QuizHacker_back-end

The backend of QuizHacker project, built on Spring Boot, powers the quiz creation, management, and user interactions providing RESTful API endpoints.

The client-end side (mobile app) of this project is available here

The production version is under production branch

The deployed back-end side of the application can be found here. The response speed is quite low, as the free instance is used.

Table of Contents

Usage Guide

  1. Clone the project
    git clone https://github.com/alexonthespot7/QuizHacker_back-end.git
  2. Run the following command in a terminal window in the complete directory:
    ./mvnw spring-boot:run
  3. Navigate to localhost:8080

Features

  • Restful Endpoints: Provides RESTful API endpoints for seamless communication with the front-end application.

  • Authentication with JWT: Implements JSON Web Token (JWT) for secure authentication between the server-side and client-side applications.

  • Leaderboard Display:

    • Get the top 10 rankings.
    • Authenticated users who have taken at least one quiz are on the leaderboard with their position.
  • Personal Page:

    • Get user information: email, username, score, position in the leaderboard, attempts quantity, and average score among attempts.
  • Personal Quizzes:

    • Get list of created quizzes.
    • Update existing quizzes.
    • Details include title, description, question count, rating by other users, time limit, category, and difficulty.
  • Creating/Editing Quizzes:

    • Create quizzes with title, description, time limit, category, and difficulty.
    • Update questions and answers; each question has four answers, with one correct.
  • List of Unattempted Quizzes:

    • Get quizzes created by other users that the current user hasn't taken.
  • Quiz Taking Process:

    • Post quiz-taking attempt with list of questions and answers for them and the user's rating for the quiz.
    • Get score of attempt (questions answered * quiz difficulty: easy - 1, medium - 2, hard - 3).

Technologies Used

  • Java Spring Boot
  • RESTful APIs
  • JWT (JSON Web Token)
  • smtp

Dependencies

  • spring-boot-starter-web: Starter for building web applications using Spring MVC.
  • spring-boot-devtools: Provides development-time tools to enhance developer productivity. Automatically triggers application restarts, among other features.
  • spring-boot-starter-data-jpa: Starter for using Spring Data JPA for database access.
  • h2: H2 Database Engine, an in-memory relational database for development and testing purposes.
  • spring-boot-starter-security: Starter for enabling Spring Security and authentication/authorization features.
  • spring-boot-starter-mail: Starter for sending emails using Spring's JavaMailSender.
  • jjwt-api: JSON Web Token (JWT) API provided by JJWT library.
  • jjwt-impl: Implementation of the JSON Web Token (JWT) provided by JJWT library (runtime dependency).
  • jjwt-jackson: Jackson integration for JSON Web Token (JWT) provided by JJWT library (runtime dependency).
  • spring-boot-starter-test: Starter for testing Spring Boot applications.
  • spring-security-test: Spring Security testing support for integration testing.
  • junit-jupiter-api: JUnit 5 API for writing tests.
  • junit-jupiter-engine: JUnit 5 test engine implementation.
  • spring-boot-starter-validation: Starter for using validation in Spring Boot applications.

Documentation

The documentation for this project is made with Swagger and can be accessed after launching the project at the following endpoints:

  1. http://localhost:8080/swagger-ui.html: if you're running the app on your pc.
  2. https://quiz-hacker-back-end.onrender.com/swagger-ui.html: deployed app.

Testing

Usage Guide

  1. Clone the project
    git clone https://github.com/alexonthespot7/QuizHacker_back-end.git
  2. Run the following command in a terminal window (in the complete) directory:
    ./mvnw test

Info

  1. Controllers testing.
  2. Repositories testing: CRUD functionalities + custom queries.
  3. Rest endpoints methods testing.

License

This project is under the MIT License.

quizhacker_back-end's People

Contributors

alexonthespot7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.