From 4bdca57fff01605affcef6cd58e1e58f674388d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fern=C3=A1ndez=20Noriega?= Date: Sun, 11 Feb 2024 16:42:18 +0100 Subject: [PATCH 01/10] Business context documentation deployed --- docs/src/03_system_scope_and_context.adoc | 68 ++++++++++++++--------- 1 file changed, 43 insertions(+), 25 deletions(-) diff --git a/docs/src/03_system_scope_and_context.adoc b/docs/src/03_system_scope_and_context.adoc index c528e90..340402a 100644 --- a/docs/src/03_system_scope_and_context.adoc +++ b/docs/src/03_system_scope_and_context.adoc @@ -48,28 +48,46 @@ The title of the table is the name of your system, the three columns contain the **** -**** - -**** - -=== Technical Context - -[role="arc42help"] -**** -.Contents -Technical interfaces (channels and transmission media) linking your system to its environment. In addition a mapping of domain specific input/output to the channels, i.e. an explanation which I/O uses which channel. - -.Motivation -Many stakeholders make architectural decision based on the technical interfaces between the system and its context. Especially infrastructure or hardware designers decide these technical interfaces. - -.Form -E.g. UML deployment diagram describing channels to neighboring systems, -together with a mapping table showing the relationships between channels and input/output. - -**** - -**** - -**** - -**** +[plantuml,"Context diagram",png] +---- +actor Player +actor Client +database MongoDB <> +[WIQ Game] <> +[Wikidata] <> +[UsersInfoAPI] <> +[GeneratedQuestionsAPI] <> +Player .> (WIQ Game) : login +Client ..> (UsersInfoAPI) +Client ..> (GeneratedQuestionsAPI) +MongoDB --> (UsersInfoAPI) +MongoDB --> (GeneratedQuestionsAPI) +[WIQ Game] <.> (Wikidata) : WikidataAPI +[WIQ Game] <--> (MongoDB) +---- + +[cols="e,2e" options="header"] +|=== +|Element |Description + +|Player +|Plays the game and can consult past scores + +|Client +|Can access the data about players and generated questions + +|WIQ Game +|Main system in which generated questions are shown and can be answered by players + +|Wikidata +|External data repository from which questions are generated using the WikidataAPI + +|MongoDB +|Database for storing generated questions, players' info and scores + +|Users Info API +|Allows clients to see the info about players stored in the database + +|Generated Questions API +|Allows clients to see the info about generated questions stored in the database +|=== \ No newline at end of file From 3b45b89b556d5fd2edcd10ed13b9f9f291ea16f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Cadenas?= Date: Thu, 15 Feb 2024 17:58:00 +0100 Subject: [PATCH 02/10] 1.1 Created + introduction --- docs/src/01_introduction_and_goals.adoc | 137 +++++++++++++++--------- 1 file changed, 87 insertions(+), 50 deletions(-) diff --git a/docs/src/01_introduction_and_goals.adoc b/docs/src/01_introduction_and_goals.adoc index ddb2ae3..587e6c0 100644 --- a/docs/src/01_introduction_and_goals.adoc +++ b/docs/src/01_introduction_and_goals.adoc @@ -3,65 +3,102 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-introduction-and-goals]] == Introduction and Goals -[role="arc42help"] -**** -Describes the relevant requirements and the driving forces that software architects and development team must consider. -These include - -* underlying business goals, -* essential features, -* essential functional requirements, -* quality goals for the architecture and -* relevant stakeholders and their expectations -**** +// [role="arc42help"] +// **** +// Describes the relevant requirements and the driving forces that software architects and development team must consider. +// These include + +// * underlying business goals, +// * essential features, +// * essential functional requirements, +// * quality goals for the architecture and +// * relevant stakeholders and their expectations +// **** +In this points, the main goals and functional requirements will be explained. In order to give context on how the webapp will be developed. === Requirements Overview -[role="arc42help"] -**** -.Contents -Short description of the functional requirements, driving forces, extract (or abstract) -of requirements. Link to (hopefully existing) requirements documents -(with version number and information where to find it). - -.Motivation -From the point of view of the end users a system is created or modified to -improve support of a business activity and/or improve the quality. - -.Form -Short textual description, probably in tabular use-case format. -If requirements documents exist this overview should refer to these documents. - -Keep these excerpts as short as possible. Balance readability of this document with potential redundancy w.r.t to requirements documents. - - -.Further Information - -See https://docs.arc42.org/section-1/[Introduction and Goals] in the arc42 documentation. - -**** - +// [role="arc42help"] +// **** +// .Contents +// Short description of the functional requirements, driving forces, extract (or abstract) +// of requirements. Link to (hopefully existing) requirements documents +// (with version number and information where to find it). + +// .Motivation +// From the point of view of the end users a system is created or modified to +// improve support of a business activity and/or improve the quality. + +// .Form +// Short textual description, probably in tabular use-case format. +// If requirements documents exist this overview should refer to these documents. + +// Keep these excerpts as short as possible. Balance readability of this document with potential redundancy w.r.t to requirements documents. + + +// .Further Information + +// See https://docs.arc42.org/section-1/[Introduction and Goals] in the arc42 documentation. + +// **** +The functional requirements have been grouped into the different microservices the web application will have. +==== User and Authorization Services +[decimal] +. The User service allows the user to +[arabic] +.. Register. +.. Delete the account. +.. Update the account. +.. Recover the password. +. The authorization service allows the user to +[arabic] +.. Log in. +.. Log out. +. A user can retrieve the following information from the User service +[arabic] +.. Name. +.. Email. +.. Profile picture. +.. Questions answered. +. The system must be able to manage the user's access to the system. + +==== Question Service +[decimal, start=5] +. The Question service retrieves questions generated from wikidata. +. A user can retrieve the following information from the Question service +[arabic] +.. Select a category. +.. Select a difficulty. +.. Select a question. +.. Select an answer. +. Questions must be stored in a database. +. The database used is MongoDB. +. Questions are classified by +[arabic] +.. Category. +.. Difficulty. +. The questions should be selected randomly. === Quality Goals -[role="arc42help"] -**** -.Contents -The top three (max five) quality goals for the architecture whose fulfillment is of highest importance to the major stakeholders. -We really mean quality goals for the architecture. Don't confuse them with project goals. -They are not necessarily identical. +// [role="arc42help"] +// **** +// .Contents +// The top three (max five) quality goals for the architecture whose fulfillment is of highest importance to the major stakeholders. +// We really mean quality goals for the architecture. Don't confuse them with project goals. +// They are not necessarily identical. -Consider this overview of potential topics (based upon the ISO 25010 standard): +// Consider this overview of potential topics (based upon the ISO 25010 standard): -image::01_2_iso-25010-topics-EN.drawio.png["Categories of Quality Requirements"] +// image::01_2_iso-25010-topics-EN.drawio.png["Categories of Quality Requirements"] -.Motivation -You should know the quality goals of your most important stakeholders, since they will influence fundamental architectural decisions. -Make sure to be very concrete about these qualities, avoid buzzwords. -If you as an architect do not know how the quality of your work will be judged... +// .Motivation +// You should know the quality goals of your most important stakeholders, since they will influence fundamental architectural decisions. +// Make sure to be very concrete about these qualities, avoid buzzwords. +// If you as an architect do not know how the quality of your work will be judged... -.Form -A table with quality goals and concrete scenarios, ordered by priorities -**** +// .Form +// A table with quality goals and concrete scenarios, ordered by priorities +// **** === Stakeholders From f8f2cbdbaa699d6c54b6b6a3c636d6ee7ca63ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Cadenas?= <77900120+andrrsin@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:34:19 +0100 Subject: [PATCH 03/10] Point 1.2 done --- .vscode/settings.json | 1 + docs/src/01_introduction_and_goals.adoc | 100 ++++++++++++++---------- 2 files changed, 58 insertions(+), 43 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/docs/src/01_introduction_and_goals.adoc b/docs/src/01_introduction_and_goals.adoc index 587e6c0..8a8206d 100644 --- a/docs/src/01_introduction_and_goals.adoc +++ b/docs/src/01_introduction_and_goals.adoc @@ -3,44 +3,44 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-introduction-and-goals]] == Introduction and Goals -// [role="arc42help"] -// **** -// Describes the relevant requirements and the driving forces that software architects and development team must consider. -// These include - -// * underlying business goals, -// * essential features, -// * essential functional requirements, -// * quality goals for the architecture and -// * relevant stakeholders and their expectations -// **** -In this points, the main goals and functional requirements will be explained. In order to give context on how the webapp will be developed. +[role="arc42help"] +**** +Describes the relevant requirements and the driving forces that software architects and development team must consider. +These include + +* underlying business goals, +* essential features, +* essential functional requirements, +* quality goals for the architecture and +* relevant stakeholders and their expectations +**** +In these points, the main goals and functional requirements will be explained. In order to give context on how the webapp will be developed. === Requirements Overview -// [role="arc42help"] -// **** -// .Contents -// Short description of the functional requirements, driving forces, extract (or abstract) -// of requirements. Link to (hopefully existing) requirements documents -// (with version number and information where to find it). +[role="arc42help"] +**** +.Contents +Short description of the functional requirements, driving forces, extract (or abstract) +of requirements. Link to (hopefully existing) requirements documents +(with version number and information where to find it). -// .Motivation -// From the point of view of the end users a system is created or modified to -// improve support of a business activity and/or improve the quality. +.Motivation +From the point of view of the end users a system is created or modified to +improve support of a business activity and/or improve the quality. -// .Form -// Short textual description, probably in tabular use-case format. -// If requirements documents exist this overview should refer to these documents. +.Form +Short textual description, probably in tabular use-case format. +If requirements documents exist this overview should refer to these documents. -// Keep these excerpts as short as possible. Balance readability of this document with potential redundancy w.r.t to requirements documents. +Keep these excerpts as short as possible. Balance readability of this document with potential redundancy w.r.t to requirements documents. -// .Further Information +.Further Information -// See https://docs.arc42.org/section-1/[Introduction and Goals] in the arc42 documentation. +See https://docs.arc42.org/section-1/[Introduction and Goals] in the arc42 documentation. -// **** +**** The functional requirements have been grouped into the different microservices the web application will have. ==== User and Authorization Services [decimal] @@ -80,25 +80,39 @@ The functional requirements have been grouped into the different microservices t . The questions should be selected randomly. === Quality Goals -// [role="arc42help"] -// **** -// .Contents -// The top three (max five) quality goals for the architecture whose fulfillment is of highest importance to the major stakeholders. -// We really mean quality goals for the architecture. Don't confuse them with project goals. -// They are not necessarily identical. +[role="arc42help"] +**** +.Contents +The top three (max five) quality goals for the architecture whose fulfillment is of highest importance to the major stakeholders. +We really mean quality goals for the architecture. Don't confuse them with project goals. +They are not necessarily identical. -// Consider this overview of potential topics (based upon the ISO 25010 standard): +Consider this overview of potential topics (based upon the ISO 25010 standard): -// image::01_2_iso-25010-topics-EN.drawio.png["Categories of Quality Requirements"] +image::01_2_iso-25010-topics-EN.drawio.png["Categories of Quality Requirements"] -// .Motivation -// You should know the quality goals of your most important stakeholders, since they will influence fundamental architectural decisions. -// Make sure to be very concrete about these qualities, avoid buzzwords. -// If you as an architect do not know how the quality of your work will be judged... +.Motivation +You should know the quality goals of your most important stakeholders, since they will influence fundamental architectural decisions. +Make sure to be very concrete about these qualities, avoid buzzwords. +If you as an architect do not know how the quality of your work will be judged... + +.Form +A table with quality goals and concrete scenarios, ordered by priorities +**** +[options="header", cols="1,1"] +|=== +| Goal | Description +| Testability |Test will be developed, so the application has a good quality. + +| Usability | The application has to be intuitive for its users. -// .Form -// A table with quality goals and concrete scenarios, ordered by priorities -// **** +| Portability | The application works in different devices and browsers. With different screen sizes. + +| Performance | The application can handle a big number of users and give good response times. + + + +|=== === Stakeholders From 9e1f6ca1b06d93270d565bd4e1b3de09296b408c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Cadenas?= <77900120+andrrsin@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:46:26 +0100 Subject: [PATCH 04/10] 10.1 added --- docs/src/10_quality_requirements.adoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/src/10_quality_requirements.adoc b/docs/src/10_quality_requirements.adoc index 68475e8..73042c3 100644 --- a/docs/src/10_quality_requirements.adoc +++ b/docs/src/10_quality_requirements.adoc @@ -45,7 +45,13 @@ In any case the tree should include links to the scenarios of the following sect **** - +@startmindmap +* Quality +** Testability +** Usability +** Portability +** Performance +@endmindmap === Quality Scenarios [role="arc42help"] From 41dba78e9f1d7fba95a35f2c6e83e2829dc75447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?adri=C3=A1n?= Date: Sat, 17 Feb 2024 20:09:04 +0100 Subject: [PATCH 05/10] 04_solution_strategy --- docs/src/04_solution_strategy.adoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/src/04_solution_strategy.adoc b/docs/src/04_solution_strategy.adoc index 7bf03f7..d0c35f4 100644 --- a/docs/src/04_solution_strategy.adoc +++ b/docs/src/04_solution_strategy.adoc @@ -2,7 +2,17 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-solution-strategy]] == Solution Strategy +The system will follow *MERN Stack* as they key technologies for its development. MERN Stack is composed of four technologies: MongoDB, Express, +React and Node. +* *MongoDB:* chosen technology for the persistance of the system, that provides a non-relational database approach. +* *Express and Node:* they make up the middle tier of the application, providing a powerful server platform. +* *React:* front-end framework that will solve the client interfaces of the application. + +Regarding the deployment of the application, the strategy chosen is a cloud-based system. This decision was motivated because of the nature of +the project, since a web application need to be live and accesible at any moment. +The server will be an ARM Linux virtual machine on Oracle, where some containers for different charasteristics of the system will be deployed with +Docker (MongoDB database for example) [role="arc42help"] **** From 8b9d3ee33bd686950c7d9746aa9445afd3699443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?adri=C3=A1n?= Date: Sat, 17 Feb 2024 20:58:26 +0100 Subject: [PATCH 06/10] solution strategy --- docs/src/04_solution_strategy.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/04_solution_strategy.adoc b/docs/src/04_solution_strategy.adoc index d0c35f4..68a269e 100644 --- a/docs/src/04_solution_strategy.adoc +++ b/docs/src/04_solution_strategy.adoc @@ -9,10 +9,10 @@ React and Node. * *Express and Node:* they make up the middle tier of the application, providing a powerful server platform. * *React:* front-end framework that will solve the client interfaces of the application. -Regarding the deployment of the application, the strategy chosen is a cloud-based system. This decision was motivated because of the nature of -the project, since a web application need to be live and accesible at any moment. -The server will be an ARM Linux virtual machine on Oracle, where some containers for different charasteristics of the system will be deployed with -Docker (MongoDB database for example) +Regarding the deployment of the application, the strategy chosen is a *cloud-based* system. This decision was motivated because of the nature of +the project, since a web application needs to be live and accesible at any moment. +The server will be an ARM *Linux VM on Oracle*, where some *containers* for different charasteristics of the system will be *deployed with +Docker* (MongoDB database for example) [role="arc42help"] **** From 6f42f44c72a3787f0566de193fbc3f594879b03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?adri=C3=A1n?= Date: Sat, 17 Feb 2024 21:10:10 +0100 Subject: [PATCH 07/10] added Solution Strategy --- docs/src/04_solution_strategy.adoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/src/04_solution_strategy.adoc b/docs/src/04_solution_strategy.adoc index 7bf03f7..68a269e 100644 --- a/docs/src/04_solution_strategy.adoc +++ b/docs/src/04_solution_strategy.adoc @@ -2,7 +2,17 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-solution-strategy]] == Solution Strategy +The system will follow *MERN Stack* as they key technologies for its development. MERN Stack is composed of four technologies: MongoDB, Express, +React and Node. +* *MongoDB:* chosen technology for the persistance of the system, that provides a non-relational database approach. +* *Express and Node:* they make up the middle tier of the application, providing a powerful server platform. +* *React:* front-end framework that will solve the client interfaces of the application. + +Regarding the deployment of the application, the strategy chosen is a *cloud-based* system. This decision was motivated because of the nature of +the project, since a web application needs to be live and accesible at any moment. +The server will be an ARM *Linux VM on Oracle*, where some *containers* for different charasteristics of the system will be *deployed with +Docker* (MongoDB database for example) [role="arc42help"] **** From 9a2afef62adab2aa931280c0ea5b1b9fe59bbe4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Cadenas?= <77900120+andrrsin@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:43:01 +0100 Subject: [PATCH 08/10] 10. done --- docs/src/10_quality_requirements.adoc | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docs/src/10_quality_requirements.adoc b/docs/src/10_quality_requirements.adoc index 73042c3..e81acbd 100644 --- a/docs/src/10_quality_requirements.adoc +++ b/docs/src/10_quality_requirements.adoc @@ -77,3 +77,46 @@ more precisely down to a level of scenarios that can be discussed and evaluated. .Form Tabular or free form text. **** +==== Usage Scenarios +[options="header", cols="1,1,1,1"] +|=== +| Quality goal | Motivation | Usage scenario | Priority + +| *Testability* +| Test will be developed, so the application has a good quality. +| The coverage should be higher than 70% and SonarCloud should give a pass in unit tests +| *High* + +| *Usability* +| The application has to be intuitive for its users. +| Users don't like to spend a lot of time trying to understand how to use an application. Therefore when they want to do something, they want to know where to go and what to do. +| *Very high* + +| *Portability* +| The application works in different devices and browsers. With different screen sizes. +| Users connect from different devices and browsers, we should ensure that the application works in all of them. +| *Medium* + +| *Performance* +| The application can handle a big number of users and give good response times. +| The application should be able to stand at least 10 users simultaneously and give a response time of less than 20 seconds. +| *High* + +|=== + +==== Change Scenarios + +[options="header", cols="1,1,1,1"] +|=== +| Quality goal | Motivation | Change scenario | Priority +| *Maintainability* +| An application should be easy to update and maintain by the dev team. Respecting the architecture of the web application and the continuous integration. +| If a developer wants to add a feauture or include a hotfix, he should be able to do it without major consequences on the system, always respecting the architecture of the web application. +| *High* + +| *Maintainability* +|An application should be easy to update and maintain by the dev team. Respecting the architecture of the web application. +| As there is continuous integration, when fixing a bug or adding a feature, if an error is found, the application won't be affected as changes won't be applied. +| *Very High* + +|=== \ No newline at end of file From b773d4c2d046a222dddd56b80a954e84c88a2714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fern=C3=A1ndez=20Noriega?= Date: Sun, 18 Feb 2024 17:21:10 +0100 Subject: [PATCH 09/10] Point 5 of the documentation written and point 3 updated --- docs/src/03_system_scope_and_context.adoc | 18 ++- docs/src/05_building_block_view.adoc | 150 +++++++++++----------- 2 files changed, 85 insertions(+), 83 deletions(-) diff --git a/docs/src/03_system_scope_and_context.adoc b/docs/src/03_system_scope_and_context.adoc index 340402a..9c79942 100644 --- a/docs/src/03_system_scope_and_context.adoc +++ b/docs/src/03_system_scope_and_context.adoc @@ -52,18 +52,16 @@ The title of the table is the name of your system, the three columns contain the ---- actor Player actor Client -database MongoDB <> -[WIQ Game] <> [Wikidata] <> -[UsersInfoAPI] <> + +[WIQ Game] <> +[UsersAPI] <> [GeneratedQuestionsAPI] <> -Player .> (WIQ Game) : login -Client ..> (UsersInfoAPI) -Client ..> (GeneratedQuestionsAPI) -MongoDB --> (UsersInfoAPI) -MongoDB --> (GeneratedQuestionsAPI) -[WIQ Game] <.> (Wikidata) : WikidataAPI -[WIQ Game] <--> (MongoDB) +Player ..> (WIQ Game) : register/login +Client ..> (WIQ Game) : view data +[GeneratedQuestionsAPI] ..> Wikidata +[WIQ Game] ..> UsersAPI +[WIQ Game] ..> GeneratedQuestionsAPI ---- [cols="e,2e" options="header"] diff --git a/docs/src/05_building_block_view.adoc b/docs/src/05_building_block_view.adoc index df5c29c..036ba49 100644 --- a/docs/src/05_building_block_view.adoc +++ b/docs/src/05_building_block_view.adoc @@ -63,18 +63,53 @@ In the best case you will get away with examples or simple signatures. **** -_****_ +[plantuml,"White box overall system",png] +---- +actor Player +actor Client +[Wikidata] + +rectangle "WIQ Game (Level 1)"{ +[WIQ Game GUI] +[Data View] +[UsersAPI] +[GeneratedQuestionsAPI] #BurlyWood +Player ..> (WIQ Game GUI) +Client ..> (Data View) +[GeneratedQuestionsAPI] ..> Wikidata +[WIQ Game GUI] ..> UsersAPI +[WIQ Game GUI] ..> GeneratedQuestionsAPI +[Data View] ..> UsersAPI +[Data View] ..> GeneratedQuestionsAPI +} +---- Motivation:: -__ +We made the decomposition separating the functionallities (The names are self explanatory but components will be described later) +Contained Black boxes:: -Contained Building Blocks:: -__ +[cols="e,2e" options="header"] +|=== +|Name |Responsibility + +|WIQ Game GUI +|Main window in which questions are shown and can be answered by the player. The latter can also see past scores. + +|Data View +|Access to data about users and generated questions for the client. + +|Generated Questions API +|In charge of generating the questions and storing their data + +|UsersAPI +|In charge of keeping track of the data of the users (registration and scores) + +|Wikidata +|External element used for the generation of questions -Important Interfaces:: -__ +|=== [role="arc42help"] **** @@ -97,8 +132,6 @@ Its headline is the name of the black box. **** -==== - [role="arc42help"] **** Here you describe @@ -113,37 +146,6 @@ according the the following black box template: **** -__ - -__ - -_<(Optional) Quality/Performance Characteristics>_ - -_<(Optional) Directory/File Location>_ - -_<(Optional) Fulfilled Requirements>_ - -_<(optional) Open Issues/Problems/Risks>_ - - - - -==== - -__ - -==== - -__ - - -==== - -... - -==== - - === Level 2 @@ -156,57 +158,59 @@ Please prefer relevance over completeness. Specify important, surprising, risky, Leave out normal, simple, boring or standardized parts of your system **** -==== White Box __ +==== Generated Questions API (White Box) [role="arc42help"] **** ...describes the internal structure of _building block 1_. **** -__ - -==== White Box __ - - -__ - -... - -==== White Box __ - - -__ - +[plantuml,"Generated Questions API (White Box)",png] +---- +[Wikidata] +[wikidatanpm] <> +[WIQ Game GUI] +[Data View] +database MongoDB +rectangle "GenedQuestsAPI (Level 2)"{ -=== Level 3 +[GenQuestsService] ..> wikidatanpm +[GenQuestsService] ..> Wikidata +[GenQuestsService] <--> MongoDB +[WIQ Game GUI] ..> GenQuestsService : new Question +[Data View] ..> GenQuestsService : get Questions +} +---- -[role="arc42help"] -**** -Here you can specify the inner structure of (some) building blocks from level 2 as white boxes. - -When you need more detailed levels of your architecture please copy this -part of arc42 for additional levels. -**** +Motivation:: +We made the decomposition separating the functionallities. -==== White Box <_building block x.1_> - -[role="arc42help"] -**** -Specifies the internal structure of _building block x.1_. -**** +Contained Black boxes:: +[cols="e,2e" options="header"] +|=== +|Name |Responsibility -__ +|GenQuestsService +|Receives different petitions regarding the generation of questions or their retrieval and responds accordingly. +|wikidatanpm +|External library that facilitates and simplifies the use of wikidata for the generation of questions. -==== White Box <_building block x.2_> +|MongoDB +|The data of the generated questions is stored here for showing it later to the client. -__ +|=== +Additional explanation of relationships:: +The service is requested either the generation of a question or the retrieval of a subset (from WIQ Game GUI or +Data View respectively). -==== White Box <_building block y.1_> +For the first case, it makes use of the library to generate the question, retrieves it +for the interface to use and stores the pertinent data in the DB. -__ +In the other case, it just makes the query according to the client choosings and retrieves the data of the +questions for the Data View to show. \ No newline at end of file From 9bb91722ed169c9b33a6a555838f42649eb6dd8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?adri=C3=A1n?= Date: Sun, 18 Feb 2024 22:39:24 +0100 Subject: [PATCH 10/10] 6. Runtime view --- docs/src/06_runtime_view.adoc | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index e10f375..4c0850f 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -2,8 +2,48 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-runtime-view]] == Runtime View +=== User authentication +* Users will log in through the web interface of the application. +* The system stores in database (MongoDB) the users of the application. Any data relative to them is accessed via the database of the system and displayed to them on the web interface. +=== Access to user data via API +* Clients access the users data through an API +[plantuml,"Sequence diagram",png] +---- +entity Client +database API as "Users API" +Client -> API: Data querying request +API --> Client: Retrieved data +---- + +=== Access to questions data via API +* Clients access the questions data through an API + +[plantuml,"Sequence diagram",png] +---- +entity Client +database API as "Questions API" +Client -> API: Data querying request +API --> Client: Retrieved data +---- + +=== Game +* Users can play a Q&A game + +[plantuml,"Sequence diagram",png] +---- +actor User +entity App +database QAPI as "Questions API" +database UAPI as "Users API" +User -> App: Start Game +App -> QAPI: Get Questions +QAPI --> App: Send Questions +App -> User: Show Question +User --> App: Answer Question +App -> UAPI: Update User Data +---- [role="arc42help"] **** .Contents