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.
quiz-backend/
: Java Spring backend implementation.quiz-frontend/
: React.js frontend with Vite and Tailwind CSS.
- Java Spring Framework
- PostgreSQL
-
Get All Questions:
- Endpoint:
http://127.0.0.1:8080/questions/all-questions
- Description: Retrieve all questions from the database.
- Endpoint:
-
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.
- Endpoint:
-
Get Quiz Questions:
- Endpoint:
http://localhost:8080/quiz/get-quiz-questions/2
- Description: Retrieve questions for a specific quiz by providing the quiz ID.
- Endpoint:
-
Submit Quiz:
- Endpoint:
http://localhost:8080/quiz/submit-quiz/1
- Description: Submit a quiz with responses. Provide the quiz ID in the endpoint.
- Endpoint:
-
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.
- Endpoint:
-
Get All Quizzes:
- Endpoint:
http://localhost:8080/quiz/all
- Description: Retrieve a list of all quizzes.
- Endpoint:
- React.js
- Vite
- Tailwind CSS
-
Clone the repository:
git clone https://github.com/mlaskowski7/quiz.git
-
Install dependencies for the backend and frontend:
cd quiz backend mvn clean install cd ../quiz-frontend npm install
-
Run the backend and frontend servers:
-
In the backend directory
mvn spring-boot:run
- In the frontend directory
npm run dev
- Visit http://localhost:5173 in your browser to access the quiz application.
API endpoints were tested using Postman.