diff --git a/docs/src/04_solution_strategy.adoc b/docs/src/04_solution_strategy.adoc index 68a269e..25b0d86 100644 --- a/docs/src/04_solution_strategy.adoc +++ b/docs/src/04_solution_strategy.adoc @@ -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"] **** diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index 4b6cd77..229707c 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -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