Coder Social home page Coder Social logo

mlaskowski7 / quiz Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5.29 MB

This is a fullstack quiz application with backend developed in Java Spring Framework, frontend using Vite with React.js, and Tailwind CSS for styling. The database is powered by PostgreSQL. API endpoints were tested using Postman. App has quiz creation and quiz checking functionalities.

Java 32.74% JavaScript 61.56% HTML 1.21% CSS 4.49%

quiz's Introduction

Quiz Application

This is a quiz application with backend developed in Java Spring Framework, frontend using Vite with React.js, and Tailwind CSS for styling. The database is powered by PostgreSQL. API endpoints were tested using Postman.

Table of Contents

  1. Project Structure

  2. Backend

  3. Frontend

  4. Development Setup

  5. Testing

  6. Screenshots

Project Structure

  • quiz-backend/: Java Spring backend implementation.
  • quiz-frontend/: React.js frontend with Vite and Tailwind CSS.

Backend

Technologies Used

  • Java Spring Framework
  • PostgreSQL

API Endpoints

  1. Get All Questions:

    • Endpoint: http://127.0.0.1:8080/questions/all-questions
    • Description: Retrieve all questions from the database.
  2. Create Quiz:

    • Endpoint: http://localhost:8080/quiz/create?category=JavaScript&numOfQues=10&title=Hard-Javascript-Quiz
    • Description: Create a quiz with a specified category, number of questions, and title.
  3. Get Quiz Questions:

    • Endpoint: http://localhost:8080/quiz/get-quiz-questions/2
    • Description: Retrieve questions for a specific quiz by providing the quiz ID.
  4. Submit Quiz:

    • Endpoint: http://localhost:8080/quiz/submit-quiz/1
    • Description: Submit a quiz with responses. Provide the quiz ID in the endpoint.
  5. Get Quiz Title:

    • Endpoint: http://localhost:8080/quiz/get-quiz-title/3
    • Description: Retrieve the title of a specific quiz by providing the quiz ID.
  6. Get All Quizzes:

    • Endpoint: http://localhost:8080/quiz/all
    • Description: Retrieve a list of all quizzes.

Frontend

Technologies Used

  • React.js
  • Vite
  • Tailwind CSS

Development Setup

  1. Clone the repository:

    git clone https://github.com/mlaskowski7/quiz.git
    
  2. Install dependencies for the backend and frontend:

    cd quiz backend
    mvn clean install
    cd ../quiz-frontend
     npm install
    
  3. Run the backend and frontend servers:

  4. In the backend directory

mvn spring-boot:run
  1. In the frontend directory
npm run dev
  1. Visit http://localhost:5173 in your browser to access the quiz application.

Testing

API endpoints were tested using Postman.

Screenshots

  1. Main Page image image

  2. View Quizes Page image

  3. Create Quiz Page image

  4. Answer Quiz Page image image

Feel free to contribute or open issues if you find any problems or have suggestions!

quiz's People

Contributors

mlaskowski7 avatar

Stargazers

 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.