Skip to content

Commit

Permalink
Merge pull request #312 from Arquisoft/develop
Browse files Browse the repository at this point in the history
añados cambios de develop
  • Loading branch information
bidof authored Apr 30, 2024
2 parents abcbe93 + 226d5c4 commit 823899b
Show file tree
Hide file tree
Showing 41 changed files with 389 additions and 199 deletions.
Binary file added docs/images/AChecker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/IndexAccesibility.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Level1-.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Level2-History-.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Level2-Question-.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Level2-Users-.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/TestCarga.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/coverage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/coverageOverview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/e2eTests.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/level1.png
Binary file not shown.
Binary file removed docs/images/level2-History.png
Binary file not shown.
Binary file removed docs/images/level2-Question.png
Binary file not shown.
Binary file removed docs/images/level2-Users.png
Binary file not shown.
Binary file modified docs/images/scopeAndContext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ include::src/10_quality_requirements.adoc[]
// 11. Technical Risks
include::src/11_technical_risks.adoc[]

<<<<
// 12. Tests Results
include::src/13_tests.adoc[]

<<<<
// 12. Glossary
include::src/12_glossary.adoc[]

<<<<
// 13. Appendix Testing Results
include::src/13_tests.adoc[]

<<<<
// 14. Appendix Accesibility Results
include::src/14_accesibility.adoc[]
36 changes: 18 additions & 18 deletions docs/src/05_building_block_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ ifndef::imagesdir[:imagesdir: ../images]
[[section-building-block-view]]


== Building Block View (In progress)
== Building Block View

image::scopeAndContext.png["Scope and Context"]

=== Whitebox WIQ

image::level1.png["Level 1"]
image::Level1-.png["Level 1"]

Motivation::

Expand All @@ -21,13 +21,13 @@ Contained Building Blocks::
[cols="1,2" options="header"]
|===
| **Name** | **Responsibility**
| Webapp | Provides the interface to register, play and check participation history
| Gateway service | Facilitates communication between the different ports of the application
| Authservice | Allows a user to create an account in our application
| Userservice | Allows a user to access our application to play and view their history
| Roomservice | Service that handles multiplayer gaming in rooms
| Historyservice | Service that is responsible for saving and returning the history of user games
| Questionservice | It calls the Wikidata API using queries to retrieve questions, then stores them in the database. Additionally, it retrieves questions from the database when needed.
| Webapp | Provides the interface to do everything necessary in the application, sign in, sign up, sign out, play the different game modes, view the history and the ranking of the daily questions
| Gateway service | The API Gateway is a server that handles many functionalities in a single place for the clients to interact. In also works as a reverse proxy between your client applications and the back-end microservices architecture.
| Authservice | Microservice that is responsible of checking the credentials of the user who wants to log in and storing the last game of the daily question for the correct operation of that game mode
| Userservice | Microservice that is responsible to check the correct validity of the data entered by the user and add the user if everything is correct
| Roomservice | Microservice that is responsible to manage the questions in the room, the users and the rooms.
| Historyservice | Microservice that is responsible for saving and returning the history of user games, update the user daily question history and return a ranking of the daily history.
| Questionservice | Microservice that is responsible to generate the different Wikidata questions through an automatic generation using Wikidata, returns the generated questions from the database and generates the daily question.
| Databases | Stores information about users, games, questions and history
|===

Expand All @@ -36,35 +36,35 @@ Contained Building Blocks::

==== White Box Users Services

image::level2-Users.png["Level 2 Users Services"]
image::Level2-Users-.png["Level 2 Users Services"]

[cols="1,2" options="header"]
|===
| **Name** | **Responsibility**
| authservice | The authentication service validates user credentials by verifying their existence in the database and ensuring the correctness of the provided password.
| userservice | The registration service validates user registration details by checking the uniqueness of the email and username in the database, as well as verifying the format and correctness of the provided password, ensuring it matches the repeated entry.
| userdb | The user database stores user information, including their email, username, and hashed password. Each user have their credentials securely stored for authentication purposes.
| authservice | Exposes API endpoints that enable the authentication of a user by verifying their existence in the database and ensuring the correctness of the provided password and update the date of the last daily game.
| userservice | Exposes API endpoint that enable the registration of a user. It validates user registration details by checking the uniqueness of the email and username in the database, as well as verifying the format and correctness of the provided password, ensuring it matches the repeated entry.
| userdb | The user database stores user information, including their email, username, hashed password and the last day the user played the daily. Each user have their credentials securely stored for authentication purposes.
|===

==== White Box Questionservice

image::level2-Question.png["Level 2 Questionservice"]
image::Level2-Question-.png["Level 2 Questionservice"]

[cols="1,2" options="header"]
|===
| **Name** | **Responsibility**
| questionservice | The questionservice automatically generates questions by making a call to the Wikidata API, retrieving relevant information, and subsequently saving the generated question in the database. Additionally, it is responsible for providing questions tailored for each type of game available in the application.
| questionsdb | Database that stores the question along with their correct answer, the category to which the question belongs, the type of the question and the answers to those questions.
| questionservice | Exposes API endpoints that enable generate questions by making a call to the Wikidata, retrieving relevant information, and subsequently saving the generated question in the database. Additionally, it is responsible for providing questions tailored for each type of game available in the application.
| questionsdb | The questions database stores the question along with their correct answer, the category to which the question belongs, the type of the question and the answers to those questions.
|===

==== White Box Historyservice

image::level2-History.png["Level 2 Historyservice"]
image::Level2-History-.png["Level 2 Historyservice"]

[cols="1,2" options="header"]
|===
| **Name** | **Responsibility**
| historyservice | The historyservice is responsible for storing data for each normal game played and providing access to this data in two formats. It offers two types of data retrieval: one that returns all normal games played with their respective data, and another that returns the complete history, encompassing all data related to every game played.
| historyservice | Exposes API endpoints that enable the storage of data for each normal game played and providing access to this data in two formats. It offers two types of data retrieval: one that returns all normal games played with their respective data, and another that returns the complete history, encompassing all data related to every game played.
| historydb | The historydb stores user data and maintains a record of each normal game played. For every game, it saves essential details including the game number, the number of correct questions, the number of failed questions, the time taken to complete the game, and the date on which it was played.
|===

19 changes: 16 additions & 3 deletions docs/src/08_concepts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,30 @@ The user will either register in the application or log in if they have already
If they have played before, they will be able to view different metrics regarding those games.
Additionally, they can start a new game at any time and, upon completion, view the statistics of their results.

Here you can see the home page of our webapp.


=== Security & Safety
- Privacy: The data introduced will be private and not visible to other users.
- The password will be stored encrypted.


=== Architecture and design patterns
In development...
- The State pattern is a behavioral design pattern used to model situations where an object must change its behavior based on its internal state. Instead of having a single method that handles all possible actions, the State pattern divides actions into separate classes, each representing a different state. Each state class implements a common interface, allowing the main object to transition from one state to another without affecting its overall functionality.

Each state has its own logic and specific rules. The State pattern enables the game to dynamically adapt to the player’s current state.

- Microservices are an architectural and organizational approach to software development.
In our model, software is composed of small, independent services that communicate through well-defined APIs.

Each service is created for specific business capabilities and performs a single function.
This allows for independent updates, deployments, and scalability to meet the needs of specific features.

In summary, microservices offer a flexible and scalable way to build applications, enabling greater agility and accelerating time-to-market for new features .


=== Development concepts
In order to test the proper functioning of our application, we have implemented various types of tests, including unit tests, load tests, and end-to-end (E2E) tests.
Additionally, we have conducted different accessibility and maintenance tests to study its performance.

* Test: To test the correct operation of the system, we have decided to carry out unit tests for the application components as well as for the services.
Testing has been carried out on the gateway-service, user_service microservice and the game webapp component.
Testing has been carried out on the gateway-service, user-service, history-service, auth-service and room-service microservices and the game webapp component.
27 changes: 21 additions & 6 deletions docs/src/11_technical_risks.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,27 @@ TO-DO
|===
|Technical Debt |Description

|Space 1.1
|Space 1.2
|Improve multiplayer gamemode
|There are some multiplayer aspects that can be improved such as functionallity and performance

|Space 2.1
|Space 2.2
|White label in login and register
|In the register and login area the label of the inputs can´t be put in white to contrast in the dark mode

|Space 3.1
|Space 3.2
|Some bugs in diverse gamemodes
|Some of the game modes have minor bugs that need to be deeply tested

|Improve ranking
|Make a ranking for each game mode or some idea similar

|Fullfill coverage
|We have the coverage around 80% so try to ascend that to 100%

|Fix the security hotspots
|Sonar Cloud mark diverse security hotspots so we could try to fix them

|Color change and language buttons frozen
|When in game we were forced to block those buttons because if you change them it restarted the timer and questions in game

|More languages
|At the moment we only have spanish and english translations so adding more languages is a good idea
|===
Loading

0 comments on commit 823899b

Please sign in to comment.