diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67d50836..4755b93a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,7 @@ name: Deploy on release on: release: types: [published] - branches: - - master + jobs: unit-tests: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 60cc45a3..7e6aa075 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ |Martín Cancio Barrera | UO287561 | [Mi github](https://github.com/CANCI0) |Iyán Fernández Riol | UO288231 | [Mi github](https://github.com/iyanfdezz) |Rodrigo García Iglesias | UO276396 | [Mi github](https://github.com/Rodrox11) -|Alfredo Jirout Cid | UO288443 | [Mi github](https://github.com/uo288443) +|Miguel Olamendi Alonso | UO285032 | [Mi github](https://github.com/uo285032) ## Introduction to our project [![Deploy on release](https://github.com/Arquisoft/wiq_es1a/actions/workflows/release.yml/badge.svg)](https://github.com/Arquisoft/wiq_es1a/actions/workflows/release.yml) diff --git a/debug.log b/debug.log new file mode 100644 index 00000000..77d60f2b --- /dev/null +++ b/debug.log @@ -0,0 +1 @@ +[0220/104149.273:ERROR:registration_protocol_win.cc(107)] CreateFile: El sistema no puede encontrar el archivo especificado. (0x2) diff --git a/docs/images/Level2.png b/docs/images/Level2.png new file mode 100644 index 00000000..7360072d Binary files /dev/null and b/docs/images/Level2.png differ diff --git a/docs/images/UML.png b/docs/images/UML.png deleted file mode 100644 index 81d24b94..00000000 Binary files a/docs/images/UML.png and /dev/null differ diff --git a/docs/images/businesscontext.png b/docs/images/businesscontext.png deleted file mode 100644 index 1609bb98..00000000 Binary files a/docs/images/businesscontext.png and /dev/null differ diff --git a/docs/images/businesscontext.svg b/docs/images/businesscontext.svg new file mode 100644 index 00000000..18ddb206 --- /dev/null +++ b/docs/images/businesscontext.svg @@ -0,0 +1,29 @@ +User«system»WIQ!«extern»Wikidataplaysasks questionsrequest data to generate questionsreturns data \ No newline at end of file diff --git a/docs/images/historial.png b/docs/images/historial.png new file mode 100644 index 00000000..c8a50728 Binary files /dev/null and b/docs/images/historial.png differ diff --git a/docs/images/juega.png b/docs/images/juega.png new file mode 100644 index 00000000..3e5a228a Binary files /dev/null and b/docs/images/juega.png differ diff --git a/docs/images/technicalcontext.png b/docs/images/technicalcontext.png deleted file mode 100644 index 3f41aa63..00000000 Binary files a/docs/images/technicalcontext.png and /dev/null differ diff --git a/docs/images/technicalcontext.svg b/docs/images/technicalcontext.svg new file mode 100644 index 00000000..21e5dec1 --- /dev/null +++ b/docs/images/technicalcontext.svg @@ -0,0 +1,50 @@ +DeviceAzureBrowserWIQ!MongoDBUserAdminWikidatainteractsusesSSHHTTP/HTTPSaccessesREST \ No newline at end of file diff --git a/docs/images/whiteBox5.1.png b/docs/images/whiteBox5.1.png new file mode 100644 index 00000000..40cc0c08 Binary files /dev/null and b/docs/images/whiteBox5.1.png differ diff --git a/docs/index.adoc b/docs/index.adoc index 468be5fd..38006e65 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -6,7 +6,7 @@ // configure EN settings for asciidoc include::src/config.adoc[] -= image:arc42-logo.png[arc42] Template += image:arc42-logo.png[arc42] WIQ! Documentation :revnumber: 8.2 EN :revdate: January 2023 :revremark: (based upon AsciiDoc version) diff --git a/docs/package-lock.json b/docs/package-lock.json index 78b54941..ab1646f2 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -1,7 +1,7 @@ { "name": "docs", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -540,390 +540,5 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" } - }, - "dependencies": { - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==" - }, - "async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "requires": { - "lodash": "^4.17.14" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "email-addresses": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz", - "integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" - }, - "filename-reserved-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", - "integrity": "sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==" - }, - "filenamify": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.3.0.tgz", - "integrity": "sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==", - "requires": { - "filename-reserved-regex": "^2.0.0", - "strip-outer": "^1.0.1", - "trim-repeated": "^1.0.0" - } - }, - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" - }, - "gh-pages": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-3.2.3.tgz", - "integrity": "sha512-jA1PbapQ1jqzacECfjUaO9gV8uBgU6XNMV0oXLtfCX3haGLe5Atq8BxlrADhbD6/UdG9j6tZLWAkAybndOXTJg==", - "requires": { - "async": "^2.6.1", - "commander": "^2.18.0", - "email-addresses": "^3.0.1", - "filenamify": "^4.3.0", - "find-cache-dir": "^3.3.1", - "fs-extra": "^8.1.0", - "globby": "^6.1.0" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==", - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "requires": { - "function-bind": "^1.1.2" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" - }, - "is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "requires": { - "hasown": "^2.0.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "requires": { - "semver": "^6.0.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "requires": { - "wrappy": "1" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "requires": { - "find-up": "^4.0.0" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "requires": { - "resolve": "^1.1.6" - } - }, - "resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "requires": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" - }, - "shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "shx": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", - "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", - "requires": { - "minimist": "^1.2.3", - "shelljs": "^0.8.5" - } - }, - "strip-outer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", - "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", - "requires": { - "escape-string-regexp": "^1.0.2" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" - }, - "trim-repeated": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", - "integrity": "sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==", - "requires": { - "escape-string-regexp": "^1.0.2" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - } } } diff --git a/docs/package.json b/docs/package.json index 4a13c872..22e2370d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -4,11 +4,12 @@ "description": "Npm project just for the docs", "main": "index.js", "scripts": { - "build": "shx rm -rf build && asciidoctor -D build -a imagesdir=./images -r asciidoctor-diagram index.adoc && shx cp -R images build", - "deploy": "gh-pages -d build" + "build": "shx rm -rf build && asciidoctor -D build -a imagesdir=./images -r asciidoctor-diagram index.adoc && shx cp -R images build", + "deploy": "gh-pages -d build" }, "dependencies": { - "gh-pages": "^3.2.3", - "shx": "^0.3.3" + "gh-pages": "^3.2.3", + "shx": "^0.3.3" } -} + } + \ No newline at end of file diff --git a/docs/src/01_introduction_and_goals.adoc b/docs/src/01_introduction_and_goals.adoc index 5c1f62d8..b4e0acc0 100644 --- a/docs/src/01_introduction_and_goals.adoc +++ b/docs/src/01_introduction_and_goals.adoc @@ -50,8 +50,8 @@ WIQ! is a software by means of which users can emulate being the participants of | The application must have a well-defined and structured design, so that it is easy to make modifications and/or extensions. | *3* -| *_Privacy_* -| The application must guarantee the privacy of its users' information, with mechanisms in place to prevent intrusions into the system. +| *_Availability_* +| The application must ensure high availability, with mechanisms in place to prevent system failures and ensure continuous access to its services. |=== === Stakeholders diff --git a/docs/src/02_architecture_constraints.adoc b/docs/src/02_architecture_constraints.adoc index de6edc58..96e90792 100644 --- a/docs/src/02_architecture_constraints.adoc +++ b/docs/src/02_architecture_constraints.adoc @@ -6,20 +6,16 @@ ifndef::imagesdir[:imagesdir: ../images] |=== | *_Architecture constraint_* | *_Description_* -| *_Tecnología de Desarrollo_* | The application must be developed using web technologies compatible with RTVE's requirements and standards. +| *_Development Technology_* | The application must be developed using web technologies compatible with RTVE's requirements and standards. -| *_Plataforma de Implementación_* | The application must be implemented on a web hosting platform that meets RTVE's performance, security and scalability requirements. +| *_Implementation Platform_* | The application must be implemented on a web hosting platform that meets RTVE's performance, security and scalability requirements. -| *_Cumplimiento de Normativas de Privacidad_* | The architecture must ensure compliance with data privacy regulations, such as GDPR, to protect users' information. +| *_Privacy Compliance_* | The architecture must ensure compliance with data privacy regulations, such as GDPR, to protect users' information. -| *_Compatibilidad con Navegadores_* | The application should be compatible with a wide range of popular web browsers to ensure a consistent user experience. +| *_Code Maintainability_* | Software development practices that promote clean and well-documented code should be followed to facilitate future upgrades and maintenance. -| *_Seguridad de la Información_* | Strong security measures, such as user authentication, access control and data encryption, must be implemented to protect users' confidential information. - -| *_Escalabilidad_* | The architecture must be scalable to handle increased user traffic without compromising performance. - -| *_Mantenibilidad del Código_* | Software development practices that promote clean and well-documented code should be followed to facilitate future upgrades and maintenance. - -| *_Tiempo de Desarrollo_* | The application must be developed within a specific time frame, which may influence architectural decisions and technology selection. +| *_Development Time_* | The application must be developed within a specific time frame, which may influence architectural decisions and technology selection. +| *_Wikidata Integration_* +| The system architecture must incorporate the use of Wikidata as data source to generate questions, ensuring seamless integration and consistency with external knowledge bases. |=== diff --git a/docs/src/03_system_scope_and_context.adoc b/docs/src/03_system_scope_and_context.adoc index af83295e..c8b3ebff 100644 --- a/docs/src/03_system_scope_and_context.adoc +++ b/docs/src/03_system_scope_and_context.adoc @@ -4,7 +4,23 @@ ifndef::imagesdir[:imagesdir: ../images] == System Scope and Context === Business Context -image::businesscontext.png[Business context] +image::businesscontext.svg[Business context] + +|=== +| *Entity* | *_Description_* +| *_User_* | It's the one that interacts directly with the app. +| *_WIQ!_* | The web application. +| *_Wikidata_* | Source from which data is drawn to formulate questions +|=== === Technical Context -image::technicalcontext.png[Technical Context] +image::technicalcontext.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. +| *_Device_* | The device used by the user to access the application. This node contains the web browser component that allows the user to interact with the application. +| *_Cloud_* | Represents the cloud infrastructure, in this case, Azure. This node contains the "WIQ!" component that hosts the application and allows its access through HTTP/HTTPS protocols. +| *_WIQ!_* | The main application that the user interacts with. It is hosted on the Azure cloud and accesses a MongoDB database to store and retrieve data, as well as interacts with Wikidata through REST. +| *_Wikidata_* | Source from which data is drawn to formulate questions. The application will request data via "Wikidata Query Service", which allows to retrieve data using SparQL. +| *_MongoDB_* | The database management system used by the "WIQ!" application to store and retrieve data. In this case, it is used to store data related to the application. +|=== \ No newline at end of file diff --git a/docs/src/04_solution_strategy.adoc b/docs/src/04_solution_strategy.adoc index cd8d7f4e..32fe86f8 100644 --- a/docs/src/04_solution_strategy.adoc +++ b/docs/src/04_solution_strategy.adoc @@ -3,26 +3,27 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-solution-strategy]] == Solution Strategy -Elaboramos una aplicacíon en la que los usuarios pueden registrarse para jugar, donde en cada juego tendran que responder varias preguntas, de distintas categorias, donde se guardará -un ranking con la máxima puntuación del usuario y se podrá comparar con otros usuarios, también tendra una sección que indique su promedio de aciertos y en que categoría acierta más preguntas. +We developed an application in which users can register to play, where in each game they will have to answer several questions, from different categories, where it will be saved +A ranking with the maximum score of the user and can be compared with other users, it will also have a section that indicates their correct guess and in which category they get the most questions right. -.Tecnologías usadas para llevar a cabo: +.Technologies used to carry out: -* MongoDB: MongoDB es una base de datos NoSQL de código abierto que utiliza un modelo de datos basado en documentos para el almacenamiento y recuperación de información. -* React JS: Es un framework creado por Facebook ampliamente utlizado para crear componentes de la interfaz de usuario. Escogido por el gran volumen de documentación y ser el framework utilizado durante los anteriores cursos. -* WikiData: Es una base de conocimientos gratuita modificada por seres humanos como por máquinas, y es de donde obtendremos nuestras preguntas. -* Microsoft Azure: plataforma de computación en la nube que proporciona servicios de infraestructura, plataforma y software como servicio para alojar, administrar y escalar aplicaciones y servicios en línea. +* 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. +* 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. -.Diseño -La página web diseñada está compuesta por un frontend en React, un backend en Node.js y está documentada usando Asciidoc. Cada usuario tendrá su propia cuenta donde se guardará su información. Las decisiones relacionadas con el diseño se detallan en el punto 9. +=== 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. -.Seguridad -Garantizamos la seguridad del usuario +=== Security +We guarantee the safety of the user -.Testabilidad -Se realizarán pruebas para cada parte individual de la aplicación, garantizando así el correcto funcionamiento de los diferentes modulos tanto individualmente como de forma conjunta. +=== 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. + +=== Interface +The graphical interface will be chosen among all the members of the team, each one contributing a sketch or idea, which will be shared and it will be decided which best fits the expected performance and which elements of these sketches are most suitable. +This will take into account the usability and needs of different types of users. -.Interfaz -La interfaz gráfica será elegida entre todos los miembros del equipo, aportando cada uno algún boceto o idea, los cuales serán puestos en común y se decidirá cual se ajusta mejor a la apicación esperada y que elementos de dichos bocetos resultan más adecuados. -Para ello se tendrá en cuenta la usabilidad y las necesidades de los difentes tipos de usuarios. diff --git a/docs/src/05_building_block_view.adoc b/docs/src/05_building_block_view.adoc index df5c29c8..010f4318 100644 --- a/docs/src/05_building_block_view.adoc +++ b/docs/src/05_building_block_view.adoc @@ -5,208 +5,42 @@ ifndef::imagesdir[:imagesdir: ../images] == Building Block View -[role="arc42help"] -**** -.Content -The building block view shows the static decomposition of the system into building blocks (modules, components, subsystems, classes, interfaces, packages, libraries, frameworks, layers, partitions, tiers, functions, macros, operations, data structures, ...) as well as their dependencies (relationships, associations, ...) - -This view is mandatory for every architecture documentation. -In analogy to a house this is the _floor plan_. - -.Motivation -Maintain an overview of your source code by making its structure understandable through -abstraction. - -This allows you to communicate with your stakeholder on an abstract level without disclosing implementation details. - -.Form -The building block view is a hierarchical collection of black boxes and white boxes -(see figure below) and their descriptions. - -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. - -*Level 2* zooms into some building blocks of level 1. -Thus it contains the white box description of selected building blocks of level 1, together with black box descriptions of their internal building blocks. - -*Level 3* zooms into selected building blocks of level 2, and so on. - - -.Further Information - -See https://docs.arc42.org/section-5/[Building Block View] in the arc42 documentation. - -**** - === Whitebox Overall System -[role="arc42help"] -**** -Here you describe the decomposition of the overall system using the following white box template. It contains - - * an overview diagram - * a motivation for the decomposition - * black box descriptions of the contained building blocks. For these we offer you alternatives: - - ** use _one_ table for a short and pragmatic overview of all contained building blocks and their interfaces - ** use a list of black box descriptions of the building blocks according to the black box template (see below). - Depending on your choice of tool this list could be sub-chapters (in text files), sub-pages (in a Wiki) or nested elements (in a modeling tool). - - - * (optional:) important interfaces, that are not explained in the black box templates of a building block, but are very important for understanding the white box. -Since there are so many ways to specify interfaces why do not provide a specific template for them. - In the worst case you have to specify and describe syntax, semantics, protocols, error handling, - restrictions, versions, qualities, necessary compatibilities and many things more. -In the best case you will get away with examples or simple signatures. - -**** - -_****_ +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. -Motivation:: +image::whiteBox5.1.png["Hierarchy of building blocks"] -__ - - -Contained Building Blocks:: -__ - -Important Interfaces:: -__ - -[role="arc42help"] -**** -Insert your explanations of black boxes from level 1: - -If you use tabular form you will only describe your black boxes with name and -responsibility according to the following schema: - -[cols="1,2" options="header"] |=== -| **Name** | **Responsibility** -| __ | __ -| __ | __ +| *_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. |=== - -If you use a list of black box descriptions then you fill in a separate black box template for every important building block . -Its headline is the name of the black box. -**** - - -==== - -[role="arc42help"] -**** -Here you describe -according the the following black box template: - -* Purpose/Responsibility -* Interface(s), when they are not extracted as separate paragraphs. This interfaces may include qualities and performance characteristics. -* (Optional) Quality-/Performance characteristics of the black box, e.g.availability, run time behavior, .... -* (Optional) directory/file location -* (Optional) Fulfilled requirements (if you need traceability to requirements). -* (Optional) Open issues/problems/risks - -**** - -__ - -__ - -_<(Optional) Quality/Performance Characteristics>_ - -_<(Optional) Directory/File Location>_ - -_<(Optional) Fulfilled Requirements>_ - -_<(optional) Open Issues/Problems/Risks>_ - - - - -==== - -__ - -==== - -__ - - -==== - -... - -==== +=== Blackbox Overall System +|=== +| *_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 +|=== === Level 2 -[role="arc42help"] -**** -Here you can specify the inner structure of (some) building blocks from level 1 as white boxes. - -You have to decide which building blocks of your system are important enough to justify such a detailed description. -Please prefer relevance over completeness. Specify important, surprising, risky, complex or volatile building blocks. -Leave out normal, simple, boring or standardized parts of your system -**** - -==== White Box __ - -[role="arc42help"] -**** -...describes the internal structure of _building block 1_. -**** - -__ - -==== White Box __ - - -__ - -... - -==== White Box __ - - -__ - - - -=== Level 3 - -[role="arc42help"] -**** -Here you can specify the inner structure of (some) building blocks from level 2 as white boxes. - -When you need more detailed levels of your architecture please copy this -part of arc42 for additional levels. -**** - - -==== White Box <_building block x.1_> - -[role="arc42help"] -**** -Specifies the internal structure of _building block x.1_. -**** - - -__ - - -==== White Box <_building block x.2_> - -__ - +image::Level2.png["Hierarchy of building blocks"] +.Motivation -==== White Box <_building block y.1_> +In this diagram we can see the decided microservices that will provide all the operations necessary for the +application to work properly. -__ +|=== +| *_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. +|=== \ No newline at end of file diff --git a/docs/src/06_runtime_view.adoc b/docs/src/06_runtime_view.adoc index e10f375b..7886952d 100644 --- a/docs/src/06_runtime_view.adoc +++ b/docs/src/06_runtime_view.adoc @@ -4,62 +4,14 @@ ifndef::imagesdir[:imagesdir: ../images] == Runtime View -[role="arc42help"] -**** -.Contents -The runtime view describes concrete behavior and interactions of the system’s building blocks in form of scenarios from the following areas: +=== -* important use cases or features: how do building blocks execute them? -* interactions at critical external interfaces: how do building blocks cooperate with users and neighboring systems? -* operation and administration: launch, start-up, stop -* error and exception scenarios +The user starts a game, and the game uses the questions service to run it. -Remark: The main criterion for the choice of possible scenarios (sequences, workflows) is their *architectural relevance*. It is *not* important to describe a large number of scenarios. You should rather document a representative selection. +image::juega.png["Hierarchy of building blocks"] -.Motivation -You should understand how (instances of) building blocks of your system perform their job and communicate at runtime. -You will mainly capture scenarios in your documentation to communicate your architecture to stakeholders that are less willing or able to read and understand the static models (building block view, deployment view). +=== -.Form -There are many notations for describing scenarios, e.g. +The user checks their scores and statistics. -* numbered list of steps (in natural language) -* activity diagrams or flow charts -* sequence diagrams -* BPMN or EPCs (event process chains) -* state machines -* ... - - -.Further Information - -See https://docs.arc42.org/section-6/[Runtime View] in the arc42 documentation. - -**** - -=== - - -* __ -* __ - -It is possible to use a sequence diagram: - -[plantuml,"Sequence diagram",png] ----- -actor Alice -actor Bob -database Pod as "Bob's Pod" -Alice -> Bob: Authentication Request -Bob --> Alice: Authentication Response -Alice --> Pod: Store route -Alice -> Bob: Another authentication Request -Alice <-- Bob: another authentication Response ----- - -=== - -=== ... - -=== +image::historial.png["Hierarchy of building blocks"] \ No newline at end of file diff --git a/docs/src/07_deployment_view.adoc b/docs/src/07_deployment_view.adoc index 32417784..b5c01034 100644 --- a/docs/src/07_deployment_view.adoc +++ b/docs/src/07_deployment_view.adoc @@ -43,7 +43,6 @@ See https://docs.arc42.org/section-7/[Deployment View] in the arc42 documentatio **** === Infrastructure Level 1 -image::UML.png[UML] [role="arc42help"] **** @@ -61,16 +60,14 @@ _****_ Motivation:: -__ +__ Quality and/or Performance Features:: -__ +__ Mapping of Building Blocks to Infrastructure:: -__ +__ === Infrastructure Level 2 @@ -82,16 +79,26 @@ Here you can include the internal structure of (some) infrastructure elements fr Please copy the structure from level 1 for each selected element. **** -==== __ +==== APP -__ +"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. -==== __ +==== LINK -__ +"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. -... +==== REGISTER -==== __ +"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. -__ +==== USER SERVICE + +"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. + +==== QUESTION GENERATOR + +"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. + +==== 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. diff --git a/docs/src/08_concepts.adoc b/docs/src/08_concepts.adoc index a3e657b5..53562a23 100644 --- a/docs/src/08_concepts.adoc +++ b/docs/src/08_concepts.adoc @@ -56,62 +56,70 @@ See https://docs.arc42.org/section-8/[Concepts] in the arc42 documentation. **** -=== __ +=== 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. -__ +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: This stage involves compiling, validating, and packaging the source code into executable or deployable artifacts. +=== 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. >_ +- 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 + +Code generation is the process of creating executable or deployable code from various sources of information, such as natural language, images, or other code. -=== __ +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 -__ +=== Migration -=== __ +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. -__ +=== Configurability -=== __ +Configurability is the ability to modify or customize something, especially in computing, electronics, or devices -__ +=== Administration -=== __ +The process or activity of managing, directing, or organizing something or someone. -__ +Administering an application consists of managing all the resources, users to be able to maintain it in a correct way -=== __ +=== Management -__ +Management is the process of organizing and directing the resources of a business or organization to achieve its goals. -=== __ +=== Disaster-Recovery -__ +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. -=== __ +It is important to have a plan to recover the data in case of a system failure, it is usually a backup. -__ +=== Architecture and design patterns +Architecture and design patterns are concepts that help software developers and architects design and build software systems that are efficient, scalable, and maintainable. +Design patterns are important so that your application can scale without cascading changes. -=== __ -__ diff --git a/docs/src/09_architecture_decisions.adoc b/docs/src/09_architecture_decisions.adoc index 806c71f7..c569aca3 100644 --- a/docs/src/09_architecture_decisions.adoc +++ b/docs/src/09_architecture_decisions.adoc @@ -3,53 +3,28 @@ ifndef::imagesdir[:imagesdir: ../images] [[section-design-decisions]] == Architecture Decisions JavaScript: - We will use the JavaScript language to create both the front-end and the backend of the application, is the default technology of the initial project. -ReactJS: - The base project they have given us uses ReactJS for the front-end of the application, although it is a framework with which we are not familiar. - We think that is a good oportunity to start using this framework. - -NodeJS: - We use NodeJS for the back-end of the application, this is the default technology of the initial project and all the group thought it was a good idea - to use it. +https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%231)-JavaScript[ADR#1] -MongoDB - The base project they have given us uses MongoDB for the back-end of the application, a DBMS with which we are not familiar, but it seemed like a - good idea to learn this GBD system. +ReactJS: -Docker: - We will use Docker to package the application modules in containers, it is the initial technology of the project +https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%232)-ReactJS[ADR#2] -MySQL: - The base project that they have given us uses MongoDB for the back-end of the application, a DBMS with which we are not familiar, however MySQL is another -database management system that we have used in other subjects. We decided to discard this option to learn how to use MongoDB +NodeJS: -[role="arc42help"] -**** -.Contents -Important, expensive, large scale or risky architecture decisions including rationales. -With "decisions" we mean selecting one alternative based on given criteria. +https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%233)-NodeJS[ADR#3] -Please use your judgement to decide whether an architectural decision should be documented -here in this central section or whether you better document it locally -(e.g. within the white box template of one building block). +MongoDB: -Avoid redundancy. -Refer to section 4, where you already captured the most important decisions of your architecture. +https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%234)-MongoDB[ADR#4] -.Motivation -Stakeholders of your system should be able to comprehend and retrace your decisions. +Docker: -.Form -Various options: +https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%235)-Docker[ADR#5] -* ADR (https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions[Documenting Architecture Decisions]) for every important decision -* List or table, ordered by importance and consequences or: -* more detailed in form of separate sections per decision +MySQL: + +https://github.com/Arquisoft/wiq_es1a/wiki/(ADR-%236)-MySQL[ADR#6] -.Further Information -See https://docs.arc42.org/section-9/[Architecture Decisions] in the arc42 documentation. -There you will find links and examples about ADR. -**** diff --git a/docs/src/10_quality_requirements.adoc b/docs/src/10_quality_requirements.adoc index 57305a91..c775e2b4 100644 --- a/docs/src/10_quality_requirements.adoc +++ b/docs/src/10_quality_requirements.adoc @@ -8,8 +8,6 @@ These are: * Performance: ability of the software system to respond well to user interactions and perform tasks efficiently. -* Security: protection of the system from unauthorized access, data breaches, and malicious activities, ensuring safety of sensitive information. - * Usability: intuitiveness of the software interface, making it easy for users to interact with the system. * Maintainability: how easily the software system can be modified, updated, and extended without significant effort or risk. @@ -19,13 +17,11 @@ These are: * Quality - Performance - - Security - Usability - Maintainability * Relationships - Quality -> Performance - - Quality -> Security - Quality -> Usability - Quality -> Maintainability @@ -37,9 +33,8 @@ These are: |=== |Aspect|Source|Stimulus|Artefact|Environment|Response|Response Measurement | Performance |User |While playing, a user selects a response to a question.|User Interface|Normal gameplay conditions.|The system updates its interface very fast and the user knows if they responded correctly, so they can keep playing.|Interface update time is less than 0.5 seconds. -|Security|User|A new user registers in the game by providing their username and password.|Encrypting system|User registration process.|The server encrypts the user's password before storing it in the MongoDB database, so it is safe from data leaks.|Passwords are encrypted using a strong hashing algorithm. -|Usability|User|A new user starts playing the game.|User Interface|Initial game setup.|The user interface displays available options and provides clear instructions on how to play, including a 'Help' button.|User can navigate through the interface without guidance. -|Performance|User|A user finishes playing a game and wants to start a new one.|System and User Interface|Post-game completion.|The system ends the current game, displays the user's score, resets all game elements, and offers the option to start a new game.|Score is saved accurately, and game restarts without errors. +| Usability |User|A new user starts playing the game.|User Interface|Initial game setup.|The user interface displays available options and provides clear instructions on how to play, including a 'Help' button.|User can navigate through the interface without guidance. +| Performance |User|A user finishes playing a game and wants to start a new one.|System and User Interface|Post-game completion.|The system ends the current game, displays the user's score, resets all game elements, and offers the option to start a new game.|Score is saved accurately, and game restarts without errors. |=== @@ -48,8 +43,7 @@ These are: [options="header"] |=== | Aspect | Source | Stimulus | Artefact | Environment | Response | Response Measurement -| Security / Maintainability | Developers | We want to add the option of logging in with an e-mail instead of an username | Login system is well structured so it is easy to modify it or add new ways of logging in | Normal conditions | The development team implements the new login method easily, ensuring that neither the current data or the new credentials will be compromised | Successful integration of the new login method without compromising data -| Security | Developers | The decision is made to transition from MongoDB to another database system | User data migration to a new database system is secured | Database migration phase | The system initiates a secure data migration process, ensuring all user data, including usernames and passwords, is transferred to the new database system intact and encrypted | Successful transfer of user data without compromise +| Maintainability | Developers | We want to add the option of logging in with an e-mail instead of an username | Login system is well structured so it is easy to modify it or add new ways of logging in | Normal conditions | The development team implements the new login method easily, ensuring that neither the current data or the new credentials will be compromised | Successful integration of the new login method without compromising data | Maintainability | Developers | Developers want to add a new game mode | The game's code is well-structured and documented | Development phase | Due to code being well-structured and documented, it is easy to add new functionality to our system without risking our already implemented functionality | Successful addition of new game mode | Maintainability | Developers | An error is identified in the game that needs to be corrected. | The game's code is well-structured and documented | Error identification and resolution phase | Due to code being well-structured and documented, developers can easily locate the error and correct it | Successful identification and correction of the error |=== \ No newline at end of file diff --git a/docs/src/11_technical_risks.adoc b/docs/src/11_technical_risks.adoc index 319aea3e..0af49a6f 100644 --- a/docs/src/11_technical_risks.adoc +++ b/docs/src/11_technical_risks.adoc @@ -5,10 +5,11 @@ ifndef::imagesdir[:imagesdir: ../images] [options="header"] |=== -| Priority | Description of Risk/Technical Debt | Suggested Measures -| High | Vulnerabilities in user authentication | Implement additional security measures, such as password encryption +| Priority | Description of Risk/Technical Debt | Suggested Measures | 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 | 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 |=== diff --git a/docs/src/12_glossary.adoc b/docs/src/12_glossary.adoc index 810bb367..b4774116 100644 --- a/docs/src/12_glossary.adoc +++ b/docs/src/12_glossary.adoc @@ -7,20 +7,20 @@ ifndef::imagesdir[:imagesdir: ../images] |=== |Term |Definition -|Quality Tree -| Structured representation of quality attributes and their relationships. +|WIQ +| Application or game based on the TV show "Saber y Ganar". -|Quality Scenarios -| Specific instances or situations that show the behavior of a system under various quality attributes. +|Login +| Process of authenticating a user's identity to access the application. -|Change Scenarios -| Scenarios depicting how a system responds or adapts to changes, like fixes or addings. +|Wikidata +| Online collaborative database storing structured data and linking information across different projects and languages. -|Usage Scenarios -| Instances demonstrating how users interact with a system in various contexts. +|User +| Person who interacts with a system, service, or application to perform tasks. -|User Interface -| The visual and interactive part of a computer program or system through which users interact. +|Admin +| Person with special rights or authority to manageaspects of an application. |Query | Request for information from a database. @@ -31,6 +31,9 @@ ifndef::imagesdir[:imagesdir: ../images] |Documentation | Written information regarding a system's design, functionality, or usage. +|Distractors +| Incorrect or irrelevant options or elements included in a question. + |NodeJS | Runtime environment that allows the execution of JavaScript code outside of a web browser. diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 5df3cc1b..c46904c2 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -12,6 +12,7 @@ const questionServiceUrl = process.env.QUESTION_SERVICE_URL || "http://localhost:8003"; const statsServiceUrl = process.env.AUTH_SERVICE_URL || "http://localhost:8004"; + app.use(cors()); app.use(express.json()); diff --git a/package-lock.json b/package-lock.json index d2381195..c26dfd20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,11 +5,13 @@ "packages": { "": { "dependencies": { + "axios": "^1.6.7", "cors": "^2.8.5", "cron": "^3.1.6", "cross-fetch": "^4.0.0", "date-fns": "^3.3.1", + "react-auth-kit": "^3.0.2-alpha.19" } }, @@ -230,6 +232,7 @@ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", "peer": true }, + "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -319,6 +322,7 @@ "node": ">= 6" } }, + "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -442,6 +446,7 @@ } } }, + "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -469,6 +474,7 @@ "node": ">=0.10.0" } }, + "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -605,15 +611,11 @@ } } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/vary": { "version": "1.1.2", @@ -636,6 +638,7 @@ "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } + } } } diff --git a/package.json b/package.json index 3352cf06..8b36ab8f 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "cron": "^3.1.6", "cross-fetch": "^4.0.0", "date-fns": "^3.3.1", + "react-auth-kit": "^3.0.2-alpha.19" } } diff --git a/webapp/src/App.css b/webapp/src/App.css index a5ff5dde..625dd1c8 100644 --- a/webapp/src/App.css +++ b/webapp/src/App.css @@ -55,6 +55,7 @@ a { -webkit-box-shadow: 10px 10px 6px 0px var(--shadow); -moz-box-shadow: 10px 10px 6px 0px var(--shadow); box-shadow: 5px 5px 6px 0px var(--shadow); + } input:hover, diff --git a/webapp/src/App.test.js b/webapp/src/App.test.js index d7bbd29f..e390801e 100644 --- a/webapp/src/App.test.js +++ b/webapp/src/App.test.js @@ -90,5 +90,6 @@ describe('Footer Component', () => { /*test('renders learn react link', () => { render(); const linkElement = screen.getByText(/Welcome to wiq_es1a/i); - expaect(linkElement).toBeInTheDocument(); -});*/ \ No newline at end of file + expect(linkElement).toBeInTheDocument(); +});*/ + diff --git a/webapp/src/components/Login/Login.js b/webapp/src/components/Login/Login.js index 7ff7e05d..b395e1a4 100644 --- a/webapp/src/components/Login/Login.js +++ b/webapp/src/components/Login/Login.js @@ -2,26 +2,35 @@ import React, { useState } from 'react'; import axios from 'axios'; import { Container, Typography, TextField, Button, Snackbar } from '@mui/material'; + import {useNavigate} from "react-router-dom"; +import useSignIn from 'react-auth-kit/hooks/useSignIn'; +import './Login.css'; + const Login = () => { + const signIn = useSignIn(); const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); + const [token, setToken] = useState(''); const [error, setError] = useState(''); const [loginSuccess, setLoginSuccess] = useState(false); const [createdAt, setCreatedAt] = useState(''); const [openSnackbar, setOpenSnackbar] = useState(false); const navigate = useNavigate(); + const navigate = useNavigate(); + const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; const loginUser = async () => { try { const response = await axios.post(`${apiEndpoint}/login`, { username, password }); - + console.log(response); // Extract data from the response const { createdAt: userCreatedAt } = response.data; const { token: token } = response.data; + setCreatedAt(userCreatedAt); setLoginSuccess(true); @@ -29,9 +38,10 @@ const Login = () => { localStorage.setItem('token', token); localStorage.setItem('username', username); - + } catch (error) { - setError(error.response.data.error); + //console.log(error); + //setError(error.response.data.error); } }; @@ -40,40 +50,43 @@ const Login = () => { }; return ( - +
{loginSuccess ? ( navigate("/home") ) : ( -
- - Login - - +

Login

+ setUsername(e.target.value)} /> - setPassword(e.target.value)} /> - - + + {openSnackbar && ( +
+ Login successful +
+ )} {error && ( - setError('')} message={`Error: ${error}`} /> +
+ Error: {error} +
)} -
+ )} - - ); -}; +
+ ) +} -export default Login; \ No newline at end of file +export default Login; diff --git a/webapp/src/components/Login/Login.test.js b/webapp/src/components/Login/Login.test.js index a844eae4..af102dcf 100644 --- a/webapp/src/components/Login/Login.test.js +++ b/webapp/src/components/Login/Login.test.js @@ -59,4 +59,4 @@ describe('Login component', () => { expect(screen.queryByText(/Hello testUser!/i)).toBeNull(); expect(screen.queryByText(/Your account was created on/i)).toBeNull(); }); -}); \ No newline at end of file +}); diff --git a/webapp/src/components/Register/Register.test.js b/webapp/src/components/Register/Register.test.js index c2272b0d..87334886 100644 --- a/webapp/src/components/Register/Register.test.js +++ b/webapp/src/components/Register/Register.test.js @@ -2,7 +2,7 @@ import React from 'react'; import { render, fireEvent, screen, waitFor } from '@testing-library/react'; import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; -import Register from './Register'; +import AddUser from './AddUser'; const mockAxios = new MockAdapter(axios); @@ -12,7 +12,7 @@ describe('AddUser component', () => { }); it('should add user successfully', async () => { - render(); + render(); const usernameInput = screen.getByLabelText(/Username/i); const passwordInput = screen.getByLabelText(/Password/i); @@ -35,7 +35,7 @@ describe('AddUser component', () => { }); it('should handle error when adding user', async () => { - render(); + render(); const usernameInput = screen.getByLabelText(/Username/i); const passwordInput = screen.getByLabelText(/Password/i); @@ -56,4 +56,4 @@ describe('AddUser component', () => { expect(screen.getByText(/Error: Internal Server Error/i)).toBeInTheDocument(); }); }); -}); \ No newline at end of file +}); diff --git a/webapp/src/pages/Home/Home.js b/webapp/src/pages/Home/Home.js index b38f0807..b0a23d5e 100644 --- a/webapp/src/pages/Home/Home.js +++ b/webapp/src/pages/Home/Home.js @@ -3,6 +3,7 @@ import "./Home.css"; import Nav from '../../components/Nav/Nav.js'; import Footer from '../../components/Footer/Footer.js'; import { Link } from "react-router-dom"; + import { useLocation } from "react-router-dom"; const Home = () => {