Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Añadir cambios de documentacion a master #153

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/images/07-infrastructure.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 modified docs/images/BuildingBlockLevel1.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 modified docs/images/WhiteboxOverallSystem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions docs/src/01_introduction_and_goals.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ The project is a quizz game based on the Spanish TV show "Saber y ganar", the us
* Accesible through the web
* Historical data of a user will be saved on that user's account
* Questions have a time limit to be answered
* Possible answer will be given to the user, only one of them being correct
* Information about users and questions will be obtained through API's
* Modo multijugador y modo individual
* Se habilitarán salas de juego en tiempo real para el modo multijugador
* Possible answers will be given to the user, only one of them being correct
* Information about users and questions will be obtained through APIs
* There will be both an individual and a multiplayer mode
* Real time game rooms will be created for the multiplayer mode


=== Quality Goals
Expand All @@ -26,9 +26,9 @@ The project is a quizz game based on the Spanish TV show "Saber y ganar", the us
[options="header",cols="1,2,2"]
|===
|Code|Quality Goal|Scenario
|QG1[[QG1]]|Usability|The user can easily navigate through the app and find the information they need
|QG1[[QG1]]|Usability|Users can easily navigate through the app and find the information they need
|QG2[[QG2]]|Performance|The app should be able to handle a large amount of users at the same time
|QG3[[QG3]]|Mantainability|The game should be easy to update in order to add functianlities
|QG3[[QG3]]|Mantainability|The game should be easy to update in order to add new functionalities
|===


Expand All @@ -37,8 +37,8 @@ The project is a quizz game based on the Spanish TV show "Saber y ganar", the us
[options="header"]
|===
|Role/Name|Contact|Expectations
| _Wikidata_ | _Wikidata.org_ | _Public exposure by the use of their services deriving in a greater demand of said services_
| _Uniovi's Software Architecture Teacher council_ | | _Provide their students (development team) with a practical experience about the use of Software architecture in projects and making sure the have understood the concepts of it_
| _Wikidata_ | _Wikidata.org_ | _Public exposure by the use of their services deriving in a greater demand for said services_
| _Uniovi's Software Architecture Teacher council_ | | _Provide their students (development team) with a practical experience about the use of software architecture in projects and making sure the have understood the its concepts_
|_Development Team_||_Acquire experience in the development process of Software Architecture and pass the subject to complete their studies_
|_Users_|_Anyone who uses the app_|_Test their knowledge on a functional and easy to use quizz game app_
|_Users_|_Anyone who uses the app_|_Test their knowledge through a functional and easy-to-use quizz game app_
|===
14 changes: 7 additions & 7 deletions docs/src/02_architecture_constraints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ ifndef::imagesdir[:imagesdir: ../images]
[[section-architecture-constraints]]
== Architecture Constraints

When designing the WIQ Application there are several constraints that must be taken into consideration, as they will have a large impact on the final application. These requirements that we must follow, will ensure that the final product meets the needs and expectations of final users and stakeholders.
The following table summarizes these constraints and provides a brief explanation of each.
When designing the WIQ Application there are several constraints that must be taken into consideration, as they will have a large impact on the final application. These requirements that we must follow will ensure that the final product meets the needs and expectations of final users and stakeholders.
The following table summarizes these constraints and provides a brief explanation of each one of them.

[options="header", cols="1,1"]

|===
| Constraint | Explanation
| Use of Wikidata | Wikidata is a collaborative, multilingual knowledge base that provides the required information to popular websites as Wikipedia. Wikidata houses information about a wide range of entities, such as people, places, and concepts, using a linked and interconnected data model. The project will have to generate questions and responses to those questions automatically, and for this task, Wikidata can be very useful.
| Use of Wikidata | Wikidata is a collaborative, multilingual knowledge base that provides the required information to popular websites such as Wikipedia. Wikidata houses information about a wide range of entities, such as people, places, and concepts, using a linked and interconnected data model. The project will have to generate questions and responses to those questions automatically, and for this task, Wikidata can be very useful.

| Version control and monitoring (GitHub) | GitHub and Git will be very valuable for the application, facilitating version control and team collaboration during project development. It enables the coordination and management of the development workflow, while also monitoring the modifications and contributions made by individual team members.
| Version control and monitoring (GitHub) | GitHub and Git will be very valuable for the application, facilitating version control and team collaboration throughout project development. This will enable the coordination and management of the development workflow, while also monitoring the modifications and contributions made by individual team members.

| User Experience | The design of the application must make its use friendly and easy.
| User Experience | The design of the application must make it user-friendly and easy to understand.

| Deployment | The application must be deployed.

Expand All @@ -23,13 +23,13 @@ The following table summarizes these constraints and provides a brief explanatio

=== Recommended technologies to take into account

The application must be a full stack application consisting of a web app and a server. These are some technologies mentioned to provide a clear understanding of this application and how it works. These are not considered constraints because they were not imposed, but they should be present in this section due to the impact they have on the project.
The application must be a full-stack application consisting of a web app and a server. These are some technologies mentioned to provide a clear understanding of this application and how it works. These are not considered constraints because they were not imposed, but they should be present in this section due to the impact they have on the project.

[options="header", cols="1,1"]

|===
| Technology | Explanation
| React | Description: React is a JavaScript library for building user interfaces with a component-based architecture. It promotes a declarative approach and utilizes a virtual DOM for efficient UI updates.
| React | Description: React is a JavaScript library for building user interfaces with a component-based architecture. It promotes a declarative approach and uses a virtual DOM for efficient UI updates.

Fit for the application: React's component-based structure is ideal for creating reusable UI elements, aligning well with the modular nature of a trivia app. The virtual DOM enhances performance in real-time scenarios.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/03_system_scope_and_context.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ image::businessContext.png[Bussiness Context, 600, 400]

.Explanation of the Diagram

The diagram shows the main 4 services the user interacts with.
The diagram shows the 4 main services the user interacts with.

Login and validation of answers are handled by external services, such as *Google* and *WikiData*.

Expand All @@ -26,7 +26,7 @@ image::technicalDiagram.png[Technical Diagram, 600, 400]
.Explanation of the Diagram


The application will be deployed on an Azure Server. It will consist of the following:
The application will be deployed on an Azure Server. It will work as follows:

The client communicates with the web app, the front-end of the application. Developed with *React* and *JavaScript*, this application retrieves information from the server, interacting with the *Gateway*.

Expand Down
18 changes: 9 additions & 9 deletions docs/src/04_solution_strategy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ This section aims to describe the strategies decided by the team.
=== Technologies
The following list names the technologies selected:

- *TypeScript:* free and open-source high-level programming languaage deriving from JavaScript. The former provides tools that JavaScript does not. It will be used to program the client part of the application.
- *React:* free and open-source front-end JavaScript library for building user interfaces based in components. It allows building complex interfaces in a simpler way, being flexible and easy to maintain.
- *MongoDB:* non-relational document database that provides support for JSON-like storage. It has drivers for major programming languages and development environments.
- *NodeJS:* cross-platform, opens-source JavaScript library for the server layer that provides the tools to implement the application. It has a large and active community that may be usefull in difficult times.
- *ExpressJS:* nodejs web application framework that provides a robust set of features for web and mobile applications.
- *Wikidata Query Service:* Wikimedia implementation of SPARQL server to service queries for Wikidata and other data sets.
- *Socket.io:* A javascript library that enables real-time communication between client and server through objects called sockets. These objects can broadcast events asynchronously, and can be caught by other sockets to perform different operations. This library is used in the multiplayer service, to allow the players to connect to a game lobby, and compete between each other answering questions.
- *TypeScript:* free and open-source high-level programming language that acts as a superset of JavaScript. The former provides tools that JavaScript does not. It will be used to code the client-side part of the application.
- *React:* free and open-source front-end JavaScript library for building component-based user interfaces. It allows building complex interfaces in a simpler way, being flexible and easy to maintain.
- *MongoDB:* non-relational document database that provides support for JSON-like storage. It has drivers for all major programming languages and development environments.
- *NodeJS:* cross-platform, open-source JavaScript library for the server-side part of the application that provides the tools to implement it. It has a large and active community that may be useful if doubts or errors arise.
- *ExpressJS:* Node.js web application framework that provides a robust set of features for web and mobile applications.
- *Wikidata Query Service:* Wikimedia implementation of SPARQL server to service queries from Wikidata and other data sets.
- *Socket.io:* A JavaScript library that enables real-time communication between client and server through objects called sockets. These objects can broadcast events asynchronously, and can be caught by other sockets to perform different operations. This library is used in the multiplayer service, to allow the players to connect to a game lobby and compete among each other answering questions.

=== Organizational
- *Weekly meetings:* to maintain a well communicated team so all are aware of the decissions and team progress.
- *Github:* use of issues, pull request, discussions and other tools that Github offers.
- *Weekly meetings:* to maintain good communication so all team members are aware of the current decissions and progress.
- *Github:* use of issues, pull requests, discussions and other tools offered.
22 changes: 11 additions & 11 deletions docs/src/05_building_block_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ image::WhiteboxOverallSystem.png["Overview Diagram"]

Motivation::

*Conocer y vencer* is an aplication that generates questions using data from wikidata so the user can play a game like Saber y Ganar.
*Conocer y vencer* is an aplication that generates questions using data from Wikidata to deliver a Saber-y-Ganar-like game.


Contained Building Blocks::
[Attributes]
|===
|*Name* |*Description*

|Saber y conocer |Aplication based on microservices for the user to interact with and play the game
|Wikidata |Public Data based used to generate questions for the game
|Saber y conocer |Microservices-based application that lets the user play a Q&A game.
|Wikidata |Public database used to generate questions for the game
|===


Expand All @@ -36,11 +36,11 @@ image::BuildingBlockLevel1.png["Level 2 Diagram"]

==== Webapp

Interface for the user to interact with the game and the diferent functionalities of the aplication. Each of the services have its own easy to use interface.
Interface for the user to interact with the game and the diferent functionalities of the aplication. Each of the services has its own user-friendly interface.

==== Microservices

Components of the application, that have the logic of the game and interact with external services (such as Wikidata and Mongodb). There are several microservices, one for each of the functionalities of the game.
Components of the application that deliver the logic of the game and interact with external services (such as Wikidata and MongoDB). There are several microservices, one for each of the functionalities of the game.



Expand All @@ -50,24 +50,24 @@ image::BuildingBlockLevel2.png["Level 3 Diagram"]

==== Authentification service

Service in charge of create new users in the database
Service in charge of the creation of new users in the database.

==== User service

Service in charge of safe and retrieve the data of a user from the database.
Service in charge of saving and retrieving the data corresponding to a user from the database.

==== Multiplayer

Service in charge of multiplayer rooms, the webapp comunicate directly to this service, without using the gateway.
Service in charge of the multiplayer mode rooms. The webapp comunicates directly with this service without using the gateway in the process.

==== Group Service

Service in charge of manage groups composed of multiple users.
Service in charge of managing groups composed of multiple users.

==== Game Service

Service in charge of the logic of the game, safe the information of the last game played by a user.
Service in charge of the logic of the game as well as saving the information of the last game played by a user.

==== Question Generation Service

Service in charge of generating the questions for the game using data from wikidata.
Service in charge of generating the questions for the game using data from Wikidata.
6 changes: 3 additions & 3 deletions docs/src/06_runtime_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ ifndef::imagesdir[:imagesdir: ../images]

== Runtime View

=== Interaction with the GroupService
=== Interaction with the Group Service

image::SequenceGroupService.png[SequenceGroupService, 600, 400]

=== Interaction with the Single Player Game
=== Interaction with the single player game

image::SequenceGame.png[SequenceGame, 600, 400]
=== Sing in
=== Sign in

image::SequenceSingup.png[SequenceSingup, 600, 400]

Expand Down
16 changes: 8 additions & 8 deletions docs/src/07_deployment_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ image::07-infrastructure.png[Deployment Diagram, 600, 400]

Motivation::

The above diagram represents the current architecture of the system. The system is divided in different services related to distinct functionalities. The application is working with multiples services, all of them are ran through docker containers in a virtual machine in Azure.
The above diagram represents the current system architecture. The system is divided into different services related to different functionalities. The application is working with multiples services, and all of them are ran through Docker containers in a virtual machine in Azure.

The deployment is automated through github actions, therefore when you make a release of a tag in the master branch of the repository, the application updates with the committed changes.
The deployment is automated through Github Actions, therefore when you make the release of a tag in the master branch of the repository, the application updates with the committed changes.

Quality and/or Performance Features::

The reasons for using a microservice infratructure are the failure isolation, if one of the service fails, is not necesary that the whole system goes down, the member teams can work on different microservices simultaneously and also each microservice can be written in a different programing language better suit for the task.
The reason for using a microservices-based infratructure is failure isolation: if one of the services fails, is not necesary for the whole system to go down. Also, team members can work on different microservices simultaneously and each microservice can be written in the programing language that best suits the task.

In this case, almost all the microservices communicate between each other through HTTP requests. But in the multiplayer service, a different type of communication is needed: Web sockets.
In this case, almost all microservices communicate with each other through HTTP requests. But in the multiplayer service, a different type of communication is needed: web sockets.

Web sockets is a communication protocol that allow server and client to send messages simultaneously without waiting for a response. This is very useful for real-time applications, like the multiplayer functionality.
Web sockets are a communication protocol that allows server and client to send messages simultaneously without waiting for a response. This is very useful for real-time applications, just like the multiplayer functionality.

Mapping of Building Blocks to Infrastructure::

Expand All @@ -32,10 +32,10 @@ Mapping of Building Blocks to Infrastructure::
|Web App| User interface to interact with the rest of the application.
|Gateway| Following the facade pattern, the gateway works as an interface that communicates the web app with the different services.
|MongoDB| Database to save the application's data.
|Authentication| Service for the authentification of the users.
|Authentication| Service for the authentification of users.
|Users| Service in charge of managing the users.
|Question Generation| This service retrieves information from Wikidata through SPARQL queries, and generates questions based on custom templates
|Question Generation| This service retrieves information from Wikidata through SPARQL queries, and generates questions based on custom templates.
|Game| Service to manage the logic of the game like the players and questions in a game.
|Groups| Service in charge of managing the groups.
|Multiplayer| Service in charge of the multiplayer functionality, this service uses web sockets, while the others use HTTP requests. Provides the real-time functionality for a multiplayer game.
|Multiplayer| Service in charge of the multiplayer functionality, this service uses web sockets, while the others use HTTP requests. Provides the real-time functionality for the multiplayer game mode.
|===
2 changes: 1 addition & 1 deletion docs/src/08_concepts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ifndef::imagesdir[:imagesdir: ../images]

=== BCrypt

Bcrypt is a specialized password-hashing library for securely storing passwords. It employs a key derivation function to hash passwords intentionally in a slow and computationally intensive manner. This design choice enhances security by significantly increasing resistance against brute-force attacks.
Bcrypt is a specialized password-hashing library for the secure storing of passwords. It employs a key derivation function to hash passwords intentionally in a slow and computationally intensive manner. This design choice enhances security by significantly increasing resistance against brute-force attacks.

|===
| Element | Description
Expand Down
2 changes: 1 addition & 1 deletion docs/src/09_architecture_decisions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ifndef::imagesdir[:imagesdir: ../images]
[[section-design-decisions]]
== Architecture Decisions

=== Database Selection for Our Application
=== Database selection for our application

In this application, we require a database to store information about users, groups, automatically generated questions, and how the user performs on those questions. In this section, we discuss why we chose to use a NoSQL database, specifically MongoDB, for this purpose, and explore the alternatives that we considered and rejected.

Expand Down