Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docu #112

Merged
merged 1 commit into from
Apr 8, 2024
Merged

docu #112

Show file tree
Hide file tree
Changes from all commits
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
13 changes: 8 additions & 5 deletions docs/src/04_solution_strategy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ ifndef::imagesdir[:imagesdir: ../images]

[[section-solution-strategy]]
== Solution Strategy
The system will follow *MERN Stack* as they key technologies for its development. MERN Stack is composed of four technologies: MongoDB, Express,
React and Node.

The web application is based on MERN stack, a full-stack combination of technologies for developing JavaScript applications fast.
* *Node:* the JavaScript runtime environment.
* *MongoDB:* chosen technology for the persistance of the system, that provides a non-relational database approach.
* *Express and Node:* they make up the middle tier of the application, providing a powerful server platform.
* *React:* front-end framework that will solve the client interfaces of the application.

Regarding the deployment of the application, the strategy chosen is a *cloud-based* system. This decision was motivated because of the nature of
the project, since a web application needs to be live and accesible at any moment.
The server will be an ARM *Linux VM on Oracle*, where some *containers* for different charasteristics of the system will be *deployed with
Docker* (MongoDB database for example)
The server will be an ARM *Linux VM on Oracle*, where some *dockerized microservices* will be deployed:
* users service
* authentication service
* questions service
* web application
* gateway

[role="arc42help"]
****
Expand Down
79 changes: 47 additions & 32 deletions docs/src/06_runtime_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,59 @@ ifndef::imagesdir[:imagesdir: ../images]
* Users will log in through the web interface of the application.
* The system stores in database (MongoDB) the users of the application. Any data relative to them is accessed via the database of the system and displayed to them on the web interface.

=== Access to user data via API
* Clients access the users data through an API
=== Rankings
* Users can see the rankings for a specific category

[plantuml,"users diagram",png]
[plantuml,"rankings_diagram",png]
----
entity Client
database API as "Users API"
Client -> API: Data querying request
API --> Client: Retrieved data
entity User
entity WEBC as "Web Client"
entity GW as "Gateway"
entity USERS as "Users service"
database DB as "MongoDB"

User -> WEBC: Navigate to rankings page
WEBC -> GW: Get global statistics
GW -> USERS: Get global statistics
USERS -> DB: Get statistics matching the specified category
USERS -> GW: Send global statistics
GW -> WEBC: Send global statistics
User -> WEBC: Select a category
WEBC -> GW: Get category statistics
GW -> USERS: Get category statistics
USERS -> DB: Get statistics matching the specified category
USERS -> GW: Send category statistics
GW -> WEBC: Send category statistics
----

=== Access to questions data via API
* Clients access the questions data through an API
=== Playing
* An overview of the runtime scenario of a game.

[plantuml,"questions diagram",png]
----
entity Client
database API as "Questions API"
Client -> API: Data querying request
API --> Client: Retrieved data
----

=== Game
* Users can play a Q&A game

[plantuml,"game diagram",png]
----
[plantuml, "playing_diagram", png]
---
actor User
entity App
database QAPI as "Questions API"
database UAPI as "Users API"
User -> App: Start Game
App -> QAPI: Get Questions
QAPI --> App: Send Questions
App -> User: Show Question
User --> App: Answer Question
App -> UAPI: Update User Data
----
entity WEBC as "Web Client"
entity GW as "Gateway"
database DB as "MongoDB"
entity QU as "Questions API"
entity USERS as "Users Service API"

User -> WEBC: Select a category to play
WEBC -> GW: Get a question
GW -> QU: Get a question
QU -> QU: Store question and answer
QU -> GW: Send question to client
GW -> WEBC: Send question to client
User -> WEBC: Answer question
WEBC -> GW: Send answer
GW -> QU: Send answer
QU -> QU: Check answer
QU -> USERS: Update user points
USERS -> DB: Modify user data
QU -> GW: Send result and new question
GW -> WEBC: Send result and new question
---

[role="arc42help"]
****
.Contents
Expand Down