diff --git a/docs/diagrams/BusinessContextDiagram.puml b/docs/diagrams/BusinessContextDiagram.puml new file mode 100644 index 00000000..2a2fbdf7 --- /dev/null +++ b/docs/diagrams/BusinessContextDiagram.puml @@ -0,0 +1,18 @@ +@startuml +!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml +!include + +title Context Diagram for the WIQ System +LAYOUT_WITH_LEGEND() + +'Containers +Person(player, Player,"An authenticated player that wants to play WIQ games") + +Container(wiq, "WIQ Application","", "Application that allows the users to play WIQ games") + +System_Ext(wikidata,"WikiData API","Contains the information used for the question generation") + +'RELATIONS +Rel(player,wiq,"Plays games") +Rel(wiq,wikidata,"Asks for data for question generation") +@enduml \ No newline at end of file diff --git a/docs/diagrams/ContainerDiagram.puml b/docs/diagrams/ContainerDiagram.puml new file mode 100644 index 00000000..e0bd97a1 --- /dev/null +++ b/docs/diagrams/ContainerDiagram.puml @@ -0,0 +1,24 @@ +@startuml +!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml +!include + +title Context Diagram for the WIQ System +LAYOUT_WITH_LEGEND() + +'Containers +Person(player, Player,"An authenticated player that wants to play WIQ games") + +System_Boundary(wiq,"WIQ"){ + Container(web_app, "WIQ Client", "React, Typescript", "Allows the user to play WIQ games") + Container(backend_api, "WIQ REST API","Java SpringBoot 3","Handles the users, game logic and question generation") + ContainerDb(database,"WIQ Database","PostgreSQL","Stores users, questions and other game info") +} + +System_Ext(wikidata,"WikiData API","Contains the information used for the question generation") + +'RELATIONS +Rel(player,web_app,"Uses","HTTPS") +Rel(backend_api,wikidata,"Asks for data","SPARQL,HTTPS") +Rel(web_app,backend_api,"Asks for user/game information","JSON,HTTPS") +Rel(backend_api,database,"Stores game/user information","JPA") +@enduml \ No newline at end of file diff --git a/docs/diagrams/DeploymentDiagram.puml b/docs/diagrams/DeploymentDiagram.puml new file mode 100644 index 00000000..eaa1314c --- /dev/null +++ b/docs/diagrams/DeploymentDiagram.puml @@ -0,0 +1,32 @@ +@startuml + +title WIQ Deployment View + +legend right + |Color| Type | + |<#PeachPuff>| WIQ Server | + |<#DarkSalmon>| External Service | +end legend + +node "Server Hosting WIQ" #PeachPuff { + node "WIQ WebApp Server"{ + component "WIQ React Application" + } + node "WIQ API" { + component "WIQ_API.jar" + } + node "PostgreSQL Docker" { + database "WIQ Database" + } +} +node "User Computer" #DarkSalmon{ + frame "Web Client" +} +node "WikiData Server" #DarkSalmon { + frame "WikiData REST API" +} +"Web Client" ..> "WIQ React Application" : "HTTPS" +"WIQ React Application" ..> "WIQ_API.jar" : "HTTPS" +"WIQ_API.jar" ..> "WIQ Database" : "JPA" +"WIQ API" ..> "WikiData REST API" : "HTTPS, SPARQL" +@enduml \ No newline at end of file diff --git a/docs/diagrams/TechnicalContextDiagram.puml b/docs/diagrams/TechnicalContextDiagram.puml new file mode 100644 index 00000000..0c035bb9 --- /dev/null +++ b/docs/diagrams/TechnicalContextDiagram.puml @@ -0,0 +1,23 @@ +@startuml +!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml +!include + +title Context Diagram for the WIQ System +LAYOUT_WITH_LEGEND() + +'Containers +Person(player, Player's Browser,"Preferred browser (Firefox, Chrome, Opera...)") + +System_Boundary(wiq,"WIQ Server"){ + Container(web_app, "WIQ Client", "React, Typescript", "nginx web server") + Container(backend_api, "WIQ REST API","Java SpringBoot 3",".jar file") + ContainerDb(database,"WIQ Database","PostgreSQL","PostgreSQL docker container") +} +System_Ext(wikidata,"WikiData API","REST API") + +'RELATIONS +Rel(player,web_app,"Uses","HTTPS") +Rel(backend_api,wikidata,"Asks for data","SPARQL,HTTPS") +Rel(web_app,backend_api,"Asks for user/game information","JSON,HTTPS") +Rel(backend_api,database,"Stores game/user information","JPA") +@enduml \ No newline at end of file diff --git a/docs/images/BusinessContext.png b/docs/images/BusinessContext.png new file mode 100644 index 00000000..62cf2d8c Binary files /dev/null and b/docs/images/BusinessContext.png differ diff --git a/docs/images/DeploymentDiagram.png b/docs/images/DeploymentDiagram.png new file mode 100644 index 00000000..7453c347 Binary files /dev/null and b/docs/images/DeploymentDiagram.png differ diff --git a/docs/images/TechnicalContextDiagram.png b/docs/images/TechnicalContextDiagram.png new file mode 100644 index 00000000..6b635ca7 Binary files /dev/null and b/docs/images/TechnicalContextDiagram.png differ diff --git a/docs/src/03_system_scope_and_context.adoc b/docs/src/03_system_scope_and_context.adoc index c528e907..88042e96 100644 --- a/docs/src/03_system_scope_and_context.adoc +++ b/docs/src/03_system_scope_and_context.adoc @@ -1,9 +1,6 @@ ifndef::imagesdir[:imagesdir: ../images] - [[section-system-scope-and-context]] == System Scope and Context - - [role="arc42help"] **** .Contents @@ -27,8 +24,6 @@ Various options: See https://docs.arc42.org/section-3/[Context and Scope] in the arc42 documentation. **** - - === Business Context [role="arc42help"] @@ -50,10 +45,11 @@ The title of the table is the name of your system, the three columns contain the **** -**** +image::BusinessContext.png[align="center",title="Business Context",link="BusinessContext.png] -=== Technical Context +The WIQ application will communicate with the WikiData API through REST HTTP calls using SPARQL for the queries. It will ask the API for information that will later be used for generating the questions that will be shown to the player. This information will come in the form of text, images or audio. +=== Technical Context [role="arc42help"] **** .Contents @@ -68,8 +64,8 @@ together with a mapping table showing the relationships between channels and inp **** -**** +image::TechnicalContextDiagram.png[align="center",title="Technical Context",link="TechnicalContextDiagram.png] -**** +The WIQ application will be deployed together in the same server. The WIQ client will be deployed on a nginx web server. This client will communicate with the API through HTTPS REST calls and exchange information through JSON objects. The WIQ REST API will be run as a .jar file on the server and connect to a Database run on a postgresql docker container. The connection layer between the SpringBoot API and the database will be JPA. +The REST API will request information to the WikiData REST API through HTTPS calls passing a SPARQL query in order to retrieve data. -**** diff --git a/docs/src/07_deployment_view.adoc b/docs/src/07_deployment_view.adoc index 22b45c27..a002c4a8 100644 --- a/docs/src/07_deployment_view.adoc +++ b/docs/src/07_deployment_view.adoc @@ -55,7 +55,7 @@ Describe (usually in a combination of diagrams, tables, and text): For multiple environments or alternative deployments please copy and adapt this section of arc42 for all relevant environments. **** - +image::DeploymentView.png[align="center",title="Deployment View",link="DeploymentView.png] _****_ Motivation::