diff --git a/images/Docker Container Setup.png b/images/Docker Container Setup.png index 9243e014..d8947982 100644 Binary files a/images/Docker Container Setup.png and b/images/Docker Container Setup.png differ diff --git a/images/domain-model-2.svg b/images/domain-model-2.svg new file mode 100644 index 00000000..060adaac --- /dev/null +++ b/images/domain-model-2.svg @@ -0,0 +1 @@ +WiqEs04bApplicationmain(args: String[]): voidCustomErrorControllererror(model: Model, webRequest: HttpServletRequest): StringHomeControllerhome(model: Model): StringPlayersControllershowRegistrationForm(model: Model): StringregisterUserAccount(user: PlayerDto, result: BindingResult, model: Model): StringshowLoginForm(model: Model, error: String, session: HttpSession): Stringhome(model: Model, principal: Principal): StringSecurityConfigpasswordEncoder(): PasswordEncoderfilterChain(http: HttpSecurity): SecurityFilterChainconfigureGlobal(auth: AuthenticationManagerBuilder): voidisAuthenticated(): booleanCustomAuthenticationFailureHandleronAuthenticationFailure(request: HttpServletRequest, response: HttpServletResponse, exception: AuthenticationException): void \ No newline at end of file diff --git a/images/domain-model.svg b/images/domain-model.svg new file mode 100644 index 00000000..39f6a3a4 --- /dev/null +++ b/images/domain-model.svg @@ -0,0 +1 @@ +Questionid: Longquestion: StringcorrectAnswer: StringincorrectAnswers: List<String>category: Categorydifficulty: Stringtype: StringupdatedAt: LocalDateTimegetId(): LonggetQuestion(): StringgetCorrectAnswer(): StringgetIncorrectAnswers(): List<String>getCategory(): CategorygetDifficulty(): StringgetType(): StringgetUpdatedAt(): LocalDateTimeCategoryid: Longname: StringgetName(): StringgetId(): LongsetName(name: String): voidsetId(id: Long): voidPlayerid: Longusername: Stringemail: Stringpassword: StringpasswordConfirm : Stringroles: Set<Role>getId(): LonggetUsername(): StringgetEmail(): StringgetPassword(): StringgetPasswordConfirm(): StringgetRoles(): Set<Role>setUsername(username: String): voidsetEmail(email: String): voidsetPassword(password: String): voidsetPasswordConfirm(passwordConfirm: String): voidsetRoles(roles: Set<Role>): voidsetId(id: Long): voidGameSessionid: Longplayer: PlayercorrectQuestions: IntegertotalQuestions: IntegercreatedAt: LocalDateTimeupdatedAt: LocalDateTimegetPlayer(): PlayergetScore(): IntegergetCreatedAt(): LocalDateTimegetUpdatedAt(): LocalDateTimegetCorrectQuestions(): IntegergetTotalQuestions(): IntegeraddQuestion(correct: boolean): voidsetPlayer(player: Player): voidsetScore(score: Integer): voidsetCreatedAt(createdAt: LocalDateTime): voidsetUpdatedAt(updatedAt: LocalDateTime): voidsetCorrectQuestions(correctQuestions: Integer): voidsetTotalQuestions(totalQuestions: Integer): voidRoleid: Longname: StringgetId(): LonggetName(): StringsetId(id: Long): voidsetName(name: String): voidPlayerServiceaddNewPlayer(playerDto: PlayerDto): PlayergetUsers(): List<Player>getUser(id: Long): Optional<Player>getUserByUsername(username: String): Optional<Player>getUserByEmail(email: String): Optional<Player>RoleServiceaddRole(roleDto: RoleDto): RolegetRoles(): List<Role>getRole(name: String): RolePlayerServiceImplplayerRepository: PlayerRepositoryroleService: RoleServiceaddNewPlayer(playerDto: PlayerDto): PlayergetUsers(): List<Player>getUser(id: Long): Optional<Player>getUserByUsername(username: String): Optional<Player>getUserByEmail(email: String): Optional<Player>RoleServiceImplroleRepository: RoleRepositoryaddRole(roleDto: RoleDto): RolegetRoles(): List<Role>getRole(name: String): RoleCrudRepositorysave(entity: T): TfindById(id: ID): Optional<T>findAll(): List<T>PlayerRepositoryfindByUsername(username: String): Optional<Player>findByEmail(email: String): Optional<Player>RoleRepositoryfindByName(name: String): RolePlayerDtousername: Stringemail: Stringpassword: StringpasswordConfirm: Stringroles: String[]RoleDtoname: String11*1** \ No newline at end of file diff --git a/index.html b/index.html index 6c883d4e..dc618ec3 100644 --- a/index.html +++ b/index.html @@ -495,7 +495,7 @@

arc42 W
  • 8.1. Domain Model
  • 8.2. Hexagonal Architecture
  • 8.3. Java Persistence API (JPA) for Data Management
  • -
  • 8.4. Logging with Log4j and System.out
  • +
  • 8.4. Logging with Slf4j and System.out
  • 8.5. Security
  • 8.6. Performance Optimization
  • 8.7. Continuous Integration and Continuous Deployment (CI/CD)
  • @@ -1585,11 +1585,11 @@

    7.1. Infrastructure Level 1

    The infrastructure features a single Docker container that hosts the Java Spring Boot application. This container communicates with external services, such as the Wikidata API, to fetch data in real-time and generate game questions.

    -
    Motivation::
    +
    Motivation

    The primary motivation behind using Docker for deployment is to streamline the development and deployment processes. By containerizing the application, we reduce discrepancies between environments, making it easier to develop, test, and deploy with confidence.

    -
    Quality and/or Performance Features::
    +
    Quality and/or Performance Features
    +
    +
    +
    Mapping of Building Blocks to Infrastructure
    +
    -

    8.4. Logging with Log4j and System.out

    +

    8.4. Logging with Slf4j and System.out

    -

    For monitoring runtime behavior and troubleshooting, the project utilizes Log4j and System.out for logging. While Log4j offers more sophisticated logging capabilities, System.out is used for straightforward, immediate console output.

    +

    For monitoring runtime behavior and troubleshooting, the project utilizes Slf4j, bundled with Sprint Boot, and System.out for logging. While Slf4j offers more sophisticated logging capabilities, System.out is used for straightforward, immediate console output.

    Explanation:
    -

    Log4j is configured to capture various levels of output, which can be directed to multiple destinations such as console, files, or even remote logging servers. For simplicity and immediacy during development or less complex deployment scenarios, System.out is employed for logging output directly to the console.

    +

    Slf4j is configured to capture various levels of output, which can be directed to multiple destinations such as console, files, or even remote logging servers. For simplicity and immediacy during development or less complex deployment scenarios, System.out is employed for logging output directly to the console.

    8.5. Security

    -

    Security is a key concern, ensuring that user data and game integrity are protected. We implement standard security practices at various levels within the application.

    +

    Security is a key concern, ensuring that user data and game integrity are protected. We implement standard security practices at various levels within the application

    Explanation:
    @@ -1709,11 +1730,9 @@

    8.7. Continuous

    8.8. Scalability

    -

    Designing for scalability, the application can accommodate an increasing number of users and interactions without performance degradation.

    -
    -
    -
    Explanation:
    -

    Scalable solutions such as Docker containers allow the application to be deployed in a distributed environment, where resources can be adjusted based on demand.

    +

    Designing for scalability, the application can accommodate an increasing number of users and interactions without performance degradation. +.Explanation: +Scalable solutions such as Docker containers allow the application to be deployed in a distributed environment, where resources can be adjusted based on demand.

    @@ -2097,7 +2116,7 @@

    11. Risks and Technical Debts