Skip to content

Commit

Permalink
fix documentationn point 5
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAlvrz committed Feb 21, 2024
1 parent 7ba7674 commit 176e697
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 26 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
60 changes: 34 additions & 26 deletions docs/src/05_building_block_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This allows you to communicate with your stakeholder on an abstract level withou
The building block view is a hierarchical collection of black boxes and white boxes
(see figure below) and their descriptions.
image::05_building_blocks.png["Hierarchy of building blocks"]
image::05_building_blocks-EN.png["Hierarchy of building blocks"]
*Level 1* is the white box description of the overall system together with black
box descriptions of all contained building blocks.
Expand Down Expand Up @@ -63,10 +63,9 @@ In the best case you will get away with examples or simple signatures.
****

=== Level 1: Whitebox Overall System

[plantuml, "Level1-diagram", png]
[plantuml, Level1-diagram, svg]
----
@startuml
actor UserAgent
rectangle App
rectangle "Wikidata API" as API
Expand All @@ -75,8 +74,10 @@ UserAgent -> App: Interaction
App -> API: Consumes
API --> App: Retrieve data
@enduml
----


Motivation::

The main purpose of the system is to run a quiz game using info dynamically retrieved from the Wikidata API.
Expand All @@ -85,7 +86,7 @@ The main purpose of the system is to run a quiz game using info dynamically retr
Contained Building Blocks::

|===
| Name | Description
|Name| Description

|User Agent

Expand Down Expand Up @@ -128,8 +129,9 @@ Please prefer relevance over completeness. Specify important, surprising, risky,
Leave out normal, simple, boring or standardized parts of your system
****

[plantuml, "Level2-diagram", png]
[plantuml, Level2-diagram, svg]
----
@startuml
left to right direction
skinparam packageStyle rectangle
Expand All @@ -150,25 +152,27 @@ gateway --> webapp: Response

Motivation::

This level aims to shed some light on the internal structure of the App component and the information in it.
This level aims to shed some light on the internal structure of the App component and the information flow in it.


Contained Building Blocks::

|===
| Name | Description
|Name| Description

|Web App

| Web App
| React frontend in which the game will take place
|React frontend in which the game will take place

| Gateway
| Service in charge of communicating the web app with the backend. Its main purpose its to forward all the requests sent from the client to the corresponding service and return the response to the client.
|Gateway

| Authentication
| Service which will handle the user authentication process when a new user logs in
|Service in charge of communicating the web app with the backend. Its main purpose its to forward all the requests sent from the client to the corresponding service and return the response to the client.

| Users
| Service containing all user related information such as scores or history of games played.
|Authentication
|Service which will handle the user authentication process when a new user logs in

|Users
|Service containing all user related information such as scores or history of games played.

|Questions
|Service that bears the responsability of interacting with te Wikidata API and generating the questions to be presented to the user.
Expand All @@ -177,8 +181,9 @@ Contained Building Blocks::

=== Level 3:

[plantuml, "Level2-diagram", png]
[plantuml, Level3-diagram, svg]
----
@startuml
rectangle "Controller" as controller
rectangle "Service" as service
Expand All @@ -189,26 +194,29 @@ model -> db : Retrieve data
service -> model : Data processing
controller -> service : Request
@enduml
----

Motivation::

This third level provides a deeper insight into the microservices that compose the application. As the diagram showcases, each one is implemented using an n-layer architecture so as to ensure a clear separation of concerns and a high degree of modularity, which in turn will make the system more maintainable and scalable.

|===
| Name | Description
|Name| Description

|Controller

|Component in charge of handling the requests sent from the gateway and returning the corresponding response.

| Controller
| Component in charge of handling the requests sent from the gateway and returning the corresponding response.
|Service

| Service
| Module that contains the business logic of the service. It is responsible for processing the data from the model and returning it to the controller.
|Module that contains the business logic of the service. It is responsible for processing the data from the model and returning it to the controller.

| Model
| Component that interacts with the database and retrieves the data to be processed by the service.
|Model
|Component that interacts with the database and retrieves the data to be processed by the service.

| DB
| Component independent for each service that contains the data related to it.
|DB
|Component independent for each service that contains the data related to it.

|===

Expand Down

0 comments on commit 176e697

Please sign in to comment.