diff --git a/README.md b/README.md index 4cfce5de..cfa60ca4 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,11 @@ This repo is a basic application composed of several components. - **User service**. Express service that handles the insertion of new users in the system. - **Auth service**. Express service that handles the authentication of users. - **Webapp**. React web application that uses the gateway service to allow basic login and new user features. -- **Question service**. Express service that handles question generation -- **Stats service**. Exoress service that handles game stats. +- **Question service**. Express service that handles question generation. +- **Stats service**. Express service that handles game stats and rankings. Both the user and auth service share a Mongo database that is accessed with mongoose. +Stats service has its own database that is also accessed with mongoose. ## Quick start guide diff --git a/debug.log b/debug.log index 77d60f2b..c22dcbec 100644 --- a/debug.log +++ b/debug.log @@ -1 +1,2 @@ [0220/104149.273:ERROR:registration_protocol_win.cc(107)] CreateFile: El sistema no puede encontrar el archivo especificado. (0x2) +[0227/100625.318:ERROR:registration_protocol_win.cc(107)] CreateFile: El sistema no puede encontrar el archivo especificado. (0x2) diff --git a/docker-compose.yml b/docker-compose.yml index 58958ad1..e01eaed6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -99,7 +99,7 @@ services: prometheus: image: prom/prometheus container_name: prometheus-${teamname:-defaultASW} - profiles: ["dev"] + profiles: ["dev","prod"] networks: - mynetwork volumes: @@ -113,7 +113,7 @@ services: grafana: image: grafana/grafana container_name: grafana-${teamname:-defaultASW} - profiles: ["dev"] + profiles: ["dev", "prod"] networks: - mynetwork volumes: diff --git a/docs/images/03-Business.svg b/docs/images/03-Business.svg new file mode 100644 index 00000000..b067646a --- /dev/null +++ b/docs/images/03-Business.svg @@ -0,0 +1,4 @@ + + + +
User
User
<<system>>
WIQ
<<system>>...
<<extern>>
Wikidata
<<extern>>...
Interacts
Interacts
request data
request data
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/03-Technical.svg b/docs/images/03-Technical.svg new file mode 100644 index 00000000..96b57011 --- /dev/null +++ b/docs/images/03-Technical.svg @@ -0,0 +1,4 @@ + + + +
Device
Device
Browser
Browser
Azure cloud
Azure cloud
WIQ
WIQ
MongoDB
MongoDB
Wikidata
Wikidata
REST
REST
Actor
Actor
uses
uses
Admin

Admin
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/05-Level1.svg b/docs/images/05-Level1.svg new file mode 100644 index 00000000..433f0b86 --- /dev/null +++ b/docs/images/05-Level1.svg @@ -0,0 +1,4 @@ + + + +
Webapp
Webapp
MongoDB
MongoDB
Wikidata
Wikidata
Gateway service
Gateway servi...
Question service
Question serv...
Stats service%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Webapp%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22435%22%20y%3D%22420%22%20width%3D%22100%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Stats service...
User service
User service
Auth service

Auth service
Grafana
Grafana
Prometheus
Prometheus
Whitebox WIQ
Whitebox WIQ
User

User
Text
Text
Text
Text
interacts
interacts
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/05-Overall.svg b/docs/images/05-Overall.svg new file mode 100644 index 00000000..f415c4a5 --- /dev/null +++ b/docs/images/05-Overall.svg @@ -0,0 +1,4 @@ + + + +
Wikidata
Wikidata
User

User
interacts
interacts
WIQ
WIQ
accesses
accesses
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/05-Question-service.svg b/docs/images/05-Question-service.svg new file mode 100644 index 00000000..5346b322 --- /dev/null +++ b/docs/images/05-Question-service.svg @@ -0,0 +1,4 @@ + + + +
Whitebox question service
Whitebox question service
Question service
Question service
Generat%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Question%20service%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22190%22%20y%3D%22260%22%20width%3D%22120%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Eor choose%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Question%20service%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22190%22%20y%3D%22260%22%20width%3D%22120%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Er%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Question%20service%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22190%22%20y%3D%22260%22%20width%3D%22120%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Generat%3CmxGrap...
Generic 
generator
Generic...
Gateway service
Gateway servi...
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Generat%26lt%3Bspan%20style%3D%26quot%3Bcolor%3A%20rgba(0%2C%200%2C%200%2C%200)%3B%20font-family%3A%20monospace%3B%20font-size%3A%200px%3B%20text-align%3A%20start%3B%20text-wrap%3A%20nowrap%3B%26quot%3B%26gt%3B%253CmxGraphModel%253E%253Croot%253E%253CmxCell%2520id%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25221%2522%2520parent%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25222%2522%2520value%253D%2522Question%2520service%2522%2520style%253D%2522shape%253Dmodule%253Balign%253Dleft%253BspacingLeft%253D20%253Balign%253Dcenter%253BverticalAlign%253Dtop%253BwhiteSpace%253Dwrap%253Bhtml%253D1%253B%2522%2520vertex%253D%25221%2522%2520parent%253D%25221%2522%253E%253CmxGeometry%2520x%253D%2522190%2522%2520y%253D%2522260%2522%2520width%253D%2522120%2522%2520height%253D%252250%2522%2520as%253D%2522geometry%2522%252F%253E%253C%252FmxCell%253E%253C%252Froot%253E%253C%252FmxGraphModel%253E%26lt%3B%2Fspan%26gt%3Bor%20choose%26lt%3Bspan%20style%3D%26quot%3Bcolor%3A%20rgba(0%2C%200%2C%200%2C%200)%3B%20font-family%3A%20monospace%3B%20font-size%3A%200px%3B%20text-align%3A%20start%3B%20text-wrap%3A%20nowrap%3B%26quot%3B%26gt%3B%253CmxGraphModel%253E%253Croot%253E%253CmxCell%2520id%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25221%2522%2520parent%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25222%2522%2520value%253D%2522Question%2520service%2522%2520style%253D%2522shape%253Dmodule%253Balign%253Dleft%253BspacingLeft%253D20%253Balign%253Dcenter%253BverticalAlign%253Dtop%253BwhiteSpace%253Dwrap%253Bhtml%253D1%253B%2522%2520vertex%253D%25221%2522%2520parent%253D%25221%2522%253E%253CmxGeometry%2520x%253D%2522190%2522%2520y%253D%2522260%2522%2520width%253D%2522120%2522%2520height%253D%252250%2522%2520as%253D%2522geometry%2522%252F%253E%253C%252FmxCell%253E%253C%252Froot%253E%253C%252FmxGraphModel%253E%26lt%3B%2Fspan%26gt%3Br%26lt%3Bspan%20style%3D%26quot%3Bcolor%3A%20rgba(0%2C%200%2C%200%2C%200)%3B%20font-family%3A%20monospace%3B%20font-size%3A%200px%3B%20text-align%3A%20start%3B%20text-wrap%3A%20nowrap%3B%26quot%3B%26gt%3B%253CmxGraphModel%253E%253Croot%253E%253CmxCell%2520id%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25221%2522%2520parent%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25222%2522%2520value%253D%2522Question%2520service%2522%2520style%253D%2522shape%253Dmodule%253Balign%253Dleft%253BspacingLeft%253D20%253Balign%253Dcenter%253BverticalAlign%253Dtop%253BwhiteSpace%253Dwrap%253Bhtml%253D1%253B%2522%2520vertex%253D%25221%2522%2520parent%253D%25221%2522%253E%253CmxGeometry%2520x%253D%2522190%2522%2520y%253D%2522260%2522%2520width%253D%2522120%2522%2520height%253D%252250%2522%2520as%253D%2522geometry%2522%252F%253E%253C%252FmxCell%253E%253C%252Froot%253E%253C%252FmxGraphModel%253E%26lt%3B%2Fspan%26gt%3B%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22354%22%20y%3D%22250%22%20width%3D%22120%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Equestion%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Generat%26lt%3Bspan%20style%3D%26quot%3Bcolor%3A%20rgba(0%2C%200%2C%200%2C%200)%3B%20font-family%3A%20monospace%3B%20font-size%3A%200px%3B%20text-align%3A%20start%3B%20text-wrap%3A%20nowrap%3B%26quot%3B%26gt%3B%253CmxGraphModel%253E%253Croot%253E%253CmxCell%2520id%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25221%2522%2520parent%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25222%2522%2520value%253D%2522Question%2520service%2522%2520style%253D%2522shape%253Dmodule%253Balign%253Dleft%253BspacingLeft%253D20%253Balign%253Dcenter%253BverticalAlign%253Dtop%253BwhiteSpace%253Dwrap%253Bhtml%253D1%253B%2522%2520vertex%253D%25221%2522%2520parent%253D%25221%2522%253E%253CmxGeometry%2520x%253D%2522190%2522%2520y%253D%2522260%2522%2520width%253D%2522120%2522%2520height%253D%252250%2522%2520as%253D%2522geometry%2522%252F%253E%253C%252FmxCell%253E%253C%252Froot%253E%253C%252FmxGraphModel%253E%26lt%3B%2Fspan%26gt%3Bor%20choose%26lt%3Bspan%20style%3D%26quot%3Bcolor%3A%20rgba(0%2C%200%2C%200%2C%200)%3B%20font-family%3A%20monospace%3B%20font-size%3A%200px%3B%20text-align%3A%20start%3B%20text-wrap%3A%20nowrap%3B%26quot%3B%26gt%3B%253CmxGraphModel%253E%253Croot%253E%253CmxCell%2520id%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25221%2522%2520parent%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25222%2522%2520value%253D%2522Question%2520service%2522%2520style%253D%2522shape%253Dmodule%253Balign%253Dleft%253BspacingLeft%253D20%253Balign%253Dcenter%253BverticalAlign%253Dtop%253BwhiteSpace%253Dwrap%253Bhtml%253D1%253B%2522%2520vertex%253D%25221%2522%2520parent%253D%25221%2522%253E%253CmxGeometry%2520x%253D%2522190%2522%2520y%253D%2522260%2522%2520width%253D%2522120%2522%2520height%253D%252250%2522%2520as%253D%2522geometry%2522%252F%253E%253C%252FmxCell%253E%253C%252Froot%253E%253C%252FmxGraphModel%253E%26lt%3B%2Fspan%26gt%3Br%26lt%3Bspan%20style%3D%26quot%3Bcolor%3A%20rgba(0%2C%200%2C%200%2C%200)%3B%20font-family%3A%20monospace%3B%20font-size%3A%200px%3B%20text-align%3A%20start%3B%20text-wrap%3A%20nowrap%3B%26quot%3B%26gt%3B%253CmxGraphModel%253E%253Croot%253E%253CmxCell%2520id%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25221%2522%2520parent%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25222%2522%2520value%253D%2522Question%2520service%2522%2520style%253D%2522shape%253Dmodule%253Balign%253Dleft%253BspacingLeft%253D20%253Balign%253Dcenter%253BverticalAlign%253Dtop%253BwhiteSpace%253Dwrap%253Bhtml%253D1%253B%2522%2520vertex%253D%25221%2522%2520parent%253D%25221%2522%253E%253CmxGeometry%2520x%253D%2522190%2522%2520y%253D%2522260%2522%2520width%253D%2522120%2522%2520height%253D%252250%2522%2520as%253D%2522geometry%2522%252F%253E%253C%252FmxCell%253E%253C%252Froot%253E%253C%252FmxGraphModel%253E%26lt%3B%2Fspan%26gt%3B%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22354%22%20y%3D%22250%22%20width%3D%22120%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Es
%3CmxGraph...
question generators
question generators
Gateway service
Gateway servi...
Gets data
Gets data
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/05-Webapp.svg b/docs/images/05-Webapp.svg new file mode 100644 index 00000000..f9e376b8 --- /dev/null +++ b/docs/images/05-Webapp.svg @@ -0,0 +1,4 @@ + + + +
Whitebox webapp service
Whitebox webapp service
Gateway service
Gateway servi...
App
App
Register
Register
Login
Login
Clasico%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Register%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22450%22%20y%3D%22270%22%20width%3D%22100%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Clasico%3CmxG...
Batería de sabios%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Clasico%26lt%3Bspan%20style%3D%26quot%3Bcolor%3A%20rgba(0%2C%200%2C%200%2C%200)%3B%20font-family%3A%20monospace%3B%20font-size%3A%200px%3B%20text-align%3A%20start%3B%20text-wrap%3A%20nowrap%3B%26quot%3B%26gt%3B%253CmxGraphModel%253E%253Croot%253E%253CmxCell%2520id%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25221%2522%2520parent%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25222%2522%2520value%253D%2522Register%2522%2520style%253D%2522shape%253Dmodule%253Balign%253Dleft%253BspacingLeft%253D20%253Balign%253Dcenter%253BverticalAlign%253Dtop%253BwhiteSpace%253Dwrap%253Bhtml%253D1%253B%2522%2520vertex%253D%25221%2522%2520parent%253D%25221%2522%253E%253CmxGeometry%2520x%253D%2522450%2522%2520y%253D%2522270%2522%2520width%253D%2522100%2522%2520height%253D%252250%2522%2520as%253D%2522geometry%2522%252F%253E%253C%252FmxCell%253E%253C%252Froot%253E%253C%252FmxGraphModel%253E%26lt%3B%2Fspan%26gt%3B%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22580%22%20y%3D%22270%22%20width%3D%22100%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Batería de sa...
Calculadora humana
Calculadora h...
Config%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Calculadora%20humana%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22450%22%20y%3D%22200%22%20width%3D%22100%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Config%3CmxGr...
Home%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Config%26lt%3Bspan%20style%3D%26quot%3Bcolor%3A%20rgba(0%2C%200%2C%200%2C%200)%3B%20font-family%3A%20monospace%3B%20font-size%3A%200px%3B%20text-align%3A%20start%3B%20text-wrap%3A%20nowrap%3B%26quot%3B%26gt%3B%253CmxGraphModel%253E%253Croot%253E%253CmxCell%2520id%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25221%2522%2520parent%253D%25220%2522%252F%253E%253CmxCell%2520id%253D%25222%2522%2520value%253D%2522Calculadora%2520humana%2522%2520style%253D%2522shape%253Dmodule%253Balign%253Dleft%253BspacingLeft%253D20%253Balign%253Dcenter%253BverticalAlign%253Dtop%253BwhiteSpace%253Dwrap%253Bhtml%253D1%253B%2522%2520vertex%253D%25221%2522%2520parent%253D%25221%2522%253E%253CmxGeometry%2520x%253D%2522450%2522%2520y%253D%2522200%2522%2520width%253D%2522100%2522%2520height%253D%252250%2522%2520as%253D%2522geometry%2522%252F%253E%253C%252FmxCell%253E%253C%252Froot%253E%253C%252FmxGraphModel%253E%26lt%3B%2Fspan%26gt%3B%22%20style%3D%22shape%3Dmodule%3Balign%3Dleft%3BspacingLeft%3D20%3Balign%3Dcenter%3BverticalAlign%3Dtop%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22580%22%20y%3D%22200%22%20width%3D%22100%22%20height%3D%2250%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Home%3CmxGrap...
Perfil
Perfil
Ranking
Ranking
Sobre
Sobre
Social
Social
Stats
Stats
Stats service
Stats service
User service
User service
Question service
Question serv...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-friends.svg b/docs/images/06-friends.svg new file mode 100644 index 00000000..5bb2d482 --- /dev/null +++ b/docs/images/06-friends.svg @@ -0,0 +1,4 @@ + + + +
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses ranking button
presses ranking button
Friends successfuly retrieved. 
Friends is shown.
Friends successfuly retrieved....
fetch('/friends')
fetch('/friends...
axios.post('/friends')
axios.post('/fr...
friends response (JSON)
friends response (JSON)
response
response
User service
User service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-groups.svg b/docs/images/06-groups.svg new file mode 100644 index 00000000..ab30d696 --- /dev/null +++ b/docs/images/06-groups.svg @@ -0,0 +1,4 @@ + + + +
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses users button
presses users button
Group list successfuly retrieved. 
Group list is shown.
Group list successfuly retrieved....
fetch('/group/list')
fetch('/group/l...
axios.post('/group/list')
axios.post('/gr...
friends response (JSON)
friends response (JSON)
response
response
User service
User service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-history.svg b/docs/images/06-history.svg new file mode 100644 index 00000000..ddca3b3e --- /dev/null +++ b/docs/images/06-history.svg @@ -0,0 +1,4 @@ + + + +
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses a gamemode button
presses a gamemode button
User stats successfuly retrieved. 
Stats view is shown
User stats successfuly retrieved....
fetch('/userInfo')
fetch('/userInf...
axios.post('/userInfo')
axios.post('/us...
history response (JSON)
history response (JSON)
response
response
Stats service
Stats service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-login.svg b/docs/images/06-login.svg new file mode 100644 index 00000000..09892001 --- /dev/null +++ b/docs/images/06-login.svg @@ -0,0 +1,4 @@ + + + +
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
Authentication service
Authenticatio...
fills up login form and presses login
fills up login form and presses login
successful login
successful login
axios.post('/login')
axios.post('/lo...
MongoDB
MongoDB
axios.post('/login')
axios.post('/lo...
User.findOne(...)
User.findOne(.....
response
response
response
response
response
response
redirect to main page
redirect to main page
show main page view
show main page view
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-play.svg b/docs/images/06-play.svg new file mode 100644 index 00000000..bc2207dc --- /dev/null +++ b/docs/images/06-play.svg @@ -0,0 +1,4 @@ + + + +
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
Question service
Question serv...
presses a gamemode button
presses a gamemode button
questions successfuly retrieved. 
First question shows
questions successfuly retrieved....
fetch('/questions')
fetch('/questio...
axios.post('/questions')
axios.post('/qu...
questions response (JSON)
questions response (JSON)
response
response
Answers a question
Answers a question
Returns answer. 
The game does (or does not) add up to a score
Returns answer....
loop
loop
alt
alt
shows end game view
shows end game view
axios.post('/saveGame')
axios.post('/sa...
Stats service
Stats service
MongoDB
MongoDB
axios.post('/saveGame')
axios.post('/sa...
new Stats(...).save()
new Stats(...)....
returns OK%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22axios.post('%2FsaveGame')%22%20style%3D%22html%3D1%3BverticalAlign%3Dbottom%3BendArrow%3Dblock%3Bcurved%3D0%3Brounded%3D0%3B%22%20edge%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%2280%22%20relative%3D%221%22%20as%3D%22geometry%22%3E%3CmxPoint%20x%3D%22360%22%20y%3D%22560%22%20as%3D%22sourcePoint%22%2F%3E%3CmxPoint%20x%3D%22640%22%20y%3D%22560%22%20as%3D%22targetPoint%22%2F%3E%3CmxPoint%20as%3D%22offset%22%2F%3E%3C%2FmxGeometry%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
returns OK%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22axios.post('%2FsaveGame')%22%20style%3D%22html%3D1%3BverticalAlign%3Dbottom%3BendArrow%3Dblock%3Bcurved%3D0%3Brounded%3D0%3B%22%20edge%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%2280%22%20relative%3D%221%22%20as%3D%22geometry%22%3E%3CmxPoint%20x%3D%22360%22%20y%3D%22560%22%20as%3D%22sourcePoint%22%2F%3E%3CmxPoint%20x%3D%22640%22%20y%3D%22560%22%20as%3D%22targetPoint%22%2F%3E%3CmxPoint%20as%3D%22offset%22%2F%3E%3C%2FmxGeometry%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
axios.post('/saveGameList')
axios.post('/sa...
axios.post('/saveGameList')
axios.post('/sa...
User.findOne(...).games.push(....save())
User.findOne(.....
User service
User service
returns OK%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Stats%20service%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%221080%22%20width%3D%2280%22%20height%3D%22880%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
returns OK%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22Stats%20service%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%221080%22%20width%3D%2280%22%20height%3D%22880%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-ranking.svg b/docs/images/06-ranking.svg new file mode 100644 index 00000000..3a9c955f --- /dev/null +++ b/docs/images/06-ranking.svg @@ -0,0 +1,4 @@ + + + +
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses a gamemode button
presses a gamemode button
Ranking successfuly retrieved. 
Ranking is shown.
Ranking successfuly retrieved....
fetch('/ranking')
fetch('/ranking...
axios.post('/ranking')
axios.post('/ra...
ranking response (JSON)
ranking response (JSON)
response
response
Stats service
Stats service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-register.svg b/docs/images/06-register.svg new file mode 100644 index 00000000..d37ef8aa --- /dev/null +++ b/docs/images/06-register.svg @@ -0,0 +1,4 @@ + + + +
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
Authentication service
Authenticatio...
fills up register form and presses register
fills up register form and presses register
successful register
successful register
axios.post('/adduser')
axios.post('/ad...
MongoDB
MongoDB
axios.post('/adduser')
axios.post('/ad...
User.insertOne(...)
User.insertOne(...
response
response
response
response
response
response
auto-logins and redirects to main page 
auto-logins and redirects to main page 
show main page view
show main page view
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-stats.svg b/docs/images/06-stats.svg new file mode 100644 index 00000000..502d14a7 --- /dev/null +++ b/docs/images/06-stats.svg @@ -0,0 +1,4 @@ + + + +
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses a gamemode button
presses a gamemode button
User stats successfuly retrieved. 
Stats view is shown
User stats successfuly retrieved....
fetch('/stats')
fetch('/stats')
axios.post('/stats')
axios.post('/st...
stasts response (JSON)
stasts response (JSON)
response
response
Stats service
Stats service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/06-users.svg b/docs/images/06-users.svg new file mode 100644 index 00000000..6bebc3af --- /dev/null +++ b/docs/images/06-users.svg @@ -0,0 +1,4 @@ + + + +
User
User
Webap%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%22%20style%3D%22shape%3DumlLifeline%3Bperimeter%3DlifelinePerimeter%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Bcontainer%3D1%3BdropTarget%3D0%3Bcollapsible%3D0%3BrecursiveResize%3D0%3BoutlineConnect%3D0%3BportConstraint%3Deastwest%3BnewEdgeStyle%3D%7B%26quot%3Bcurved%26quot%3B%3A0%2C%26quot%3Brounded%26quot%3B%3A0%7D%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20width%3D%22130%22%20height%3D%22870%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3Ep
Webap%3CmxGra...
Gateway service
Gateway servi...
presses friends button
presses friends button
Non-friend users successfuly retrieved. 
Non-friend users is shown.
Non-friend users successfuly retrieved....
fetch('/users/search')
fetch('/users/s...
axios.post('/users/search')
axios.post('/us...
friends response (JSON)
friends response (JSON)
response
response
User service
User service
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/07-deployment.svg b/docs/images/07-deployment.svg new file mode 100644 index 00000000..1b0a7219 --- /dev/null +++ b/docs/images/07-deployment.svg @@ -0,0 +1,4 @@ + + + +
Azure cloud
Azure cloud
Docker container
Docker container
Webapp
Webapp
Question service
Question service
Stats service
Stats service
User service
User service
Auth service
Auth service
Docker container
Docker container
Prometheus
Prometheus
Grafana
Grafana
Gateway service
Gateway service
MongoDB
MongoDB
Docker container
Docker container
Docker container
Docker container
Docker container
Docker container
Docker container
Docker container
Docker container
Docker container
Docker container
Docker container
Docker container
Docker container
Web browser
Web browser
PC Device
PC Device
Mobile browser
Mobile browser
Mobile device
Mobile device
HTTP
HTTP
HTTP
HTTP
WIKIDATA
WIKIDATA
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/08-Concepts.svg b/docs/images/08-Concepts.svg new file mode 100644 index 00000000..bbe84763 --- /dev/null +++ b/docs/images/08-Concepts.svg @@ -0,0 +1,4 @@ + + + +
Cross-cutting concepts
Cross-cutting concep...
Domain concepts
Domain concepts
Domain model
Domain model
Architecture and design patterns
Architecture and des...
User Experience
User Experience
User interface
User interface
Ergonomics%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22User%20interface%22%20style%3D%22ellipse%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3Baspect%3Dfixed%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22650%22%20y%3D%22210%22%20width%3D%22100%22%20height%3D%22100%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Ergonomics%3CmxGraph...
Internacionalization
Internacionalization
Development concepts
Development concepts
Build, Test, Deploy
Build, Test, De...
Configurability
Configurability
Security and safety
Security and safety
Security
Security
Safety
Safety
Operation concepts
Operation concepts
Disaster-Recovery
Disaster-Reco...
Monitoring
Monitoring
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/08-Domain.svg b/docs/images/08-Domain.svg new file mode 100644 index 00000000..5ec29f45 --- /dev/null +++ b/docs/images/08-Domain.svg @@ -0,0 +1,4 @@ + + + +
*
*
belongs to
belongs to
Group
Group
name : String
name : String
createdAt : Datetime
createdAt : Datetime
Game
Game
gamemode: String
gamemode: String
password: String
password: String
correctAnswers: int
correctAnswers: int
incorrectAnswers: int
incorrectAnswers: int
points: int
points: int
avgTime: double
avgTime: double
User
User
username: String
username: String
password: String
password: String
createdAt: Datetime
createdAt: Datetime
*
*
*
*
is friend of
is friend of
plays
plays
1
1
*
*
*
*
Stats
Stats
username : String
username : String
gamemode: String
gamemode: String
nGamesPlayed: int
nGamesPlayed: int
avgPoints: double
avgPoints: double
totalPoints: int
totalPoints: int
totalCorrectQuestions: int
totalCorrectQuestions: int
totalIncorrectQuestions: int
totalIncorrectQuestions: int
ratioCorrect: double
ratioCorrect: double
avgTime: double
avgTime: double
1
1
*
*
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/images/6.1.png b/docs/images/6.1.png new file mode 100644 index 00000000..3ce968fe Binary files /dev/null and b/docs/images/6.1.png differ diff --git a/docs/images/6.2.png b/docs/images/6.2.png new file mode 100644 index 00000000..fe274393 Binary files /dev/null and b/docs/images/6.2.png differ diff --git a/docs/images/diagrama5.2.png b/docs/images/diagrama5.2.png new file mode 100644 index 00000000..eb6f5bc4 Binary files /dev/null and b/docs/images/diagrama5.2.png differ diff --git a/docs/images/diagrama5.png b/docs/images/diagrama5.png new file mode 100644 index 00000000..dadaf15f Binary files /dev/null and b/docs/images/diagrama5.png differ diff --git a/docs/src/03_system_scope_and_context.adoc b/docs/src/03_system_scope_and_context.adoc index c8b3ebff..eab200ce 100644 --- a/docs/src/03_system_scope_and_context.adoc +++ b/docs/src/03_system_scope_and_context.adoc @@ -4,7 +4,7 @@ ifndef::imagesdir[:imagesdir: ../images] == System Scope and Context === Business Context -image::businesscontext.svg[Business context] +image::03-Business.svg[Business context] |=== | *Entity* | *_Description_* @@ -14,7 +14,7 @@ image::businesscontext.svg[Business context] |=== === Technical Context -image::technicalcontext.svg[Technical Context] +image::03-Technical.svg[Technical Context] |=== | *Entity* | *_Description_* | *_User_* | Represents the user interacting with the system. In this case, the user is interacting with the "WIQ!" application through the device and the web browser. diff --git a/docs/src/04_solution_strategy.adoc b/docs/src/04_solution_strategy.adoc index 32fe86f8..92047afe 100644 --- a/docs/src/04_solution_strategy.adoc +++ b/docs/src/04_solution_strategy.adoc @@ -10,15 +10,13 @@ A ranking with the maximum score of the user and can be compared with other user * MongoDB: MongoDB is an open-source NoSQL database that uses a document-based data model for information storage and retrieval. * React JS: It's a framework created by Facebook that's widely used to create user interface components. Chosen for the large volume of documentation and the fact that it is the framework used during the previous courses. +* Chakra UI: It's a simple, modular and accessible component library that gives us the ability to create a responsive and accessible design. * WikiData: It's a free knowledge base modified by humans as well as machines, and it's where we'll get our questions from. * Microsoft Azure: A cloud computing platform that provides infrastructure, platform, and software-as-a-service services to host, manage, and scale online applications and services. === Design The designed website is composed of a frontend in React, a backend in Node.js and is documented using Asciidoc. Each user will have their own account where their information will be saved. Design-related decisions are detailed in point 9. -=== Security -We guarantee the safety of the user - === Testability Tests will be carried out for each individual part of the application, thus ensuring the correct operation of the different modules both individually and together. diff --git a/docs/src/05_building_block_view.adoc b/docs/src/05_building_block_view.adoc index 010f4318..4cef4c33 100644 --- a/docs/src/05_building_block_view.adoc +++ b/docs/src/05_building_block_view.adoc @@ -7,13 +7,12 @@ ifndef::imagesdir[:imagesdir: ../images] === Whitebox Overall System -The code is broken down in a structured way by levels, in which the internal dependencies of each element are taught. The system is divided into Whitebox and Blackbox. +The code is broken down in a structured way by levels, in which the internal dependencies of each element are taught. The system is divided into Whitebox and Blackbox. -image::whiteBox5.1.png["Hierarchy of building blocks"] +image::05-Overall.svg["Hierarchy of building blocks"] |=== | *_Actors_* | *_Description_* -| *_Admin_* | You have access to the entire app and can manage it to make it work properly. | *_User_* | It's the one that interacts directly with the app. |=== @@ -23,24 +22,65 @@ image::whiteBox5.1.png["Hierarchy of building blocks"] |=== | *_Name_* | *_Description_* -| *_Interface_* | The interface with which the user interacts -| *_WikiData_* | Provide the questions that will be used in the app -| *_MongoDB_* | Store user data +| *_WIQ_* | The application which users will interact with. +| *_Wikidata API_* | The API that will provide data to the application, in order to generate the questions. +|=== + +=== Level 1 + +image::05-Level1.svg["Hierarchy of building blocks"] + + +The system is divided into nine components, each of which is responsible for a specific task. These components are. + +|=== +| *_Component_* | *_Description_* +| *_Webapp_* | The main component of the application, which will be responsible for the user interface and game logic. +| *_Gateway service_* | The component that will be responsible for the communication between the web application and the other microservices. +| *_Auth service_* | The component that will be responsible for the authentication of the users. +| *_User service_* | The component that will be responsible for the user data. +| *_Question service_* | The component that will be responsible for generating the questions. +| *_Stats service_* | The component that will be responsible for the statistics of the game. +| *_Prometheus service_* | The component that will be responsible for monitoring the application. +| *_Grafana service_* | The component that will be responsible for visualizing the monitoring data. +| *_MongoDB_* | The database that will store the user data. |=== === Level 2 -image::Level2.png["Hierarchy of building blocks"] +image::diagrama5.2.png["Hierarchy of building blocks"] .Motivation In this diagram we can see the decided microservices that will provide all the operations necessary for the application to work properly. +==== Question Service + +image::05-Question-service.svg["Hierarchy of building blocks"] + |=== -| *_Name_* | *_Description_* -| *_Game Service_* | It is the microservice that will be in charge of the correct functioning of the game and calculate the user's score. -| *_UserData Service_* | It is the microservice that provides the necessary user data. -| *_Authetification Service_* | It's a microservice that users use to sign in to your app. -| *_Question Service_* | It is the microservice that will generate the questions through the WikiData API. +| *_Building block_* | *_Description_* +| *_Question service_* | The component that will be responsible for receiving requests from gateway service and responding with the questions. +| *_Generator chooser_* | The component that will be responsible for generating generic generators, which will be used to generate the questions. +| *_Generic generator_* | The component that will be responsible for generating the questions about one specific topic. +|=== + +==== Webapp + +image::05-Webapp.svg["Hierarchy of building blocks"] + +|=== +| *_Building block_* | *_Description_* +| *_App_* | Main component of the application, which will be responsible for routing. +| *_Home_* | The component that will be responsible for the home page. +| *_Login_* | The component that will be responsible for the login page. +| *_Register_* | The component that will be responsible for the register page. +| *_Clasico_* | The component that will be responsible for the classic game mode. +| *_Batería de sabios_* | The component that will be responsible for the wise battery game mode. +| *_Calculadora_* | The component that will be responsible for the human calculator game mode. +| *_Stats_* | The component that will be responsible for the statistics page. +| *_Profile_* | The component that will be responsible for the profile page. +| *_Settings_* | The component that will be responsible for the settings page. +| *_Sobre_* | The component that will be responsible for the about page. |=== \ No newline at end of file diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index 7886952d..337892d7 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -3,15 +3,58 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-runtime-view]] == Runtime View +=== User logs in -=== +User logs in by entering his username and password. The system checks the credentials and if they are correct, the user is redirected to the main page. Otherwise, an error message is shown. -The user starts a game, and the game uses the questions service to run it. +image::06-login.svg[] -image::juega.png["Hierarchy of building blocks"] +=== User registers -=== +User registers by entering his username, password, email and other optional information. The system checks if the username is unique and if the email is valid. If everything is correct, the user is redirected to the main page. Otherwise, an error message is shown. -The user checks their scores and statistics. +image::06-register.svg[] -image::historial.png["Hierarchy of building blocks"] \ No newline at end of file +=== User plays a game + +User selects a game to play. The system loads the game and the user can start playing. The user can pause the game, save it and resume it later. When the game is over, the user can see his score and the game is saved in the user's history. + +It should be noted that this does not require access to wikidata data, as the system has a data caching system that allows wikidata data to be stored in the system's database, so it is not necessary to access wikidata every time a game is played. + +image::06-play.svg[] + +=== User looks his stats + +User can see his stats by pressing stats button. It shows things such as games played, average score, total score, total correct questions, total incorrect questions, correct answer ratio or average time per question. + +image::06-stats.svg[] + +=== User looks his game history + +User can see his game history by pressing history button. It shows a list of games played, with answered questions. + +image::06-history.svg[] + +=== User looks at ranking + +User can see the ranking of the users. This ranking can be filtered by average points, total points, correct answer ratio or average time. + +image::06-ranking.svg[] + +=== User checks his friends + +User can see his friends. He can also get into their profile to see their stats. + +image::06-friends.svg[] + +=== User looks for users to be friends + +User can see a list of non-friends users. He can send a friend request to them. + +image::06-users.svg[] + +=== User looks for available groups to join + +User can see a list of available groups to join. He can send a request to join them. + +image::06-groups.svg[] diff --git a/docs/src/07_deployment_view.adoc b/docs/src/07_deployment_view.adoc index b5c01034..9ecf5f47 100644 --- a/docs/src/07_deployment_view.adoc +++ b/docs/src/07_deployment_view.adoc @@ -3,102 +3,55 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-deployment-view]] -== Deployment View +== Deplyment View -[role="arc42help"] -**** -.Content -The deployment view describes: - - 1. technical infrastructure used to execute your system, with infrastructure elements like geographical locations, environments, computers, processors, channels and net topologies as well as other infrastructure elements and - -2. mapping of (software) building blocks to that infrastructure elements. - -Often systems are executed in different environments, e.g. development environment, test environment, production environment. In such cases you should document all relevant environments. - -Especially document a deployment view if your software is executed as distributed system with more than one computer, processor, server or container or when you design and construct your own hardware processors and chips. - -From a software perspective it is sufficient to capture only those elements of an infrastructure that are needed to show a deployment of your building blocks. Hardware architects can go beyond that and describe an infrastructure to any level of detail they need to capture. - -.Motivation -Software does not run without hardware. -This underlying infrastructure can and will influence a system and/or some -cross-cutting concepts. Therefore, there is a need to know the infrastructure. - -.Form - -Maybe a highest level deployment diagram is already contained in section 3.2. as -technical context with your own infrastructure as ONE black box. In this section one can -zoom into this black box using additional deployment diagrams: - -* UML offers deployment diagrams to express that view. Use it, probably with nested diagrams, -when your infrastructure is more complex. -* When your (hardware) stakeholders prefer other kinds of diagrams rather than a deployment diagram, let them use any kind that is able to show nodes and channels of the infrastructure. - - -.Further Information - -See https://docs.arc42.org/section-7/[Deployment View] in the arc42 documentation. - -**** === Infrastructure Level 1 -[role="arc42help"] -**** -Describe (usually in a combination of diagrams, tables, and text): - -* distribution of a system to multiple locations, environments, computers, processors, .., as well as physical connections between them -* important justifications or motivations for this deployment structure -* quality and/or performance features of this infrastructure -* mapping of software artifacts to elements of this infrastructure +image::07-deployment.svg[Deployment View] -For multiple environments or alternative deployments please copy and adapt this section of arc42 for all relevant environments. -**** +Motivation:: -_****_ +The infrastructure consists on a set of containers that will be deployed in a cloud provider. This containers will be responsible for the different parts of the application. The infrastructure will be monitored by Prometheus and Grafana. The data will be stored in a MongoDB database. The application will use Wikidata to obtain the data for the questions. -Motivation:: +=== Infrastructure Level 2 -__ +==== Webapp -Quality and/or Performance Features:: +This container is responsible for the user interface. -__ +==== Question Generator -Mapping of Building Blocks to Infrastructure:: -__ +Question generator is the part of the application that generates the questions for the users. +==== User Service -=== Infrastructure Level 2 +User Service is the part of the application that handles users information. -[role="arc42help"] -**** -Here you can include the internal structure of (some) infrastructure elements from level 1. +==== Auth Service -Please copy the structure from level 1 for each selected element. -**** +Auth Service is the part of the application that handles the authentication of the users. It's very important as it's the first thing a potential user will encounter when they visit our page. -==== APP +==== Stats Service -"App": It is the part with which the user interacts. This part would be responsible for providing the visual interface and using the rest of the created classes. +Stats Service is the part of the application that handles the statistics of the users. -==== LINK +==== Gateway service -"Link" is the part of the application that connects the rest of the parts. This will facilitate the use of the different parts of the application in the App section. +Gateway service is the part of the application that handles the communication between the different parts of the application. -==== REGISTER +==== MongoDB -"Register" is the part of the application that handles user registration and login. It's very important as it's the first thing a potential user will encounter when they visit our page. +MongoDB is the database that will store the data of the users, the questions, the answers, and the statistics of the application. -==== USER SERVICE +==== Prometheus -"User service" is the part of the application that generates the various services within the application to the user, such as a ranking, correctly answered questions, and so on. +Prometheus is the monitoring tool that will be used to monitor the application. -==== QUESTION GENERATOR +==== Grafana -"Question generator" is the part of the application that, using the data from Wikidata and some pre-created templates, generates the questions and possible answers of the application. +Grafana is the visualization tool that will be used to visualize the monitoring of the application. -==== WIKIDATA +==== Wikidata -Wikidata” is the API that you will use to obtain the data for the questions. Wikidata is a free and collaborative database that can be read and edited by both humans and machines. It provides a common source of certain types of data that can be used by Wikimedia projects. +WikiData is the API that you we will use to obtain the data for the questions. Wikidata is a free and collaborative database that can be read and edited by both humans and machines. It provides a common source of certain types of data that can be used by Wikimedia projects. diff --git a/docs/src/08_concepts.adoc b/docs/src/08_concepts.adoc index 53562a23..c24281c8 100644 --- a/docs/src/08_concepts.adoc +++ b/docs/src/08_concepts.adoc @@ -3,123 +3,61 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-concepts]] == Cross-cutting Concepts +=== Domain Concepts -[role="arc42help"] -**** -.Content -This section describes overall, principal regulations and solution ideas that are relevant in multiple parts (= cross-cutting) of your system. -Such concepts are often related to multiple building blocks. -They can include many different topics, such as +This is the actual domain of the application, which is the area of knowledge or activity that the application is designed to support. In this case, the domain is quiz games, which are games that test the player's knowledge on a specific topic. -* models, especially domain models -* architecture or design patterns -* rules for using specific technology -* principal, often technical decisions of an overarching (= cross-cutting) nature -* implementation rules +image::08-Domain.svg[Domain] +=== Architecture and Design Patterns -.Motivation -Concepts form the basis for _conceptual integrity_ (consistency, homogeneity) of the architecture. -Thus, they are an important contribution to achieve inner qualities of your system. +The project follows a microservices architecture, which is a design pattern that structures an application as a collection of loosely coupled services. This makes the application more scalable, flexible, and easier to maintain. -Some of these concepts cannot be assigned to individual building blocks, e.g. security or safety. +=== User Experience (UX) - -.Form -The form can be varied: - -* concept papers with any kind of structure -* cross-cutting model excerpts or scenarios using notations of the architecture views -* sample implementations, especially for technical concepts -* reference to typical usage of standard frameworks (e.g. using Hibernate for object/relational mapping) - -.Structure -A potential (but not mandatory) structure for this section could be: - -* Domain concepts -* User Experience concepts (UX) -* Safety and security concepts -* Architecture and design patterns -* "Under-the-hood" -* development concepts -* operational concepts - -Note: it might be difficult to assign individual concepts to one specific topic -on this list. - -image::08-Crosscutting-Concepts-Structure-EN.png["Possible topics for crosscutting concepts"] - - -.Further Information - -See https://docs.arc42.org/section-8/[Concepts] in the arc42 documentation. -**** - - -=== User Interface +==== User Interface A user interface is the space where a human and a computer or device communicate and exchange information The user interface is the part of the application that directly interacts with the client, in our case, the player. It should function correctly and be user-friendly. -=== Ergonomics -Ergonomics is the science of designing and arranging workplaces, products, and systems to fit and adapt to the people who use them. Ergonomics aims to improve comfort, efficiency, and safety by considering human physical and psychological needs and limitations. - -=== Internationalization - -Internationalization is the practice of designing and developing applications that can support multiple languages, formats, and conventions. - -Internationalization consists of adapting to the language and culture depending on the location, this is very important as it helps users from different regions to be able to use our game - -=== Security - -Security is a broad term that can refer to different aspects of protection, resilience, or prevention of harm. +==== Ergonomics -A minimum of security in the application is important to save our customers' data -=== Safety - -Is the state of being protected from danger or harm. - -=== Build, Test, Deploy - -- Build: This stage involves compiling, validating, and packaging the source code into executable or deployable artifacts. -- Test: This stage involves running various tests, such as unit tests, integration tests, and regression tests, to ensure the quality and functionality of the software. -- Deploy: This stage involves delivering or releasing the software to the target environment, such as a server, a cloud platform, or a user device. - -=== Code Generation +Ergonomics is the science of designing and arranging workplaces, products, and systems to fit and adapt to the people who use them. Ergonomics aims to improve comfort, efficiency, and safety by considering human physical and psychological needs and limitations. -Code generation is the process of creating executable or deployable code from various sources of information, such as natural language, images, or other code. +==== Internationalization -Generating code makes it easier for the programmer to create functions without wasting a lot of time and simply focusing on the correct implementation of the code, an example is for example generating the getters and setters +The application should be able to support multiple languages and regions, so that it can be used by people from different countries and cultures. As of today it has been translated into Spanish and English. -=== Migration +=== Development Concepts -Migrating from one software application or platform to another, such as switching from a legacy system to a modern one, or from a local server to a cloud service. +==== Build, Test, Deploy -=== Configurability +The project follows a CI/CD pipeline that automates the build, test, and deployment processes. This ensures that the application is always up-to-date and working correctly. -Configurability is the ability to modify or customize something, especially in computing, electronics, or devices +==== Configurability -=== Administration +The project has a configuration file that allows the developer to generate new types of questions just by modifying the file. This makes the application more flexible to topic addition. -The process or activity of managing, directing, or organizing something or someone. +=== Security and safety -Administering an application consists of managing all the resources, users to be able to maintain it in a correct way +==== Security -=== Management +The app REST API verifies the user's identity and permissions before allowing access to the resources. It also prevents sensitive data from being exposed to unauthorized users. This ensures that the application is secure and protects the user's data. -Management is the process of organizing and directing the resources of a business or organization to achieve its goals. +==== Safety -=== Disaster-Recovery +The application has a backup system that automatically saves the user's progress in case of a failure. This ensures that the user's data is always safe and can be recovered in case of a problem. -Is the process of restoring the functionality and data of software applications after a disaster, such as a natural calamity, a cyberattack, or a human error. +=== Operation concepts -It is important to have a plan to recover the data in case of a system failure, it is usually a backup. +==== Disaster-Recovery -=== Architecture and design patterns +App containers have restart policies that automatically restart the container in case of a failure. This ensures that the application is always available and running despite any failures. -Architecture and design patterns are concepts that help software developers and architects design and build software systems that are efficient, scalable, and maintainable. +==== Monitoring -Design patterns are important so that your application can scale without cascading changes. +The application has a monitoring system that tracks the performance and availability of the application. This allows the developer to identify and fix any issues before they affect the user's experience. +image::08-Concepts.svg[Architecture] diff --git a/docs/src/09_architecture_decisions.adoc b/docs/src/09_architecture_decisions.adoc index c569aca3..acce062f 100644 --- a/docs/src/09_architecture_decisions.adoc +++ b/docs/src/09_architecture_decisions.adoc @@ -2,29 +2,35 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-design-decisions]] == Architecture Decisions -JavaScript: + +=== JavaScript https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%231)-JavaScript[ADR#1] -ReactJS: +=== ReactJS https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%232)-ReactJS[ADR#2] -NodeJS: +=== NodeJS https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%233)-NodeJS[ADR#3] -MongoDB: +=== MongoDB https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%234)-MongoDB[ADR#4] -Docker: +=== Docker https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%235)-Docker[ADR#5] -MySQL: +=== MySQL https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%236)-MySQL[ADR#6] +=== Chakra UI + +https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%237)-Chakra-UI[ADR#7] +=== BDD de estadísticas +https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%238)-BD-de-estad%C3%ADsticas[ADR#8] diff --git a/docs/src/11_technical_risks.adoc b/docs/src/11_technical_risks.adoc index 0af49a6f..aca5efe1 100644 --- a/docs/src/11_technical_risks.adoc +++ b/docs/src/11_technical_risks.adoc @@ -9,7 +9,7 @@ ifndef::imagesdir[:imagesdir: ../images] | High | Potential application malfunctions | Implement unit tests for key components and critical functions, along with extensive testing with real users | Medium | Slow performance of database queries | Optimize database queries, avoid unnecessary queries | Medium | Potential unavailability of Wikidata | Design the UI to handle missing or incomplete data from Wikidata. -| Low | Unoptimized styles | Optimize CSS styles to improve application performance and loading times +| Low | Unoptimized styles | Optimize styles to improve application performance and loading times | Low | Insufficient documentation | Provide comprehensive documentation of architecture, code structure, development processes, and deployment to facilitate team maintenance and collaboration | Low | Vulnerabilities in user authentication | Implement additional security measures, such as password encryption |===