Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Develop a rama Zohaib #24

Merged
merged 48 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5990175
Replace wiq0 by wi1 es4d
augustocristian Mar 21, 2024
b42d530
Merge pull request #5 from Arquisoft/changewiqwiqd
Santiago21112001 Mar 21, 2024
558c3bf
Merge pull request #4 from Arquisoft/zohaib
Santiago21112001 Mar 21, 2024
0949da4
Conflicto solucionado
Santiago21112001 Mar 21, 2024
0a2dc7c
Merge pull request #6 from Arquisoft/master
Santiago21112001 Mar 21, 2024
c36fcf1
questionservice
Santiago21112001 Mar 21, 2024
4ad3e11
Merge branch 'develop' of https://github.com/Arquisoft/wiq_es04d into…
Santiago21112001 Mar 21, 2024
30eaca8
Correcciones
Santiago21112001 Mar 21, 2024
d36e14e
Update sonar-project.properties
Santiago21112001 Mar 21, 2024
2f4ed95
añadidos esqueletos historial
yagonavajas Mar 21, 2024
d5154b4
añadido modelo del historial
yagonavajas Mar 21, 2024
31ba82f
actualizacion del modelo
yagonavajas Mar 21, 2024
dcb44ed
añadida la funcionalidad a de guardar en historial
yagonavajas Mar 21, 2024
4042e0a
añadido historial al gateway service
yagonavajas Mar 21, 2024
a028af2
cambios menores
yagonavajas Mar 21, 2024
9bcdbfc
cambios menores sigue sin funcionar
yagonavajas Mar 21, 2024
bc1bf15
quitados comentarios
yagonavajas Mar 21, 2024
0a5d832
Conexion entre gateway y history
Verzidee Mar 21, 2024
74e0698
Guardar historial del usuario en session
Verzidee Mar 21, 2024
5c367f2
copiados archivos documentacion sin actualizar
yagonavajas Mar 21, 2024
2dd9a15
actualizados los nombres
yagonavajas Mar 21, 2024
42710fd
unido generador de preguntas al resto de la aplicación
Santiago21112001 Mar 25, 2024
17e8d66
Arreglo
Verzidee Mar 25, 2024
49cbe16
Arreglo jugar.js
Verzidee Mar 25, 2024
172133a
Merge pull request #11 from Arquisoft/develop
Verzidee Mar 25, 2024
8338398
añadidos services a build.yml
yagonavajas Mar 25, 2024
dc4cfac
añadidos servicios al release.yml
yagonavajas Mar 25, 2024
8c22e09
Update release.yml
yagonavajas Mar 25, 2024
2317287
Update release.yml
yagonavajas Mar 25, 2024
bbe4b74
cambio menor
yagonavajas Mar 25, 2024
e0d325e
Merge branch 'master' of https://github.com/Arquisoft/wiq_es04d
yagonavajas Mar 25, 2024
0fc94ab
cambios en los yml
yagonavajas Mar 25, 2024
0511422
Merge pull request #12 from Arquisoft/develop
Verzidee Mar 25, 2024
4adba80
Update Jugar.js
Santiago21112001 Mar 25, 2024
d061806
Arreglo test
Verzidee Mar 25, 2024
8a80d8e
Arreglo test para despliegue
Verzidee Mar 25, 2024
2230378
Arreglo test para despliegue V2
Verzidee Mar 25, 2024
53f4468
cambiado nombre de la aplicacion en el navegador
yagonavajas Mar 25, 2024
86b524c
Merge pull request #13 from Arquisoft/master
Verzidee Mar 25, 2024
db5028b
recuperacion del historial a la vista (sin usuario)
yagonavajas Mar 26, 2024
f076fb4
cambios menores
yagonavajas Mar 26, 2024
685d4e6
Arreglo obtener historial
Verzidee Mar 26, 2024
f99d419
Merge pull request #22 from Arquisoft/yago
Verzidee Mar 26, 2024
64429e2
primera version tests historial
yagonavajas Mar 27, 2024
0f63eb2
cambios en las vistas
yagonavajas Mar 27, 2024
f77a056
Merge branch 'yago' into develop
yagonavajas Mar 27, 2024
f05e9d8
tests historial
yagonavajas Mar 28, 2024
f37909c
cambios en yml
yagonavajas Mar 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
teamname="wiq_0"
teamname="wiq_es04d"
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ jobs:
node-version: 20
- run: npm --prefix users/authservice ci
- run: npm --prefix users/userservice ci
- run: npm --prefix users/historyservice ci
- run: npm --prefix gatewayservice ci
- run: npm --prefix questionservice ci
- run: npm --prefix webapp ci
- run: npm --prefix users/authservice test -- --coverage
- run: npm --prefix users/userservice test -- --coverage
- run: npm --prefix users/historyservice test -- --coverage
- run: npm --prefix gatewayservice test -- --coverage
- run: npm --prefix webapp test -- --coverage
- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
54 changes: 46 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ jobs:
node-version: 20
- run: npm --prefix users/authservice ci
- run: npm --prefix users/userservice ci
- run: npm --prefix users/historyservice ci
- run: npm --prefix gatewayservice ci
- run: npm --prefix webapp ci
- run: npm --prefix questionservice ci
- run: npm --prefix users/authservice test -- --coverage
- run: npm --prefix users/userservice test -- --coverage
- run: npm --prefix users/historyservice test -- --coverage
- run: npm --prefix questionservice test -- --coverage
- run: npm --prefix gatewayservice test -- --coverage
- run: npm --prefix webapp test -- --coverage
- name: Analyze with SonarCloud
Expand Down Expand Up @@ -53,7 +57,7 @@ jobs:
env:
API_URI: http://${{ secrets.DEPLOY_HOST }}:8000
with:
name: arquisoft/wiq_0/webapp
name: arquisoft/wiq_es04d/webapp
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
Expand All @@ -71,7 +75,7 @@ jobs:
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_0/authservice
name: arquisoft/wiq_es04d/authservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
Expand All @@ -88,11 +92,45 @@ jobs:
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_0/userservice
name: arquisoft/wiq_es04d/userservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: users/userservice
docker-push-historyservice:
name: Push history service Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [e2e-tests]
steps:
- uses: actions/checkout@v4
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_es04d/historyservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: users/historyservice
docker-push-questionservice:
name: Push question service Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [e2e-tests]
steps:
- uses: actions/checkout@v4
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_es04d/questionservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: questionservice
docker-push-gatewayservice:
name: Push gateway service Docker Image to GitHub Packages
runs-on: ubuntu-latest
Expand All @@ -109,15 +147,15 @@ jobs:
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_0/gatewayservice
name: arquisoft/wiq_es04d/gatewayservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: gatewayservice
deploy:
name: Deploy over SSH
runs-on: ubuntu-latest
needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp]
needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-historyservice,docker-push-webapp,docker-push-questionservice]
steps:
- name: Deploy over SSH
uses: fifsky/ssh-action@master
Expand All @@ -126,7 +164,7 @@ jobs:
user: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
command: |
wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/.env -O .env
wget https://raw.githubusercontent.com/arquisoft/wiq_es04d/master/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_es04d/master/.env -O .env
docker compose --profile prod down
docker compose --profile prod up -d --pull always
docker compose --profile prod up -d --pull always
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# wiq_0
# wiq_es04d

[![Deploy on release](https://github.com/Arquisoft/wiq_0/actions/workflows/release.yml/badge.svg)](https://github.com/Arquisoft/wiq_0/actions/workflows/release.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_0&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_0)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_0&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_0)
[![Deploy on release](https://github.com/Arquisoft/wiq_es04d/actions/workflows/release.yml/badge.svg)](https://github.com/Arquisoft/wiq_es04d/actions/workflows/release.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_es04d&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_es04d)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_es04d&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_es04d)

This is a base repo for the [Software Architecture course](http://arquisoft.github.io/) in [2023/2024 edition](https://arquisoft.github.io/course2324.html).

Expand All @@ -22,7 +22,7 @@ Both the user and auth service share a Mongo database that is accessed with mong
The fastest way for launching this sample project is using docker. Just clone the project:

```sh
git clone https://github.com/Arquisoft/wiq_0.git
git clone https://github.com/Arquisoft/wiq_es04d.git
```

and launch it with docker compose:
Expand Down Expand Up @@ -106,8 +106,8 @@ deploy:
user: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
command: |
wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/.env -O .env
wget https://raw.githubusercontent.com/arquisoft/wiq_es04d/master/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_es04d/master/.env -O .env
docker compose --profile prod down
docker compose --profile prod up -d --pull always
```
Expand Down
40 changes: 36 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:

authservice:
container_name: authservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/authservice:latest
image: ghcr.io/arquisoft/wiq_es04d/authservice:latest
profiles: ["dev", "prod"]
build: ./users/authservice
depends_on:
Expand All @@ -27,7 +27,7 @@ services:

userservice:
container_name: userservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/userservice:latest
image: ghcr.io/arquisoft/wiq_es04d/userservice:latest
profiles: ["dev", "prod"]
build: ./users/userservice
depends_on:
Expand All @@ -39,26 +39,58 @@ services:
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb

questionservice:
container_name: questionservice-${teamname:-wiq_es04d}
image: ghcr.io/arquisoft/wiq_es04d/questionservice:latest
profiles: ["dev", "prod"]
build: ./questionservice
depends_on:
- mongodb
ports:
- "8003:8003"
networks:
- mynetwork
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb

historyservice:
container_name: historyservice-${teamname:-wiq_es04d}
image: ghcr.io/arquisoft/wiq_es04d/historyservice:latest
profiles: ["dev", "prod"]
build: ./users/historyservice
depends_on:
- mongodb
ports:
- "8004:8004"
networks:
- mynetwork
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb

gatewayservice:
container_name: gatewayservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/gatewayservice:latest
image: ghcr.io/arquisoft/wiq_es04d/gatewayservice:latest
profiles: ["dev", "prod"]
build: ./gatewayservice
depends_on:
- mongodb
- userservice
- authservice
- questionservice
- historyservice
ports:
- "8000:8000"
networks:
- mynetwork
environment:
AUTH_SERVICE_URL: http://authservice:8002
USER_SERVICE_URL: http://userservice:8001
GENERATE_SERVICE_URL: http://questionservice:8003
HISTORY_SERVICE_URL: http://historyservice:8004

webapp:
container_name: webapp-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/webapp:latest
image: ghcr.io/arquisoft/wiq_es04d/webapp:latest
profiles: ["dev", "prod"]
build: ./webapp
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## The documentation
In this project, the documentation is compiled locally and deployed to GitHub pages.
The deployment url is: [https://arquisoft.github.io/wiq_0/](https://arquisoft.github.io/wiq_0/).
The deployment url is: [https://arquisoft.github.io/wiq_es04d/](https://arquisoft.github.io/wiq_es04d/).

### Documentation build
For the documentation, we are going to use [AsciiDoc](https://asciidoc.org/) and [PlantUML](https://plantuml.com) and follow the [Arc42](https://github.com/arc42/arc42-template) template. If you want to be able to generate the doc locally you need to install Ruby, Java and some dependencies to translate the AsciiDoc code into html. If you are in Linux you can install Ruby and Java simply by executing:
Expand Down Expand Up @@ -30,6 +30,6 @@ npm run build
The documentation will be generated under the `docs/build` directory.

### Documentation deployment
If we want to deploy it to GitHub pages, so it is accessible via [https://arquisoft.github.io/wiq_0/](https://arquisoft.github.io/wiq_0/), we need to execute `npm run deploy`.
If we want to deploy it to GitHub pages, so it is accessible via [https://arquisoft.github.io/wiq_es04d/](https://arquisoft.github.io/wiq_es04d/), we need to execute `npm run deploy`.

If you check the `package.json` in this directory you can see how deploying is as easy as executing `gh-pages -d build`, which can be directly executed using `npm run deploy` in the docs directory. The `gh-pages` package is in charge of pushing the documentation generated directory (basically some htmls) to a special github branch called gh-pages. Everything pushed to this branch is accessible on the repository page. Note that we only want to push there the documentation. Also is important that the documentation build is not pushed to the other branches of the project.
21 changes: 21 additions & 0 deletions docs/images/06_sequence-diagram.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@startuml Diagrama de secuencia plantuml
actor usuario
actor system
actor juego
database bbdd as "bbdd"
usuario -> system: inicio sesión
system --> usuario: pedir nombre/contraseña
usuario -> system: dar nombre/contraseña
system -> bbdd: verificar usuario
bbdd --> system: verificación correcta
system --> usuario: inicio sesión correcto
usuario -> system: acceder al juego
system -> juego: iniciar juego
juego --> system: generar pregunta/respuestas
system --> usuario: mostrar pregunta/respuestas
usuario -> system: responder
system -> juego: verificar respuesta
juego --> system: respuesta correcta
system --> usuario: correcta
system -> juego: generar siguiente pregunta/respuestas
@enduml
Binary file added docs/images/08_diagrama_modelo_dominio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/10_Arbol_de_calidad.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Building Block View.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Diagrama de contexto de negocio.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Diagrama de contexto técnico.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Diagrama de secuencia plantuml.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Whitebox Overall System.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/bdLevel2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/diagrama_contexto_tecnico.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/loginLevel2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/uiLevel2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/whiteBoxGeneral.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/whiteLevel1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 1 addition & 11 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// configure EN settings for asciidoc
include::src/config.adoc[]

= image:arc42-logo.png[arc42] Template
= image:arc42-logo.png[arc42] Generador de preguntas
:revnumber: 8.2 EN
:revdate: January 2023
:revremark: (based upon AsciiDoc version)
Expand Down Expand Up @@ -34,16 +34,6 @@ include::src/about-arc42.adoc[]
// horizontal line
***

[role="arc42help"]
****
[NOTE]
====
This version of the template contains some help and explanations.
It is used for familiarization with arc42 and the understanding of the concepts.
For documentation of your own system you use better the _plain_ version.
====
****


// numbering from here on
:numbered:
Expand Down
Loading
Loading