diff --git a/README.md b/README.md index b735bef..096fd09 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,11 @@ This is a base repo for the [Software Architecture course](http://arquisoft.gith ➡This repo is a basic application composed of several components. -- **Gateway service**. Express service that is exposed to the public and serves as a proxy to the two previous ones. -- **User service**. Express service that handles the insertion of new users in the system. -- **Auth service**. Express service that handles the authentication of users. - **Webapp**. React web application that uses the gateway service to allow basic login and new user features. +- **Wikidata service**.Express service for the question generation. +- **User service**. Express service that is responsible for managing all user-related operations +- **Gateway service**. Express service that is exposed to the public and serves as a proxy to the two previous ones. + Both the user and auth service share a Mongo database that is accessed with mongoose. diff --git a/docs/src/05_building_block_view.adoc b/docs/src/05_building_block_view.adoc index e0ba448..5bc7b79 100644 --- a/docs/src/05_building_block_view.adoc +++ b/docs/src/05_building_block_view.adoc @@ -234,30 +234,45 @@ Please prefer relevance over completeness. Specify important, surprising, risky, Leave out normal, simple, boring or standardized parts of your system **** -==== White Box User Management Service +==== User Management Service [role="arc42help"] **** ...describes the internal structure of the User Management Service. **** -[plantuml, format="png"] ----- -@startuml -' Define custom style for components -skinparam componentStyle uml2 +[plantuml, format=png] +.... +frame UserManagementAPI { + node UserService + node AuthService +} +database MongoDB as "MongoDB" -' Define components as rectangles without default stereotypes -rectangle "User Management API" as UserManagement -database "Users MongoDB Database" as MongoDB +UserService -- MongoDB +AuthService -- MongoDB +.... -' Define connections -UserManagement --> MongoDB +Contained Building Blocks:: -@enduml ----- +[cols="1,2" options="header"] +|=== +| **Name** | **Responsibility** +| Authservice | Manages the authentication of the application +| UserService | Manages the creation of users and everything related with statistics +| MongoDB | Stores the information of the users +|=== -==== White Box Wikidata Service +Important Interfaces:: + +[cols="1,2" options="header"] +|=== +| **Name** | **Description** +| Authservice -> MongoDB | Checks if the user who is trying to login is registered in the system and if so, generates a JWT Token +| UserService -> MongoDB | Saves the user in the database if creating one or retrieves/updates the desired statistics +|=== + +==== Wikidata Service [role="arc42help"] @@ -272,35 +287,36 @@ UserManagement --> MongoDB skinparam componentStyle uml2 ' Define components as rectangles without default stereotypes -rectangle "Wikidata Service API" as WikidataService +rectangle "Wikidata Service" as WikidataService +rectangle "Question Generation" as QuestionGeneration cloud "Wikidata API" as WikidataAPI ' Define connections +WikidataService --> QuestionGeneration +QuestionGeneration --> WikidataService WikidataService --> WikidataAPI @enduml ---- +Contained Building Blocks:: -=== Level 3 - -==== White Box User Management API +[cols="1,2" options="header"] +|=== +| **Name** | **Responsibility** +| Wikidata Service | Gets information from wikidata api and stores the questions generated by the question generation service. +| Question Generation | Recieves the data and builds questions based on that +| Wikidata API | Retrieves the information stored in the wikidata database +|=== +Important Interfaces:: -[role="arc42help"] -**** -...describes the internal structure of the User Management API. -**** +[cols="1,2" options="header"] +|=== +| **Name** | **Description** +| Wikidata Service -> Wikidata API | The service asks wikidata for info by means of a sparql query +| Wikidata Service <--> Question Generation | The services pass the data to the question generator and the generator returns the questions well formed +|=== -[plantuml, format=png] -.... -frame UserManagementAPI { - node UserService - node AuthService -} -database MongoDB as "MongoDB" -UserService -- MongoDB -AuthService -- MongoDB -.... diff --git a/docs/src/10_quality_requirements.adoc b/docs/src/10_quality_requirements.adoc index 9cb6f46..f63bada 100644 --- a/docs/src/10_quality_requirements.adoc +++ b/docs/src/10_quality_requirements.adoc @@ -26,7 +26,49 @@ See https://docs.arc42.org/section-10/[Quality Requirements] in the arc42 docume **** === Quality Tree -image::10-Quality-Tree-EN.png["Quality Tree"] +[plantuml, format="png"] +---- +@startuml +title Scope & Context +left to right direction +' Define custom style for components +skinparam componentStyle uml2 + +' Define components as rectangles without default stereotypes +cloud "Quality Requirements" as Quality +rectangle "Reliability" as Reliability +rectangle "Security" as Security +rectangle "Performance" as Performance +rectangle "Portability" as Portability +rectangle "Usability" as Usability +rectangle "Testability" as Testability +rectangle "Maintainability" as Maintainability +note "The system is consistent" as N1 +note "The data for each user is private" as N2 +note "Fast response time" as N3 +note "The application works in different infrastructures" as N4 +note "The system has a good interface" as N5 +note "The system is easily testable" as N6 +note "The system is easy to maintain and evolve" as N7 + +' Define connections +Quality -- Reliability +Quality -- Security +Quality -- Performance +Quality -- Portability +Quality -- Usability +Quality -- Testability +Quality -- Maintainability +Reliability --> N1 +Security --> N2 +Performance --> N3 +Portability --> N4 +Usability --> N5 +Testability --> N6 +Maintainability --> N7 + +@enduml +---- [role="arc42help"] ****