diff --git a/images/Context Diagram.png b/images/Context Diagram.png index 167280f..6371b3c 100644 Binary files a/images/Context Diagram.png and b/images/Context Diagram.png differ diff --git a/images/Generated Questions API (WhiteBox).png b/images/Generated Questions API (WhiteBox).png deleted file mode 100644 index 4509c81..0000000 Binary files a/images/Generated Questions API (WhiteBox).png and /dev/null differ diff --git a/images/Whitebox overall system.png b/images/Whitebox overall system.png index c3889ef..73396d1 100644 Binary files a/images/Whitebox overall system.png and b/images/Whitebox overall system.png differ diff --git a/images/questions API (WhiteBox).png b/images/questions API (WhiteBox).png new file mode 100644 index 0000000..627739c Binary files /dev/null and b/images/questions API (WhiteBox).png differ diff --git a/index.html b/index.html index 137390a..9321306 100644 --- a/index.html +++ b/index.html @@ -480,9 +480,8 @@

arc42 T
  • 8. Cross-cutting Concepts
  • 9. Architecture Decisions
  • @@ -609,7 +608,18 @@

    1.1. Requirements Overview

    -

    The functional requirements have been grouped into the different microservices the web application will have.

    +

    The functional requirements are the following: +* The application must be accesible through the web +* Users must be able to register into the system +* Users must be able to see data about their past games (score, correct/wrong answers, number of questions answered…​) +* Questions must be automatically generated from Wikidata. +* Questions must be answered before some specific time. +* Each question must have one right answer and several incorrect ones or distractors. Both the right answer and the distractors should be automatically generated. +* The system must give access to the information about the users through an API. +* The system must give access to information about the generated questions through an API.

    +
    +
    +

    The functional requirements have been grouped into the different microservices the web application will have:

    1.1.1. User and Authorization Services

    @@ -620,16 +630,7 @@

    1.1.1. User and Authorization Services
    1. -

      Register.

      -
    2. -
    3. -

      Delete the account.

      -
    4. -
    5. -

      Update the account.

      -
    6. -
    7. -

      Recover the password.

      +

      Register

    @@ -639,87 +640,60 @@

    1.1.1. User and Authorization Services
    1. -

      Log in.

      -
    2. -
    3. -

      Log out.

      +

      Log in

    + +

    + +
    +

    1.1.2. Ranking Service

    +
    +
    1. -

      A user can retrieve the following information from the User service

      +

      A user can retrieve the following information from the Ranking service

      1. -

        Name.

        +

        Points scored

      2. -

        Email.

        +

        Number of questions answered

      3. -

        Profile picture.

        +

        Correct answers

      4. -

        Questions answered.

        +

        Incorrect answers

    2. -

      The system must be able to manage the user’s access to the system.

      +

      The system must be able to manage the user’s access to the system

    -

    1.1.2. Question Service

    +

    1.1.3. Question Service

    1. -

      The Question service retrieves questions generated from wikidata.

      -
    2. -
    3. -

      A user can retrieve the following information from the Question service

      -
      -
        -
      1. -

        Select a category.

        -
      2. -
      3. -

        Select a difficulty.

        -
      4. -
      5. -

        Select a question.

        -
      6. -
      7. -

        Select an answer.

        -
      8. -
      -
      -
    4. -
    5. -

      Questions must be stored in a database.

      -
    6. -
    7. -

      The database used is MongoDB.

      -
    8. -
    9. -

      Questions are classified by

      +

      The question service provides the following functionallities

      1. -

        Category.

        +

        Generate a random question from a given category with 4 options

      2. -

        Difficulty.

        +

        Validate the answer and update the score accordingly

    10. -
    11. -

      The questions should be selected randomly.

      -
    @@ -907,44 +881,28 @@

    2. Architecture Constraints

    -

    Privacy (by SOLID)

    -

    The web application must be able to save in a secure and persistence way.

    - -

    GitHub

    It will be used to coordinate the projects work, tracks changes and manage workflow.

    -

    Time

    -

    The web application will be developed along this course, that means our time is limited and we require an efficient time management.

    +

    Documentation

    +

    In order to keep it clean, efficient and simple, it will follow Arc42 method and be deployed to be able to look at it at any time.

    -

    Documentation

    -

    In order to keep it clean, efficient and simple it will follow Arc42 method.

    +

    Deployment

    +

    The project has to be deployed when a release is made

    Time

    Since the project will be done in this semester our time is limited, and we need to stick to the deadlines and manage our time in an efficient way.

    -

    Code

    -

    The code requires a small description of what it does. In addition, we must build it in a clean way and that is easy to expand and can adapt to changes in an easy way.

    +

    Testing

    +

    We need to have a good coverage of unitary testing (80%+) and some acceptance testing covering all the webapp functionallity

    -

    Test

    -

    The test has to be correctly tested in order to accomplish the desired behavior.

    - - -

    Node.js

    -

    Open-source, cross-platform JavaScript runtime environment and library for running web applications outside the client’s browser.

    - - -

    Ruby

    -

    Dynamic, open source programming language with a focus on simplicity and productivity.

    - - -

    JavaScript

    -

    Programming language that allows you to implement complex features on web page.

    +

    Wikidata

    +

    It has to be used for the question generation.

    @@ -1011,9 +969,15 @@

    3.1. Business Context

    +
    +

    The player is the only actor in the main system, which is the one that makes use of the different APIs that will be described later. +The player can initially interact with the authentication system to either register or login and then, by playing the game, the question +service will be triggered for either generating the questions or validating the player’s answer. The player can also access data about +the past games of all users in a ranking.

    +
    -Context Diagram +Context Diagram
    @@ -1049,7 +1013,7 @@

    3.1. Business Context

    - + @@ -1176,6 +1140,10 @@

    5. Building Block View

    +
    +

    The system is based on having a player interact with a GUI which makes use of different APIs that hold most of the +important functionallity

    +

    5.1. Whitebox Overall System

    @@ -1218,7 +1186,7 @@

    5.1. Whitebox Overall System

    -Whitebox overall system +Whitebox overall system
    @@ -1247,8 +1215,8 @@

    5.1. Whitebox Overall System

    - - + + @@ -1343,7 +1311,11 @@

    5.2. Level 2

    -

    5.2.1. Generated Questions API (White Box)

    +

    5.2.1. questions API (White Box)

    +
    +

    This is the Component that holds the functionallity for the main purpose of the webapp: Allowing players to see questions and +answer them, getting a consequent score update.

    +
    @@ -1353,7 +1325,7 @@

    5.2.1. Generated Questions API (Whit

    -Generated Questions API (WhiteBox) +questions API (WhiteBox)
    @@ -1378,8 +1350,8 @@

    5.2.1. Generated Questions API (Whit

    - - + + @@ -1767,11 +1739,7 @@

    8. Cross-cutting Concepts

    -

    8.1. Domain model and terminology

    - -
    -
    -

    8.2. Microservice based system

    +

    8.1. Microservice based system

    Different business functionallities will be developed in different independent services. This will ensure that if one of them fails, the rest are still working (For example, @@ -1783,7 +1751,7 @@

    8.2. Microservice based system

    -

    8.3. Gateway service routing

    +

    8.2. Gateway service routing

    We will use a speciallized service that will route the requests to the corresponding service, acting as a single entry point for the application. Requests to the services are much simpler as only the api base @@ -1844,65 +1812,31 @@

    9. Architecture Decisions

    Manages data of users, both registration/login data and their past scores

    Generated Questions API

    questions API

    Manages generation of questions from Wikidata

    Main window in which questions are shown and can be answered by the player. The latter can also see past scores.

    Generated Questions API

    In charge of generating the questions

    questions API

    In charge of generating the questions and validating the answer

    UsersAPI

    GenQuestsService

    Receives different petitions regarding the generation of questions and responds accordingly.

    question-service

    Receives different petitions regarding the generation of questions and validation of answers and responds accordingly.

    wikibase-sdk

    --++++ - - - - - - - - - - - - - - - - - - - - - + - - + + + + - -

    Constraints

    Explanation

    Title

    Web Server Platform: A Comprehensive Overview

    Context

    Choosing the right web server platform involves balancing technical requirements, stakeholder preferences, user considerations, and project constraints. It’s a critical decision that impacts performance, security, user experience, and project success. Achieving alignment across these factors is essential for making an informed choice.

    Decision

    Oracle Cloud

    Status

    Proposed

    Consequences

    We need to suppoort the web application with the leasr cost possible

    What we have to decideOptions/Proposals - ReasoningStatusDecision - Reasoning
    - ---- + - - - - - - - - - - - - - - - - - - + + + + - - + + + +

    Constraints

    Explanation

    Title

    FrontEnd: What users see

    Context

    Choosing the right web server platform involves balancing technical requirements, stakeholder preferences, user considerations, and project constraints. It’s a critical decision that impacts performance, security, user experience, and project success. Achieving alignment across these factors is essential for making an informed choice.

    Decision

    JavaScript and React

    Status

    Proposed

    Which cloud service provider to use for deploying the webapp

    Oracle Cloud - We have access to a VM with this provider with 24/7 free activity

    Decided

    Oracle Cloud - All advantages

    Consequences

    It is important that the developers are used or can get used to the proposed lenguage with ease so its easier to mantain the code and for future developers to understand it.

    Which technologies are we going to use for developing the front end

    React - It is a modern framework which is easy to learn and provides usefull predefined components that save time

    Decided

    React - We have a reference already implemented and its capabilities are what we need

    @@ -2128,7 +2062,7 @@

    11. Risks and Technical Debts

    -Risk +Risk/Technical debt Why it exists Severity - Explanation Possible solutions