Skip to content

Commit

Permalink
Merge pull request #78 from Arquisoft/Develop
Browse files Browse the repository at this point in the history
Interfaz base
  • Loading branch information
uo276839 authored Mar 4, 2024
2 parents ccdbaf8 + d174e49 commit d905c7e
Show file tree
Hide file tree
Showing 88 changed files with 13,455 additions and 832 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ jobs:
node-version: 20
- run: npm --prefix users/authservice ci
- run: npm --prefix users/userservice ci
- run: npm --prefix question_generator ci
- run: npm --prefix questionservice ci
- run: npm --prefix gameservice ci
- run: npm --prefix gatewayservice ci
- run: npm --prefix webapp ci
- run: npm --prefix users/authservice test -- --coverage
- run: npm --prefix users/userservice test -- --coverage
- run: npm --prefix gameservice test -- --coverage
- run: npm --prefix questionservice test -- --coverage
- run: npm --prefix question_generator test -- --coverage
- run: npm --prefix gatewayservice test -- --coverage
- run: npm --prefix webapp test -- --coverage
- name: Analyze with SonarCloud
Expand Down
62 changes: 61 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ jobs:
node-version: 20
- run: npm --prefix users/authservice ci
- run: npm --prefix users/userservice ci
- run: npm --prefix question_generator ci
- run: npm --prefix questionservice ci
- run: npm --prefix gameservice ci
- run: npm --prefix gatewayservice ci
- run: npm --prefix webapp ci
- run: npm --prefix users/authservice test -- --coverage
- run: npm --prefix users/userservice test -- --coverage
- run: npm --prefix questionservice test -- --coverage
- run: npm --prefix question_generator test -- --coverage
- run: npm --prefix gameservice test -- --coverage
- run: npm --prefix gatewayservice test -- --coverage
- run: npm --prefix webapp test -- --coverage
- name: Analyze with SonarCloud
Expand All @@ -35,6 +41,9 @@ jobs:
node-version: 20
- run: npm --prefix users/authservice install
- run: npm --prefix users/userservice install
- run: npm --prefix question_generator install
- run: npm --prefix questionservice install
- run: npm --prefix gameservice install
- run: npm --prefix gatewayservice install
- run: npm --prefix webapp install
- run: npm --prefix webapp run build
Expand Down Expand Up @@ -93,6 +102,57 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: users/userservice
docker-push-questiongenerationservice:
name: Push question generation 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_es3b/question_generator
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: question_generator
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_es3b/questionservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: questionservice
docker-push-gameservice:
name: Push game 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_es3b/gameservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: gameservice
docker-push-gatewayservice:
name: Push gateway service Docker Image to GitHub Packages
runs-on: ubuntu-latest
Expand All @@ -113,7 +173,7 @@ jobs:
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-questiongenerationservice,docker-push-questionservice,docker-push-gameservice,docker-push-gatewayservice,docker-push-webapp]
steps:
- name: Deploy over SSH
uses: fifsky/ssh-action@master
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The deploy action is the following:
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-webapp,docker-push-questiongenerationservice, docker-push-questionservice]
steps:
- name: Deploy over SSH
uses: fifsky/ssh-action@master
Expand Down
49 changes: 48 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,44 @@ services:
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb

questiongenerationservice:
container_name: questiongenerationservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es3b/questiongenerationservice:latest
profiles: ["dev", "prod"]
build: ./question_generator
ports:
- "8003:8003"
networks:
- mynetwork

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

gameservice:
container_name: gameservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es3b/gameservice:latest
profiles: ["dev", "prod"]
build: ./gameservice
depends_on:
- mongodb
ports:
- "8005:8005"
networks:
- mynetwork
environment:
MONGODB_URI: mongodb://mongodb:27017/gamesdb

gatewayservice:
container_name: gatewayservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es3b/gatewayservice:latest
Expand All @@ -48,13 +86,19 @@ services:
- mongodb
- userservice
- authservice
- questiongenerationservice
- questionservice
- gameservice
ports:
- "8000:8000"
networks:
- mynetwork
environment:
AUTH_SERVICE_URL: http://authservice:8002
USER_SERVICE_URL: http://userservice:8001
QUESTION_GENERATION_SERVICE_URL: http://questiongenerationservice:8003
QUESTIONS_SERVICE_URL: http://questionservice:8004
GAME_SERVICE_URL: http://gameservice:8005

webapp:
container_name: webapp-${teamname:-defaultASW}
Expand All @@ -64,7 +108,10 @@ services:
depends_on:
- gatewayservice
ports:
- "3000:3000"
- "3000:3000"
#volumes:
#- ./webapp:/app


prometheus:
image: prom/prometheus
Expand Down
Binary file added docs/images/GameView.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/StartView.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/UserView.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/context.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/deployment.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/level1.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/level2.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/level3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 22 additions & 79 deletions docs/src/01_introduction_and_goals.adoc
Original file line number Diff line number Diff line change
@@ -1,93 +1,36 @@
ifndef::imagesdir[:imagesdir: ../images]

[[section-introduction-and-goals]]
== Introduction and Goals
WIQ is a web application developed by HappySw that allows users to play an online quiz game.

[role="arc42help"]
****
Describes the relevant requirements and the driving forces that software architects and development team must consider.
These include
* underlying business goals,
* essential features,
* essential functional requirements,
* quality goals for the architecture and
* relevant stakeholders and their expectations
****
The questions are automatically generated from Wikidata data and can be grouped by topic. Users can get a prize for each correctly answered question within a limited time and can also check their historical results in the game.

=== Requirements Overview
The main functional requirements to be met are:

[role="arc42help"]
****
.Contents
Short description of the functional requirements, driving forces, extract (or abstract)
of requirements. Link to (hopefully existing) requirements documents
(with version number and information where to find it).
.Motivation
From the point of view of the end users a system is created or modified to
improve support of a business activity and/or improve the quality.
.Form
Short textual description, probably in tabular use-case format.
If requirements documents exist this overview should refer to these documents.
Keep these excerpts as short as possible. Balance readability of this document with potential redundancy w.r.t to requirements documents.
.Further Information
See https://docs.arc42.org/section-1/[Introduction and Goals] in the arc42 documentation.
****
* Users must be able to register
* Users must be able to consult their participation history
* Each question must have one correct answer and several incorrect answers.
* Questions must have a time limit to answer them
* Access to the user's data must be allowed through an API.
* Access to the information of the generated questions must be allowed through an API.

=== Quality Goals

[role="arc42help"]
****
.Contents
The top three (max five) quality goals for the architecture whose fulfillment is of highest importance to the major stakeholders.
We really mean quality goals for the architecture. Don't confuse them with project goals.
They are not necessarily identical.
Consider this overview of potential topics (based upon the ISO 25010 standard):
image::01_2_iso-25010-topics-EN.drawio.png["Categories of Quality Requirements"]
.Motivation
You should know the quality goals of your most important stakeholders, since they will influence fundamental architectural decisions.
Make sure to be very concrete about these qualities, avoid buzzwords.
If you as an architect do not know how the quality of your work will be judged...
.Form
A table with quality goals and concrete scenarios, ordered by priorities
****
The quality goals in order of priority are as follows:
[options="header",cols="1,2"]
|===
|Quality goal|Description
|Usability|The application must be easy to understand and use
|Performance efficiency|Question generation must be efficient
|Security|The confidentiality and integrity of user data must be ensured
|Maintainability|The application must be testable and easily modifiable
|===

=== Stakeholders

[role="arc42help"]
****
.Contents
Explicit overview of stakeholders of the system, i.e. all person, roles or organizations that
* should know the architecture
* have to be convinced of the architecture
* have to work with the architecture or with code
* need the documentation of the architecture for their work
* have to come up with decisions about the system or its development
.Motivation
You should know all parties involved in development of the system or affected by the system.
Otherwise, you may get nasty surprises later in the development process.
These stakeholders determine the extent and the level of detail of your work and its results.
.Form
Table with role names, person names, and their expectations with respect to the architecture and its documentation.
****

[options="header",cols="1,2,2"]
|===
|Role/Name|Contact|Expectations
| _<Role-1>_ | _<Contact-1>_ | _<Expectation-1>_
| _<Role-2>_ | _<Contact-2>_ | _<Expectation-2>_
| Teachers | They interact with the development team and review the project to detect and correct errors| The application must meet all functional requirements and must follow the quality goals
| RTVE (client) | Company commissioning the development of the application | The company hopes that the application will be easy to use for all users and that it will be a good version of its "Saber y Ganar" programme
| Development Team| They are the creators of the project | They must develop an application that meets all the requirements and is attractive in order to attract as many users as possible
|Users|End-users who will interact with the application|They expect it to be user-friendly, attractive and similar to the programme it imitates ("Saber y Ganar")
|===
46 changes: 23 additions & 23 deletions docs/src/02_architecture_constraints.adoc
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
ifndef::imagesdir[:imagesdir: ../images]

[[section-architecture-constraints]]
== Architecture Constraints

=== Technical constraints
[options="header",cols="1,2"]
|===
|Constraint|Description
|Wikidata|The generation of the questions should be done automatically with the data from Wikidata
|Web access|The application must be accessible via the web
|Git and GitHub|Version control and project tracking will be done using Git. GitHub is used to remotely store the repositories
|===
=== Organizational constraints
[options="header",cols="1,2"]
|===
|Constraint|Description
|Team|The development team is composed of 6 people
|Repository control|The repository has a "main" and a "develop" branch and numerous "feature" branches where new functionalities are developed
|Meetings|At least one weekly team meeting is held to maintain proper organisation
|===
=== Conventions
[options="header",cols="1,2"]
|===
|Convention|Description
|Arc42|The arc42 template is used in the documentation
|AsciiDoc|The documentation is done using AsciiDoc as markup language
|===

[role="arc42help"]
****
.Contents
Any requirement that constraints software architects in their freedom of design and implementation decisions or decision about the development process. These constraints sometimes go beyond individual systems and are valid for whole organizations and companies.
.Motivation
Architects should know exactly where they are free in their design decisions and where they must adhere to constraints.
Constraints must always be dealt with; they may be negotiable, though.
.Form
Simple tables of constraints with explanations.
If needed you can subdivide them into
technical constraints, organizational and political constraints and
conventions (e.g. programming or versioning guidelines, documentation or naming conventions)
.Further Information
See https://docs.arc42.org/section-2/[Architecture Constraints] in the arc42 documentation.
****
Loading

0 comments on commit d905c7e

Please sign in to comment.