diff --git a/docs/images/05-Level1.png b/docs/images/05-Level1.png new file mode 100644 index 00000000..1a44e7e8 Binary files /dev/null and b/docs/images/05-Level1.png differ diff --git a/docs/images/05-Level1.svg b/docs/images/05-Level1.svg deleted file mode 100644 index 433f0b86..00000000 --- a/docs/images/05-Level1.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
Webapp
Webapp
MongoDB
MongoDB
Wikidata
Wikidata
Gateway service
Gateway servi...
Question service
Question serv...
Stats service%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Webapp%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22435%22%20y%3D%22420%22%20width%3D%22100%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Stats service...
User service
User service
Auth service

Auth service
Grafana
Grafana
Prometheus
Prometheus
Whitebox WIQ
Whitebox WIQ
User

User
Text
Text
Text
Text
interacts
interacts
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-friends.png b/docs/images/06-friends.png new file mode 100644 index 00000000..118dd1e8 Binary files /dev/null and b/docs/images/06-friends.png differ diff --git a/docs/images/06-friends.svg b/docs/images/06-friends.svg deleted file mode 100644 index 5bb2d482..00000000 --- a/docs/images/06-friends.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses ranking button
presses ranking button
Friends successfuly retrieved. 
Friends is shown.
Friends successfuly retrieved....
fetch('/friends')
fetch('/friends...
axios.post('/friends')
axios.post('/fr...
friends response (JSON)
friends response (JSON)
response
response
User service
User service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-groups.png b/docs/images/06-groups.png new file mode 100644 index 00000000..8330cd13 Binary files /dev/null and b/docs/images/06-groups.png differ diff --git a/docs/images/06-groups.svg b/docs/images/06-groups.svg deleted file mode 100644 index ab30d696..00000000 --- a/docs/images/06-groups.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses users button
presses users button
Group list successfuly retrieved. 
Group list is shown.
Group list successfuly retrieved....
fetch('/group/list')
fetch('/group/l...
axios.post('/group/list')
axios.post('/gr...
friends response (JSON)
friends response (JSON)
response
response
User service
User service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-history.png b/docs/images/06-history.png new file mode 100644 index 00000000..bab6ab48 Binary files /dev/null and b/docs/images/06-history.png differ diff --git a/docs/images/06-history.svg b/docs/images/06-history.svg deleted file mode 100644 index ddca3b3e..00000000 --- a/docs/images/06-history.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses a gamemode button
presses a gamemode button
User stats successfuly retrieved. 
Stats view is shown
User stats successfuly retrieved....
fetch('/userInfo')
fetch('/userInf...
axios.post('/userInfo')
axios.post('/us...
history response (JSON)
history response (JSON)
response
response
Stats service
Stats service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-ranking.png b/docs/images/06-ranking.png new file mode 100644 index 00000000..afa59984 Binary files /dev/null and b/docs/images/06-ranking.png differ diff --git a/docs/images/06-ranking.svg b/docs/images/06-ranking.svg deleted file mode 100644 index 3a9c955f..00000000 --- a/docs/images/06-ranking.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses a gamemode button
presses a gamemode button
Ranking successfuly retrieved. 
Ranking is shown.
Ranking successfuly retrieved....
fetch('/ranking')
fetch('/ranking...
axios.post('/ranking')
axios.post('/ra...
ranking response (JSON)
ranking response (JSON)
response
response
Stats service
Stats service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-stats.png b/docs/images/06-stats.png new file mode 100644 index 00000000..df8ef661 Binary files /dev/null and b/docs/images/06-stats.png differ diff --git a/docs/images/06-stats.svg b/docs/images/06-stats.svg deleted file mode 100644 index 502d14a7..00000000 --- a/docs/images/06-stats.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses a gamemode button
presses a gamemode button
User stats successfuly retrieved. 
Stats view is shown
User stats successfuly retrieved....
fetch('/stats')
fetch('/stats')
axios.post('/stats')
axios.post('/st...
stasts response (JSON)
stasts response (JSON)
response
response
Stats service
Stats service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-users.png b/docs/images/06-users.png new file mode 100644 index 00000000..58592795 Binary files /dev/null and b/docs/images/06-users.png differ diff --git a/docs/images/06-users.svg b/docs/images/06-users.svg deleted file mode 100644 index 6bebc3af..00000000 --- a/docs/images/06-users.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses friends button
presses friends button
Non-friend users successfuly retrieved. 
Non-friend users is shown.
Non-friend users successfuly retrieved....
fetch('/users/search')
fetch('/users/s...
axios.post('/users/search')
axios.post('/us...
friends response (JSON)
friends response (JSON)
response
response
User service
User service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/12-activeusers.png b/docs/images/12-activeusers.png new file mode 100644 index 00000000..a10a3227 Binary files /dev/null and b/docs/images/12-activeusers.png differ diff --git a/docs/images/12-responsenumbers.png b/docs/images/12-responsenumbers.png new file mode 100644 index 00000000..47106ea0 Binary files /dev/null and b/docs/images/12-responsenumbers.png differ diff --git a/docs/images/12-responsespersecond.png b/docs/images/12-responsespersecond.png new file mode 100644 index 00000000..2ae60451 Binary files /dev/null and b/docs/images/12-responsespersecond.png differ diff --git a/docs/images/12-responsetime.png b/docs/images/12-responsetime.png new file mode 100644 index 00000000..91f1b280 Binary files /dev/null and b/docs/images/12-responsetime.png differ diff --git a/docs/images/WIQ-logo.png b/docs/images/WIQ-logo.png new file mode 100644 index 00000000..d9b9282f Binary files /dev/null and b/docs/images/WIQ-logo.png differ diff --git a/docs/index.adoc b/docs/index.adoc index 88904767..2bef3325 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -6,7 +6,7 @@ // configure EN settings for asciidoc include::src/config.adoc[] -= image:arc42-logo.png[arc42] WIQ! Documentation += image:WIQ-logo.png[WIQ] Documentation :revnumber: 8.2 EN :revdate: January 2023 :revremark: (based upon AsciiDoc version) @@ -28,23 +28,9 @@ ifdef::backend-html5[] ++++ endif::backend-html5[] - -include::src/about-arc42.adoc[] - // horizontal line *** -[role="arc42help"] -**** -[NOTE] -==== -This version of the template contains some help and explanations. -It is used for familiarization with arc42 and the understanding of the concepts. -For documentation of your own system you use better the _plain_ version. -==== -**** - - // numbering from here on :numbered: diff --git a/docs/src/01_introduction_and_goals.adoc b/docs/src/01_introduction_and_goals.adoc index b4e0acc0..309dae04 100644 --- a/docs/src/01_introduction_and_goals.adoc +++ b/docs/src/01_introduction_and_goals.adoc @@ -3,8 +3,8 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-introduction-and-goals]] == Introduction and Goals -WIQ! is a project developed for the subject "Software Architecture" of the Computer Engineering degree of the School of Computer Engineering of the University of Oviedo. This project is based on the wiq project, made available to the students by the teachers of the subject. -WIQ! has been commissioned to the company HappySw by RTVE, with the aim of recreating its famous quiz show Saber y ganar in a web version accessible to everyone. This project will be carried out by the development team is formed by: +WIQ is a project developed for the subject "Software Architecture" of the Computer Engineering degree of the School of Computer Engineering of the University of Oviedo. This project is based on the wiq project, made available to the students by the teachers of the subject. +WIQ! has been commissioned to the company HappySw by RTVE, with the aim of recreating its famous quiz show Saber y ganar in a web version accessible to everyone. This project will be carried out by the development team, which is formed by: * Martín Cancio Barrera, mailto:UO287561@uniovi.es[_UO287561_]. @@ -12,15 +12,13 @@ WIQ! has been commissioned to the company HappySw by RTVE, with the aim of recre * Rodrigo García Iglesias, mailto:UO276396@uniovi.es[_UO276396_]. -* Alfredo Jirout Cid, mailto:UO288443@uniovi.es[_UO288443_]. - WIQ! is a software by means of which users can emulate being the participants of the quiz show Saber y ganar, which has numerous functionalities: * Play several of the game modes seen on the show. * Register to be able to keep track of their statistics in the game -* Play with friends +* Have friends, join groups and see the statistics of the other users. * Adjust the themes of the questions, the answer time, the number of questions... *** @@ -61,7 +59,7 @@ WIQ! is a software by means of which users can emulate being the participants of |Role/Name|Contact|Expectations | *_Students (HappySw)_* -| Martín Cancio Barrera, Iyán Fernández Riol, Rodrigo García Iglesias and Alfredo Jirout Cid +| Martín Cancio Barrera, Iyán Fernández Riol and Rodrigo García Iglesias | The students are the developers of the application. They are in charge of the complete development, which will improve their programming and teamwork skills. | *_Users_* diff --git a/docs/src/02_architecture_constraints.adoc b/docs/src/02_architecture_constraints.adoc index 96e90792..ab10d1cb 100644 --- a/docs/src/02_architecture_constraints.adoc +++ b/docs/src/02_architecture_constraints.adoc @@ -10,8 +10,6 @@ ifndef::imagesdir[:imagesdir: ../images] | *_Implementation Platform_* | The application must be implemented on a web hosting platform that meets RTVE's performance, security and scalability requirements. -| *_Privacy Compliance_* | The architecture must ensure compliance with data privacy regulations, such as GDPR, to protect users' information. - | *_Code Maintainability_* | Software development practices that promote clean and well-documented code should be followed to facilitate future upgrades and maintenance. | *_Development Time_* | The application must be developed within a specific time frame, which may influence architectural decisions and technology selection. diff --git a/docs/src/04_solution_strategy.adoc b/docs/src/04_solution_strategy.adoc index 92047afe..27dd008b 100644 --- a/docs/src/04_solution_strategy.adoc +++ b/docs/src/04_solution_strategy.adoc @@ -7,12 +7,16 @@ We developed an application in which users can register to play, where in each g A ranking with the maximum score of the user and can be compared with other users, it will also have a section that indicates their correct guess and in which category they get the most questions right. .Technologies used to carry out: - +* JavaScript: JavaScript is a very flexible programming language widely used in software development. It incorporates many features that makes this development easy and effective, such as asynchronous functions, libraries, etc. This is the language that will be used to create front-end and back-end on our application. +* Node.js: Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It's used to create server-side applications, and it's the runtime that will be used to create the back-end of our application. * MongoDB: MongoDB is an open-source NoSQL database that uses a document-based data model for information storage and retrieval. * React JS: It's a framework created by Facebook that's widely used to create user interface components. Chosen for the large volume of documentation and the fact that it is the framework used during the previous courses. * Chakra UI: It's a simple, modular and accessible component library that gives us the ability to create a responsive and accessible design. * WikiData: It's a free knowledge base modified by humans as well as machines, and it's where we'll get our questions from. * Microsoft Azure: A cloud computing platform that provides infrastructure, platform, and software-as-a-service services to host, manage, and scale online applications and services. +* GitHub: It's a platform that provides hosting for software development and version control using Git. It's where we'll host our code and collaborate with the team. +* Github Actions: It's a CI/CD tool that automates the process of building, testing, and deploying code. It's where we'll automate the process of testing and deploying our application in Azure Cloud. +* Asciidoc: It's a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages. We'll use it to document our project. === Design The designed website is composed of a frontend in React, a backend in Node.js and is documented using Asciidoc. Each user will have their own account where their information will be saved. Design-related decisions are detailed in point 9. diff --git a/docs/src/05_building_block_view.adoc b/docs/src/05_building_block_view.adoc index 4cef4c33..416bf44c 100644 --- a/docs/src/05_building_block_view.adoc +++ b/docs/src/05_building_block_view.adoc @@ -48,12 +48,7 @@ The system is divided into nine components, each of which is responsible for a s === Level 2 -image::diagrama5.2.png["Hierarchy of building blocks"] - -.Motivation - -In this diagram we can see the decided microservices that will provide all the operations necessary for the -application to work properly. +In this level, the components are divided into smaller components, which are responsible for specific tasks. We'll take a closer look to some of the most important components, which are question service, and webapp. ==== Question Service diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index 337892d7..0b1246f1 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -27,34 +27,34 @@ image::06-play.svg[] User can see his stats by pressing stats button. It shows things such as games played, average score, total score, total correct questions, total incorrect questions, correct answer ratio or average time per question. -image::06-stats.svg[] +image::06-stats.png[] === User looks his game history User can see his game history by pressing history button. It shows a list of games played, with answered questions. -image::06-history.svg[] +image::06-history.png[] === User looks at ranking User can see the ranking of the users. This ranking can be filtered by average points, total points, correct answer ratio or average time. -image::06-ranking.svg[] +image::06-ranking.png[] === User checks his friends User can see his friends. He can also get into their profile to see their stats. -image::06-friends.svg[] +image::06-friends.png[] === User looks for users to be friends User can see a list of non-friends users. He can send a friend request to them. -image::06-users.svg[] +image::06-users.png[] === User looks for available groups to join User can see a list of available groups to join. He can send a request to join them. -image::06-groups.svg[] +image::06-groups.png[] diff --git a/docs/src/10_quality_requirements.adoc b/docs/src/10_quality_requirements.adoc index c775e2b4..084524ee 100644 --- a/docs/src/10_quality_requirements.adoc +++ b/docs/src/10_quality_requirements.adoc @@ -35,6 +35,7 @@ These are: | Performance |User |While playing, a user selects a response to a question.|User Interface|Normal gameplay conditions.|The system updates its interface very fast and the user knows if they responded correctly, so they can keep playing.|Interface update time is less than 0.5 seconds. | Usability |User|A new user starts playing the game.|User Interface|Initial game setup.|The user interface displays available options and provides clear instructions on how to play, including a 'Help' button.|User can navigate through the interface without guidance. | Performance |User|A user finishes playing a game and wants to start a new one.|System and User Interface|Post-game completion.|The system ends the current game, displays the user's score, resets all game elements, and offers the option to start a new game.|Score is saved accurately, and game restarts without errors. +| Performance |User|A user finishes playing a game and wants to see his stats.|System, User Interface, Stats Service |Stats retrieving.|The user presses the Stats button, and his stats are shown in the screen, giving him the option to switch between gamemodes.|Stats are shown correctly, including last game. |=== diff --git a/docs/src/12_testing.adoc b/docs/src/12_testing.adoc index 001bd6e9..8a871e04 100644 --- a/docs/src/12_testing.adoc +++ b/docs/src/12_testing.adoc @@ -95,6 +95,14 @@ Using this script we inject 2 users per second during 60 seconds in total, and e image::12-loadtests.png[] +image::12-activeusers.png[] + +image::12-responsetime.png[] + +image::12-responsenumbers.png[] + +image::12-responsespersecond.png[] + image::12-grafana-loadtests.png[] As we can see in Gatling's report, the application was able to handle a load of 9990 requests. In particular, 97% of the requests were successful in less than 800 milliseconds and 3% were unsuccessful.