Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/src/03_context_and_scope.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ endif::arc42help[]
include::./diagrams/S3_C4_Business_Context_Diagram.puml[]
----
The business model diagram represents how the player interacts with the system of the WiChat application, which will communicate with the WikiData API using the HTTP protocol and MongoDB Query Languague (MQL) queries to retrieve the information. The data retrieved by the API will be used to generate the questions that the player must answer, in this case, an image will be retrieved, and the player must select the option that best fits what is shown in the picture. The player can also ask for help from the LLM Chat, which will use the information from the WikiData API to provide clues about the image.
A simple example of the functioning of the system is the following: the player logs in and starts a game. The system retrieves data from the WikiData API and generates the image and the possible answers (for example, an image of the Eiffel Tower, and four cities of Europe, like Madrid, Rome, London and Paris). The player may ask for help to the LLM Chat if he/she is not sure about the answer, and the AI will use the information from the WikiData API to provide clues about the image. The player can then select the correct answer, and the system will inform if it is correct or not.
A simple example of the functioning of the system is the following: the player logs in and starts a game. The system retrieves data from the WikiData API and generates the image and the possible answers (for example, an image of the Eiffel Tower, and four cities of Europe, like Madrid, Rome, London and Paris). The player may ask for help to the LLM Chat if he/she is not sure about the answer, and the AI will use the information from the WikiData API to provide clues about the image. The player can then select the correct answer, and the system will inform if it is correct or not.After the game is finished the user
will see the game results and can access his statistics and the leaderboards.

=== Technical Context

Expand Down
6 changes: 3 additions & 3 deletions docs/src/diagrams/S3_C4_Business_Context_Diagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ System_Boundary(quizGame, "WiChat Application") {
System(gateway, "WiChat Gateway Module", "Stands as a façade for the rest of the modules", "Internal system")
Container(llmChat, "LLM AI Chat", "Empathy", "Application service that works as an interface with the LLM API", "Internal system")
Container(auth, "Authentication Module", "", "Application module to manage the sessions and authentications", "Internal system")
Container(user, "User Module", "", "Application module to manage the users", "Internal system")
Container(gameService, "Game Module", "Application module that provides the game logic", "Internal system")
Container(questionGen, "Question Generator", "", "Application module that generates the questions of the game using information from Wikidata", "Internal system")
Container(authAPI, "Auth API", "Resource that provides session verification")
SystemDb(mongodb, "MongoDB Database", "Database to store the game questions, possible answers, the user data, rankings and other statistics")
}
System_Ext(wikidata, "WikiData API", "External resource to provide data for the questions and images")
Expand All @@ -21,11 +21,11 @@ Rel(user, wichat, "Uses")
Rel(wichat, gateway, "Uses")
Rel(gateway, llmChat, "Provides")
Rel(gateway, auth, "Provides")
Rel(gateway, user, "Provides")
Rel(gateway, questionGen, "Provides")
Rel(gateway, gameService, "Provides")
Rel(llmChat, llm, "Connects to")
Rel(auth, authAPI, "Connects to")
Rel(authAPI, mongodb, "Stores data in")
Rel(user, mongodb, "Stores data in")
Rel(questionGen, mongodb, "Stores data in")
Rel(gameService, mongodb, "Stores data in")
Rel(questionGen, wikidata, "Collects data from")
Expand Down
4 changes: 0 additions & 4 deletions docs/src/diagrams/S3_C4_Technical_Context_Diagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ System_Boundary(quizGame, "Quiz Game System") {
System(backend, "Backend", "Node.js", "Handles authentication, quiz logic, and API communication")
}
SystemDb(database, "Database", "MongoDB", "Stores users, quiz data and game information")
System_Ext(authAPI, "Authentication API", "Validates user authentication")
System_Ext(wikidata, "Wikidata API", "Provides quiz questions and answers")
System_Ext(llm, "LLM Chat API", "Provides hints based on quiz questions")
System_Ext(game, "Game API", "Provides users scores and statistics")

' User interactions
user --> frontend : "Plays the quiz"
frontend --> backend : "Requests quiz questions & hints"
backend --> database : "Stores application progress"

' External API calls
backend --> authAPI : "Validates login/register"
backend --> wikidata : "Fetches quiz questions"
backend --> llm : "Requests hint"
backend --> game : "Stores user progress"

@enduml