A web-base application designed for teachers to create various kinds of topic-base quizzes. With the aim is for their students to learn about course related topics. Features include 2 dashboard: One for the teachers to manage quizzes, Another for students to take different quizzes.
Backend using Springboot Java framework
Frontend using React
flowchart TB
Frontend --> Backend
Backend --> Database
We run tests in Java Spring Boot using JUnit following the Arrange-Act-Assert pattern:
Here's how to run the tests:
Use the command: ./mvnw package
Run: java -jar target/quizzer-0.0.1-SNAPSHOT.jar
Open the application in: http://localhost:8080
When you change the application’s code, you need to re-generate the JAR file with the ./mvnw package command to have a JAR file for the latest version of the application.
erDiagram
CATEGORIES ||--|{ QUIZZ : contains
QUIZZ ||--o{ QUESTION : includes
QUIZZ }o--|| STATUS : has
QUESTION }|--|| DIFFICULTY : has
QUESTION }|--|| ANSWER : has
QUIZZ }|--|| REVIEW : has
USER }o--|| QUIZZ : has
CATEGORIES {
Long categoryId PK
string name
string description
}
QUIZZ {
Long quizId PK
string name
string description
Instant createdAt
Long statusId FK
Long categoryId FK
}
QUESTION {
Long questionId PK
string questionText
string correctAnswer
int difficultyId
}
STATUS {
Long statusId PK
boolean status
}
DIFFICULTY {
Long difficultyId PK
string level
}
ANSWER {
Long answerId PK
string answerText
boolean correctness
Long questionId FK
}
REVIEW {
Long reviewId PK
string nickname
string reviewText
Instant reviewTime
Long quizzId FK
}
USER {
Long id PK
String username
String passwordHash
String role
}
CATEGORIES: This entity represents the different categories of quizzes available in the application. Each category is identified by a unique categoryId and has a name and description. Each category can contain multiple quizzes, establishing a one-to-many relationship with the QUIZZ entity.
USER: This entity represents the users of the application. Each user is identified by a unique userId and has a username, passwordHash, and role. A user can submit multiple answers and reviews, establishing a one-to-many relationship with the ANSWER and REVIEW entities.
QUIZZ: This entity represents the quizzes in the application. Each quiz is identified by a unique quizzId and has a name, description, createdAt timestamp, statusId, and categoryId. A quiz belongs to one category and has one status, establishing a one-to-one relationship with the CATEGORIES and STATUS entities. Also, a quiz contains multiple questions and can have multiple reviews, establishing a one-to-many relationship with the QUESTION and REVIEW entities.
QUESTION: This entity represents the questions in a quiz. Each question is identified by a unique questionId and has a questionText, correctAnswer, and difficultyId. A question belongs to one quiz and has one difficulty level, establishing a one-to-one relationship with the QUIZZ and DIFFICULTY entities. Also, a question can have multiple answers, establishing a one-to-many relationship with the ANSWER entity.
STATUS: This entity represents the status of a quiz. Each status is identified by a unique statusId and has a status boolean. A status can belong to multiple quizzes, establishing a one-to-many relationship with the QUIZZ entity.
REVIEW: This entity represents the reviews given by users for a quiz. Each review is identified by a unique reviewId and has a reviewText, rating, and quizzId. A review belongs to one user and one quiz, establishing a one-to-one relationship with the USER and QUIZZ entities.
DIFFICULTY: This entity represents the difficulty level of a question. Each difficulty level is identified by a unique difficultyId and has a level. A difficulty level can belong to multiple questions, establishing a one-to-many relationship with the QUESTION entity.
ANSWER: This entity represents the answers given by users for a question. Each answer is identified by a unique answerId and has an answerText, correctness boolean, and questionId. An answer belongs to one user and one question, establishing a one-to-one relationship with the USER and QUESTION entities.
Following these steps will deploy the frontend of Quizzer on Render, allowing users to access the application through the specified URL.
React is MIT Licensed