About arc42

arc42, the template for documentation of software and system architecture.

Template Version 8.2 EN. (based upon AsciiDoc version), January 2023

Created, maintained and © by Dr. Peter Hruschka, Dr. Gernot Starke and contributors. See https://arc42.org.


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.

1. Introducción y Metas

Y es un juego de tablero abstracto para dos personas, jugado sobre un tablero triangular formado por casillas hexagonales. El objetivo es que, por turnos, cada jugador coloque fichas de su color hasta conseguir una cadena conectada de sus fichas que toque los tres lados del triángulo.Para lograr este objetivo se ha propuesto una solucion que consta de dos partes:

  • Una aplicación Web que ofrecerá a los usuarios la posibilidad de jugar a diferentes juegos Y, que estará implementada en Typescript. Esta aplicación también ofrecerá un API externo que permitirá que sea utilizada por bots.

  • Un módulo implementado en Rust que permitirá chequear si una partida ha sido ganada o no, así como sugerir el siguiente movimiento. Este módulo ofrecerá un interfaz de servicio web básico para que pueda ser invocado por la aplicación web.

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

1.1. Vista general de los requisitos

Construir una plataforma web para jugar partidas del juego Y con soporte de usuarios, historial y una API para bots, apoyada por un módulo de lógica en Rust para validar formato YEN y verificar victoria.

1.1.1. MÓDULO 1: APLICACIÓN WEB (TYPESCRIPT)

RF01 - Gestión de Usuarios.
  • RF01.1: El sistema permitirá el registro de nuevos usuarios con email y contraseña.

  • RF01.2: El sistema permitirá el inicio de sesión de usuarios registrados.

  • RF01.3: El sistema mantendrá sesiones activas del usuario durante el uso.

  • RF01.4: El sistema permitirá a los usuarios cerrar sesión.

RF02 - Interfaz de Juego
  • RF02.1: El sistema proporcionará una interfaz web interactiva para jugar partidas de juegos tipo Y.

  • RF02.2: La interfaz mostrará el tablero de juego actualizado en tiempo real.

  • RF02.3: El sistema permitirá a los usuarios realizar movimientos mediante clics en el tablero.

  • RF02.4: La interfaz mostrará el turno actual del jugador.

  • RF02.5: El sistema notificará visualmente el resultado de la partida (victoria/derrota/empate).

RF03 - Historial de Partidas
  • RF03.1: El sistema almacenará el historial de partidas completadas por cada usuario.

  • RF03.2: El sistema permitirá a los usuarios consultar sus partidas anteriores.

  • RF03.3: El sistema mostrará estadísticas básicas

    • RF03.3.1: El sistema mostrará las partidas ganadas

    • RF03.3.2: El sistema mostrará las partidas perdidas

    • RF03.3.3: El sistema mostrará las partidas empatadas

    • RF03.3.4: El sistema mostrará el tiempo total de juego

RF04 - API Externa para Bots
  • RF04.1: El sistema expondrá una interfaz para permitir la integración con bots

  • RF04.2: La API requerirá autenticación para las peticiones de los bots.

  • RF04.3: La API permitirá crear nuevas partidas como bot.

  • RF04.4: La API permitirá realizar movimientos en partidas existentes.

  • RF04.5: La API devolverá el estado actual de la partida en formato YEN.

1.1.2. MÓDULO 2: MÓDULO DE LÓGICA (RUST)

RF05 - Verificación de Victoria
  • RF05.1: El módulo recibirá una representación de partida en formato YEN y determinará si existe un ganador.

  • RF05.2: El módulo identificará qué jugador ha ganado la partida.

  • RF05.3: El módulo detectará condiciones de empate o tablas.

  • RF05.4: La respuesta incluirá el estado del juego en formato JSON.

  • RF06 - Servicio Web

    • RF06.1: El módulo ofrecerá un mecanismo de comunicación remota para ser invocado por otros subsistemas.

    • RF06.2: El módulo permitirá verificar si una partida ha sido ganada.

    • RF06.3: El módulo proporcionará un mecanismo para verificar su disponibilidad operativa.

    • RF06.4: Todas las respuestas del servicio serán en formato JSON.

RF07 - Procesamiento de Formato YEN
  • RF07.1: El módulo interpretará correctamente las partidas codificadas según la notación YEN.

  • RF07.2: El módulo validará que la notación YEN recibida sea correcta sintácticamente.

  • RF07.3: El módulo rechazará peticiones con formato YEN inválido con código de error apropiado.

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 Introduction and Goals in the arc42 documentation.

1.2. Requisitos de Calidad

Atributo de calidad Motivación

Rendimiento (RNF01)

El sistema deberá responder a las peticiones de juego en menos de 500ms y soportar al menos 500 usuarios concurrentes.

Seguridad (RNF02)

Las comunicaciones entre módulos y con clientes deberán ir cifradas mediante HTTPS, y las contraseñas se almacenarán con hash seguro.

Disponibilidad (RNF03)

El sistema deberá tener una disponibilidad mínima del 99% en horario de operación.

Mantenibilidad (RNF04)

El código de ambos módulos deberá incluir pruebas unitarias con cobertura mínima del 70% y estar adecuadamente documentado.

Usabilidad (RNF05)

La interfaz web deberá ser responsive y funcionar correctamente en dispositivos móviles y desktop.

Interoperabilidad (RNF06)

La comunicación entre módulos deberá realizarse exclusivamente mediante JSON siguiendo la notación YEN.

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):

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

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.

1.3. Stakeholders

Nombre Metas

Micrati

Empresa involucrada en el proyecto. Busca un producto final estable y mantenible, alineado con los requisitos acordados y con una integración correcta entre módulos.

Usuarios

Personas que usan la aplicación. Quieren una experiencia de juego fluida y clara, partidas fiables y acceso sencillo a su historial y estadísticas.

Equipo de desarrolladores

Desarrolladores encargados de construir y mantener el sistema. Buscan una arquitectura robusta, fácil de probar y evolucionar, con buen rendimiento y documentación que facilite el trabajo.

Profesores

Supervisores/asesores académicos del proyecto. Esperan una solución bien justificada y documentada, con buenas prácticas y cumplimiento verificable de los requisitos.

2. Restricciones de Arquitectura

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 Architecture Constraints in the arc42 documentation.

En este apartado se describen las restricciones de arquitectura que afectan a este proyecto. Estas restricciones pueden ser técnicas u organizativas y pueden incluir convenciones como directrices de programación, versionado, documentación o nomenclatura.

2.1. Restricciones Técnicas y Estructurales

Restricción Descripción

Control de Versiones

Usaremos Git y GitHub para el control de versiones del proyecto

Documentación

La documentación del proyecto estará basada en el formato arc42 y se alojará en GitHub Pages

Lenguajes de Programación

El proyecto se desarrollará principalmente en JavaScript, utilizando Node.js para el backend y React para el frontend. Además el motor del juego estará en Rust

Testing

Se utilizará Jest para testing unitario y Cypress para testing end-to-end

Apis Creadas

Se necesitarán APIs para la comunicación entre el frontend y el backend

Deployment

El despliegue del proyecto se hará en una máquina Linux con docker instalado creando un contenedor por cada módulo

2.2. Restricciones Organizativas

Restricción Descripción

Reuniones

Nos reuniremos todas las semanas los jueves de 10:00-11:00

GitHub issues

Los issues de GitHub se usarán para gestionar tareas y problemas del proyecto

3. Contexto y Alcanze

Contents

Context and scope - as the name suggests - delimits your system (i.e. your scope) from all its communication partners (neighboring systems and users, i.e. the context of your system). It thereby specifies the external interfaces.

If necessary, differentiate the business context (domain specific inputs and outputs) from the technical context (channels, protocols, hardware).

Motivation

The domain interfaces and technical interfaces to communication partners are among your system’s most critical aspects. Make sure that you completely understand them.

Form

Various options:

  • Context diagrams

  • Lists of communication partners and their interfaces.

Further Information

See Context and Scope in the arc42 documentation.

3.1. Contexto de Negocio

Micrati quiere lanzar YOVI, una conunto de juegos basados en el juego Y, accesibles desde la web. El sistema debe permitir que personas jueguen partidas del juego Y desde un frontend web, incluyendo al menos la versión clásica (humano vs máquina) con tamaño de tablero variable. Además, el juego contra la computadora debe ofrecer más de una estrategia seleccionable por el usuario.

Diagrama de contexto de negocio

Actor

Cómo interactúa

Usuarios

Acceden a YOVI desde la aplicación web para jugar y registrarse.

Bots

Invocan la API externa de YOVI enviando la posición en JSON y reciben el siguiente movimiento en YEN.

Aplicación YOVI

Recibe peticiones de Usuarios y Bots llama al servicio de lógica en Rust y persiste/consulta datos en la base de datos para histórico/estadísticas.

Contents

Specification of all communication partners (users, IT-systems, …​) with explanations of domain specific inputs and outputs or interfaces. Optionally you can add domain specific formats or communication protocols.

Motivation

All stakeholders should understand which data are exchanged with the environment of the system.

Form

All kinds of diagrams that show the system as a black box and specify the domain interfaces to communication partners.

Alternatively (or additionally) you can use a table. The title of the table is the name of your system, the three columns contain the name of the communication partner, the inputs, and the outputs.

3.2. Contexto Técnico

Contents

Technical interfaces (channels and transmission media) linking your system to its environment. In addition a mapping of domain specific input/output to the channels, i.e. an explanation which I/O uses which channel.

Motivation

Many stakeholders make architectural decision based on the technical interfaces between the system and its context. Especially infrastructure or hardware designers decide these technical interfaces.

Form

E.g. UML deployment diagram describing channels to neighboring systems, together with a mapping table showing the relationships between channels and input/output.

Diagrama de contexto técnico

Actor

Cómo interactúa

Usuario

Accede a YOVI mediante la UI Web para jugar y registrarse.

Bot

Consume el API de YOVI puede jugar contra la aplicación invocando play(position) y recibiendo el movimiento en notación YEN.

Aplicación YOVI

Recibe peticiones del Usuario y del Bot, invoca al Servicio de lógica por HTTP/HTTPS intercambiando JSON (partida en YEN) y gestiona persistencia contra la base de datos.

Servicio de lógica

Expone un servicio web básico invocado por YOVI, verifica si la partida está ganada y sugiere el siguiente movimiento, usando JSON en notación YEN.

Base de datos

Almacena usuarios, partidas e histórico y recibe operaciones de lectura/escritura desde YOVI para persistir y consultar histórico/estadísticas.

4. Estrategia de Solución

Contents

A short summary and explanation of the fundamental decisions and solution strategies, that shape system architecture. It includes

  • technology decisions

  • decisions about the top-level decomposition of the system, e.g. usage of an architectural pattern or design pattern

  • decisions on how to achieve key quality goals

  • relevant organizational decisions, e.g. selecting a development process or delegating certain tasks to third parties.

Motivation

These decisions form the cornerstones for your architecture. They are the foundation for many other detailed decisions or implementation rules.

Form

Keep the explanations of such key decisions short.

Motivate what was decided and why it was decided that way, based upon problem statement, quality goals and key constraints. Refer to details in the following sections.

Further Information

See Solution Strategy in the arc42 documentation.

En este apartado se describen las decisiones fundamentales y estrategias de solución que dan forma a la arquitectura del sistema. Estas decisiones incluyen:

4.1. Decisiones Tecnológicas

Decisión Descripción

Base de datos

Usaremos MySQL debido a su compatibilidad con el entorno de desarrollo y su robustez para manejar datos estructurados. Además, es una base de datos ampliamente utilizada y entendida por el equipo de desarrollo.

Visual Studio Code

Usaremos Visual Studio Code como editor de código principal para su compatibilidad con el entorno de desarrollo y su extensibilidad.

Express

Usaremos Express como framework para el backend debido a su simplicidad.

PlantUML

Usaremos PlantUML para la creación de diagramas de arquitectura debido a su facilidad de uso y su capacidad para integrarse con otras herramientas.

4.2. Decisiones para lograr los requisitos de calidad

Decisión Descripción

Usabilidad

La usabilidad del sistema se logrará mediante una interfaz intuitiva y fácil de usar, siguiendo buenas prácticas de diseño de experiencia de usuario.

Accesibilidad

La accesibilidad del sistema se logrará mediante el cumplimiento de estándares de accesibilidad web, garantizando que todos los usuarios puedan interactuar con el sistema sin barreras.

Rendimiento

El rendimiento del sistema se logrará mediante el uso de tecnologías eficientes y optimización del código, asegurando una respuesta rápida y fluida del sistema.

Disponibilidad

La disponibilidad del sistema se logrará mediante la implementación de mecanismos de redundancia y recuperación ante fallos, garantizando que el sistema esté disponible para los usuarios en todo momento.

Seguridad

La seguridad del sistema se logrará mediante la implementación de medidas de seguridad robustas, como autenticación y autorización adecuadas.

Interoperabilidad

La interoperabilidad del sistema se logrará mediante el uso de estándares abiertos y protocolos de comunicación comunes, facilitando la integración con otros sistemas.

4.3. Decisiones Organizativas

  • Los miembros del grupo, ademas de las reuniones semanales que se celebren, mantendrán una comunicación constante a través de whatsapp y se podrán realizar reuniones adicionales si se considera necesario.

  • Se usará github con diferentes ramas para el desarrollo del proyecto, cada miembro del grupo se encargará de una parte del proyecto, aunque se fomentará la colaboración entre todos los miembros para asegurar la calidad del código y la integración de las diferentes partes del proyecto.

5. Vista de bloques de construcción

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.

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 Building Block View in the arc42 documentation.

5.1. Visión general del sistema

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.

Vision general
Motivación

Visión general del sistema donde el usuario interactua con la aplicación. Esta hace uso del módulo gamey para validar movimientos y detemrinar cuando finaliza el juego. La separación entre WebApp y Gamey permite desacoplar la interfaz de usuario de la lógica del juego y del bot, facilitando el mantenimiento, extensión y reutilización de cada componente.

Componentes
Nombre Responsabilidad

User

 Interactua con la aplicación.

WebApp

 Gestiona la interacción del usuario con el sistema.

Gamey

 Gestiona la lògica del juego, el bot, los movimientos, …​

OpenApi

Comunica el front-end con el back-end Node siguiendo el protocolo HTTP y con el formato JSON. Expone una serie de operaciones para almacenar información de relevancia en la BD. Entre toda esa información, se encuentra:

  • Registro de usuarios.

  • Inicio de partidas.

  • Realización de movimientos.

  • Consulta de puntuaciones. …​

BotServer

Comunica el bot con el resto de la aplicación siguiendo el protocolo HTTP y con el formato JSON. La única operación que contempla es la realización de movimientos por parte del bot.

GameServer

Expone el método play para determinar la validez de una jugada realizada por los usuarios y determinar si la jugada permite ganar la partida actua..

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:

Name Responsibility

<black box 1>

 <Text>

<black box 2>

 <Text>

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.

5.2. Nivel 2 del sistema

Visión específica del módulo Yovi del sistema y las responsabilidades de los distintos subsistemas existentes en este.

Nivel 2
Componentes
Nombre Responsabilidad

Usuario

 Interactua con la aplicación.

WebApp

 Expone una interfaz de usuario para que el usuario interacciona con el sistema.

OpenApi

Comunica el front-end (WebApp) con el back-end Node (Users).

Users

 Gestiona la interacción con la base de datos.

Database

 Almacena un historial de los usuarios registrados, partidas realizadas, puntuaciones obtenidas, …​

Bot

 Contiene la lógica de los bots.

BotServer

 Permite la interacción del sistema con los bots.

Core

 Contiene la lógica del juego y gestiona el estado del mismo y la validación de movimientos y reglas.

GameServer

 Permite la interacción del sistema con la lógica del juego.

Notation

 Incluye toda la lógica sobre la notación YEN.

Here you describe <black box 1> 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

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

…​describes the internal structure of building block 1.

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.

Specifies the internal structure of building block x.1.

6. Vista de Ejecución (Runtime View)

6.1. Resumen

Este documento describe los escenarios de ejecución más relevantes del sistema YOVI y las interacciones entre sus subsistemas principales: la Aplicación Web (Typescript) y el módulo de lógica en Rust (gamey). El intercambio entre ambos usa JSON en notación YEN para representar posiciones y movimientos. El fichero actualizado es [docs/src/06_runtime_view.adoc](docs/src/06_runtime_view.adoc).

6.2. Escenario 1 — Usuario humano juega contra la máquina (flujo principal)

Propósito: mostrar la interacción típica cuando un usuario desde la web juega contra un bot.

Actores: - Usuario (navegador) - Webapp — webapp/src/App.tsx - Servicio de bots / lógica (Rust) — gamey

Flujo (pasos): 1. Usuario inicia una partida en la UI y selecciona "Jugar vs Máquina" y la estrategia (ej. random). 2. La web prepara la posición inicial en notación YEN y la mantiene como estado local. 3. Usuario hace un movimiento; la web lo muestra en el tablero y el usuario confirma el fin de turno. 4. Webapp manda un post con body JSON con la notación YEN del nuevo estado. 5. El servicio Rust recibe el YEN, lo parsea a GameY y valida la posición. 6. Se invoca al bot y se calcula la respuesta. 7. El servicio devuelve el movimiento en notación YEN; la web lo aplica al tablero y los datos de partida. 8. Se repite 3-7 hasta que se finaliza el juego. Una vez se finaliza, muestra el resultado al jugador y se guardan las estadísticas del juego

6.3. Escenario 2 — Bot externo invoca API "play" (integración con terceros, se juega una partida en otro servidor con nuestro bot)

Propósito: describir cómo clientes externos (bots/servicios) usan la API pública para solicitar movimientos.

Actores: - Cliente bot externo - API de comunicación - GameY

Flujo: 1. Cliente prepara un JSON en notación YEN describiendo la posición y parámetros (p.ej. strategy, difficulty) y hace POST la API de nuestro servidor 2. El endpoint valida la versión de API y los parámetros. 3. Se envía la notación YEN a GameY; si es válido se invoca al bot para que calcule el proximo movimiento. 4. Respuesta: En formato YEN en JSON. Contiene el estado del tablero tras realizar el movimiento.

Flujo altenativo 1: 3* YEN inválido → Se devuelve la peticion en estado de error y con cuerpo explicativo

Flujo alternativo 2: 2* Bot solicitado no reconocido → Se devuelve la peticion en estado de error y con cuerpo explicativo

6.4. Escenario 3 — Humano vs Humano (partida local por turnos)

Propósito: describir la interacción típica cuando dos jugadores comparten la misma instancia de la Webapp y juegan por turnos en el mismo dispositivo o en la misma sesión del navegador.

Actores: - Jugador A (navegador) - Jugador B (mismo navegadors) - Webapp - GameY

Flujo (pasos): 1. Un jugador crea o inicia una partida local en la web y define el tamaño del tablero y opciones 2. La web inicializa la posición en notación YEN y la mantiene como estado compartido entre turnos. 3. Jugador A realiza su movimiento en el tablero; la web serializa la posición resultante a notación YEN y envía una petición POST al servicio GameY para validar/aplicar la jugada (p. ej. POST /v1/game/move). 4. El servicio Rust (GameY) recibe el YEN, valida la jugada con las reglas completas y devuelve la respuesta al frontend 5. La web, al recibir la confirmación, aplica el estado devuelto al tablero y muestra que es el turno del Jugador B; la web no aplica reglas complejas por su cuenta. 6. Jugador B realiza su jugada y se repite 3–5 alternando hasta que se detecta una condición de victoria o empate. 7. Al finalizar la partida, la web envía el resultado al backend para persistencia y estadísticas

Flujo alternativo: 4* El servicio Rust no valida la jugada por no ser válida. Se devuelve esta respuesta al frontend 5* El frontend informa al jugador, deshace la jugada y vuelve a 3.

7. Diagrama de despliegue

Content

The deployment view describes:

  1. technical infrastructure used to execute your system, with infrastructure elements like geographical locations, environments, computers, processors, channels and net topologies as well as other infrastructure elements and

  2. mapping of (software) building blocks to that infrastructure elements.

Often systems are executed in different environments, e.g. development environment, test environment, production environment. In such cases you should document all relevant environments.

Especially document a deployment view if your software is executed as distributed system with more than one computer, processor, server or container or when you design and construct your own hardware processors and chips.

From a software perspective it is sufficient to capture only those elements of an infrastructure that are needed to show a deployment of your building blocks. Hardware architects can go beyond that and describe an infrastructure to any level of detail they need to capture.

Motivation

Software does not run without hardware. This underlying infrastructure can and will influence a system and/or some cross-cutting concepts. Therefore, there is a need to know the infrastructure.

Form

Maybe a highest level deployment diagram is already contained in section 3.2. as technical context with your own infrastructure as ONE black box. In this section one can zoom into this black box using additional deployment diagrams:

  • UML offers deployment diagrams to express that view. Use it, probably with nested diagrams, when your infrastructure is more complex.

  • When your (hardware) stakeholders prefer other kinds of diagrams rather than a deployment diagram, let them use any kind that is able to show nodes and channels of the infrastructure.

Further Information

See Deployment View in the arc42 documentation.

7.1. Nivel de infraestructura 1

Describe (usually in a combination of diagrams, tables, and text):

  • distribution of a system to multiple locations, environments, computers, processors, .., as well as physical connections between them

  • important justifications or motivations for this deployment structure

  • quality and/or performance features of this infrastructure

  • mapping of software artifacts to elements of this infrastructure

For multiple environments or alternative deployments please copy and adapt this section of arc42 for all relevant environments.

Diagrama de despliegue
Motivation

La aplicación se despliega sobre un servidor de Azure, en el que cada módulo que constituye el sistema se encuentra encapsulado en un contenedor de Docker. El usuario interactua con el sistema a través de una interfaz diseñada con React. Está se comunica con el back-end mediante OpenApi. A su vez, el back-end se comunica con la base de datos con la api mencionada anteriormente. El front-end también se comunica con el módulo de juego mediante los módulo Bot-server y Game-server.

Características de calidad/rendimiento

El hecho de emplear Docker para encapsular cada uno de los módulos del sistema en distintos contenedores permite que el sistema sea escalable y portable. Además, la separación de las distintas partes en distintos contenedores facilita el mantenimiento y la extensibilidad. Además, aumenta el rendimiento en comparación con emplear un contendor aislado, ya que se permite aislar las dependencias de cada módulo. Por otro lado, el uso de Docker permite el despliegue continuo de nuestra aplicación.

Mapeo de los bloques de construcción a infraestructura
Nombre Descripción

Azure

Servicio con el servidor en el que se encuentra la aplicación.

Docker

Genera cada uno de los contenedores para almacenar cada uno de los módulos de la aplicación.

WebApp

 Front-end diseñado con React para la interacción con el usuario.

Users

Back-end diseñado con Node para gestionar la interacción con la BD.

Gamey

 Módulo Rust con la lógica del juego y del bot.

Database

Almacena un registro de los usuarios de la aplicación, las partidas realizadas, los usuarios obtenidos, …​

Here you can include the internal structure of (some) infrastructure elements from level 1.

Please copy the structure from level 1 for each selected element.

8. Cross-cutting Concepts

Content

This section describes overall, principal regulations and solution ideas that are relevant in multiple parts (= cross-cutting) of your system. Such concepts are often related to multiple building blocks. They can include many different topics, such as

  • models, especially domain models

  • architecture or design patterns

  • rules for using specific technology

  • principal, often technical decisions of an overarching (= cross-cutting) nature

  • implementation rules

Motivation

Concepts form the basis for conceptual integrity (consistency, homogeneity) of the architecture. Thus, they are an important contribution to achieve inner qualities of your system.

Some of these concepts cannot be assigned to individual building blocks, e.g. security or safety.

Form

The form can be varied:

  • concept papers with any kind of structure

  • cross-cutting model excerpts or scenarios using notations of the architecture views

  • sample implementations, especially for technical concepts

  • reference to typical usage of standard frameworks (e.g. using Hibernate for object/relational mapping)

Structure

A potential (but not mandatory) structure for this section could be:

  • Domain concepts

  • User Experience concepts (UX)

  • Safety and security concepts

  • Architecture and design patterns

  • "Under-the-hood"

  • development concepts

  • operational concepts

Note: it might be difficult to assign individual concepts to one specific topic on this list.

Possible topics for crosscutting concepts
Further Information

See Concepts in the arc42 documentation.

8.1. <Concept 1>

<explanation>

8.2. <Concept 2>

<explanation>

…​

8.3. <Concept n>

<explanation>

9. Architecture Decisions

Contents

Important, expensive, large scale or risky architecture decisions including rationales. With "decisions" we mean selecting one alternative based on given criteria.

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).

Avoid redundancy. Refer to section 4, where you already captured the most important decisions of your architecture.

Motivation

Stakeholders of your system should be able to comprehend and retrace your decisions.

Form

Various options:

  • ADR (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

Further Information

See Architecture Decisions in the arc42 documentation. There you will find links and examples about ADR.

10. Quality Requirements

Content

This section contains all quality requirements as quality tree with scenarios. The most important ones have already been described in section 1.2. (quality goals)

Here you can also capture quality requirements with lesser priority, which will not create high risks when they are not fully achieved.

Motivation

Since quality requirements will have a lot of influence on architectural decisions you should know for every stakeholder what is really important to them, concrete and measurable.

Further Information

See Quality Requirements in the arc42 documentation.

10.1. Quality Tree

Content

The quality tree (as defined in ATAM – Architecture Tradeoff Analysis Method) with quality/evaluation scenarios as leafs.

Motivation

The tree structure with priorities provides an overview for a sometimes large number of quality requirements.

Form

The quality tree is a high-level overview of the quality goals and requirements:

  • tree-like refinement of the term "quality". Use "quality" or "usefulness" as a root

  • a mind map with quality categories as main branches

In any case the tree should include links to the scenarios of the following section.

10.2. Quality Scenarios

Contents

Concretization of (sometimes vague or implicit) quality requirements using (quality) scenarios.

These scenarios describe what should happen when a stimulus arrives at the system.

For architects, two kinds of scenarios are important:

  • Usage scenarios (also called application scenarios or use case scenarios) describe the system’s runtime reaction to a certain stimulus. This also includes scenarios that describe the system’s efficiency or performance. Example: The system reacts to a user’s request within one second.

  • Change scenarios describe a modification of the system or of its immediate environment. Example: Additional functionality is implemented or requirements for a quality attribute change.

Motivation

Scenarios make quality requirements concrete and allow to more easily measure or decide whether they are fulfilled.

Especially when you want to assess your architecture using methods like ATAM you need to describe your quality goals (from section 1.2) more precisely down to a level of scenarios that can be discussed and evaluated.

Form

Tabular or free form text.

11. Risks and Technical Debts

Contents

A list of identified technical risks or technical debts, ordered by priority

Motivation

“Risk management is project management for grown-ups” (Tim Lister, Atlantic Systems Guild.)

This should be your motto for systematic detection and evaluation of risks and technical debts in the architecture, which will be needed by management stakeholders (e.g. project managers, product owners) as part of the overall risk analysis and measurement planning.

Form

List of risks and/or technical debts, probably including suggested measures to minimize, mitigate or avoid risks or reduce technical debts.

Further Information

See Risks and Technical Debt in the arc42 documentation.

12. Glossary

Contents

The most important domain and technical terms that your stakeholders use when discussing the system.

You can also see the glossary as source for translations if you work in multi-language teams.

Motivation

You should clearly define your terms, so that all stakeholders

  • have an identical understanding of these terms

  • do not use synonyms and homonyms

Form

A table with columns <Term> and <Definition>.

Potentially more columns in case you need translations.

Further Information

See Glossary in the arc42 documentation.

Term Definition

<Term-1>

<definition-1>

<Term-2>

<definition-2>