Skip to content

Commit

Permalink
Merge pull request #33 from Arquisoft/chore/dario/docu
Browse files Browse the repository at this point in the history
Added sections 3 and part of 7 to the documentation
  • Loading branch information
jjgancfer authored Feb 14, 2024
2 parents 63d4419 + a557406 commit d3049ef
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 11 deletions.
18 changes: 18 additions & 0 deletions docs/diagrams/BusinessContextDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@startuml
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
!include <c4/C4_Context.puml>

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
24 changes: 24 additions & 0 deletions docs/diagrams/ContainerDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
!include <c4/C4_Context.puml>

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
32 changes: 32 additions & 0 deletions docs/diagrams/DeploymentDiagram.puml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions docs/diagrams/TechnicalContextDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@startuml
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
!include <c4/C4_Context.puml>

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
Binary file added docs/images/BusinessContext.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 added docs/images/DeploymentDiagram.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 added docs/images/TechnicalContextDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 6 additions & 10 deletions docs/src/03_system_scope_and_context.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
ifndef::imagesdir[:imagesdir: ../images]

[[section-system-scope-and-context]]
== System Scope and Context


[role="arc42help"]
****
.Contents
Expand All @@ -27,8 +24,6 @@ Various options:
See https://docs.arc42.org/section-3/[Context and Scope] in the arc42 documentation.

****


=== Business Context
[role="arc42help"]
Expand All @@ -50,10 +45,11 @@ The title of the table is the name of your system, the three columns contain the
**<Diagram or Table>**
**<optionally: Explanation of external domain interfaces>**
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
Expand All @@ -68,8 +64,8 @@ together with a mapping table showing the relationships between channels and inp

****
**<Diagram or Table>**
image::TechnicalContextDiagram.png[align="center",title="Technical Context",link="TechnicalContextDiagram.png]
**<optionally: Explanation of technical interfaces>**
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.
**<Mapping Input/Output to Channels>**
2 changes: 1 addition & 1 deletion docs/src/07_deployment_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
_**<Overview Diagram>**_

Motivation::
Expand Down

0 comments on commit d3049ef

Please sign in to comment.