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

David #27

Merged
merged 8 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
coverage
docs/build
.idea/
.vscode
.idea/
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

11 changes: 1 addition & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
- mynetwork
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb

userservice:
container_name: userservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/userservice:latest
Expand Down Expand Up @@ -53,18 +53,9 @@ services:
networks:
- mynetwork
environment:
GENERATE_SERVICE_URL: http://questionservice:8003
AUTH_SERVICE_URL: http://authservice:8002
USER_SERVICE_URL: http://userservice:8001

questionservice:
container_name: questionservice-${teamname:-defaultASW}
build: ./questionservice
ports:
- "8003:8003"
networks:
- mynetwork

webapp:
container_name: webapp-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/webapp:latest
Expand Down
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/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.
88 changes: 42 additions & 46 deletions docs/src/05_building_block_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ ifndef::imagesdir[:imagesdir: ../images]
[[section-building-block-view]]


== Building Block View
== Building Block View EN desarollo
image::whiteBoxGeneral.png[]

[role="arc42help"]
****
Expand Down Expand Up @@ -41,40 +42,28 @@ See https://docs.arc42.org/section-5/[Building Block View] in the arc42 document
****

=== Whitebox Overall System
image::whiteLevel1.png[]

[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).
Motivation::

Este diagrama del sistema general muestra una descrpicion del sistema con los componentes basicos

* (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.

****
Contained Building Blocks::
User Interface (Frontend)

_**<Overview Diagram>**_
Logica de Negocio(Backend)

Motivation::
Base datos

_<text explanation>_

API Preguntas

Contained Building Blocks::
_<Description of contained building block (black boxes)>_

Important Interfaces::
_<Description of important interfaces>_


[role="arc42help"]
****
Expand All @@ -97,7 +86,7 @@ Its headline is the name of the black box.
****


==== <Name black box 1>
==== <Interfaz Grafica>

[role="arc42help"]
****
Expand All @@ -114,35 +103,37 @@ according the the following black box template:
****

_<Purpose/Responsibility>_

La Interfaz de Usuario (UI) - Black Box 1 es responsable de proporcionar una interfaz interactiva y amigable para los usuarios finales. Sirve como el punto principal de interacción entre la aplicación y los usuarios, y facilita la experiencia general del usuario.
_<Interface(s)>_

_<(Optional) Quality/Performance Characteristics>_

_<(Optional) Directory/File Location>_

_<(Optional) Fulfilled Requirements>_

_<(optional) Open Issues/Problems/Risks>_

Interfaz de Entrada del Usuario: Acepta la entrada del usuario a través de varios controles, como botones, formularios y campos de entrada.
Interfaz de Visualización: Renderiza y muestra información al usuario, incluyendo datos, mensajes y elementos visuales.
_<Quality/Performance Characteristics>_
Capacidad de Respuesta: La UI debe responder de manera rápida a las interacciones del usuario para garantizar una experiencia fluida y eficiente.
Accesibilidad: Adhiere a los estándares de accesibilidad para proporcionar una experiencia inclusiva para los usuarios.



==== <Name black box 2>

_<black box template>_
==== <Loggin>
_<Purpose/Responsibility>_

==== <Name black box n>
Su función principal es permitir el acceso a los usuarios a la aplicacion , y guardar los resultados de estos.

_<black box template>_

==== <Api de preguntas>
_<Purpose/Responsibility>_
Su proposito es proporcionar preguntas de manera dinamica al usuario.

==== <Name interface 1>

...
_<black box template>_

==== <Name interface m>
==== <Logica de negocio >
_<Purpose/Responsibility>_
Se encargara de gestionar toda la programacion necesaria de cara a la logica

==== <Base de datos>
_<Purpose/Responsibility>_
Dara almacenamiento al sistema de manera persistente y a los records de los usuarios.


=== Level 2
Expand All @@ -156,26 +147,31 @@ Please prefer relevance over completeness. Specify important, surprising, risky,
Leave out normal, simple, boring or standardized parts of your system
****

==== White Box _<building block 1>_
==== White Box _<Interfaz de usuario>_

[role="arc42help"]
****
...describes the internal structure of _building block 1_.
****

_<white box template>_
_<white box Interfaz Usuario>_
image::uiLevel2.png[]
==== White Box _<Login>_

==== White Box _<building block 2>_
image::loginLevel2.png[]


_<white box template>_

...

==== White Box _<building block m>_
==== White Box _<Api preguntas>_


_<white box template>_
En desarollo

==== White Box _<Logica de negocio >_

image::bdLevel2.png[]



Expand Down
20 changes: 18 additions & 2 deletions docs/src/07_deployment_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,29 @@ For multiple environments or alternative deployments please copy and adapt this
****

_**<Overview Diagram>**_
ESTO SE HARA MAS ADELANTE

Motivation::

_<explanation in text form>_
1. Disponibilidad: se busca una aplicacion que sea capaz de prestar servicio de manera continuada, con resistencia a fallos.
2. Eficiencia:Se busca una aplicacion que ofreza un rendimiento optimo para la generacion de preguntas desde dispositivos con pocas capacidades.
3. Cumplimiento de Requisitos Regulatorios:El uso de Wikidata como fuente de datos en nuestra aplicación está respaldado por la necesidad de cumplir con requisitos regulatorios y normativos específicos. Esta elección se basa en las siguientes consideraciones:



Quality and/or Performance Features::

_<explanation in text form>_
1.Rencimiento:se busca que la aplicacion tenga un rendimiento optimo en dispositivos mobiles y tablets.
2.Adaptabilidad: la aplicacion tiene que ser adaptable en diferentes dispositivos para asi poder garantizar su uso .




Se hara mas adelante

Mapping of Building Blocks to Infrastructure::

SE HARA MAS ADELANTE
_<description of the mapping>_


Expand All @@ -79,6 +92,9 @@ Here you can include the internal structure of (some) infrastructure elements fr
Please copy the structure from level 1 for each selected element.
****

SE HARA MAS ADELANTE


==== _<Infrastructure Element 1>_

_<diagram + explanation>_
Expand Down
16 changes: 0 additions & 16 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const port = 8000;

const authServiceUrl = process.env.AUTH_SERVICE_URL || 'http://localhost:8002';
const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8001';
const generateServiceURL = process.env.GENERATE_SERVICE_URL || 'http://localhost:8003';

app.use(cors());
app.use(express.json());
Expand Down Expand Up @@ -42,21 +41,6 @@ app.post('/adduser', async (req, res) => {
}
});

app.post('/generatequestion', async(req,res)=> {
try{
// Redirige la solicitud al servicio de generación de preguntas sin enviar un cuerpo de solicitud.
const response = await axios.post(`${generateServiceURL}/generatequestion`);

// Devuelve la respuesta del servicio de generación de preguntas al cliente original.
res.json(response.data);

} catch(error) {
res.status(error.response.status).json({ error: error.response.data.error });
}
});



// Start the gateway service
const server = app.listen(port, () => {
console.log(`Gateway Service listening at http://localhost:${port}`);
Expand Down
2 changes: 0 additions & 2 deletions questionservice/.dockerignore

This file was deleted.

20 changes: 0 additions & 20 deletions questionservice/Dockerfile

This file was deleted.

Loading