# ismaelph/despliegue-app-web architecture

> Architecture diagram of the GitHub repository ismaelph/despliegue-app-web, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ismaelph/despliegue-app-web
- Repository: https://github.com/ismaelph/despliegue-app-web

## Overview

##### Overall Project Context
- The project is titled “Despliegue de Aplicaciones Web” and is designed as a series of deployment exercises. It covers multiple technology stacks and methods (Docker, Vagrant, Git, etc.).
- Each UT (UT1, UT2, UT3, UT4, UT5) represents a different deployment scenario:
- UT1: Uses both Docker Compose and Vagrant environments.
- UT2: Focuses on deployment via different docker-compose setups, one of which integrates with DuckDNS and another with a general configuration that includes a Caddyfile (reverse proxy/webserver).
- UT3: Contains several examples for diverse frameworks—Flask (Python), JakartaEE (Java), Laravel (PHP), Node.js (JavaScript)—and demonstrates using Docker containers for each.
- UT4: Deals with a Git-based deployment practice (hook scripts, bare repositories) in addition to Dockerized components.
- UT5: Demonstrates network-oriented or infrastructure services like DNS (dnsmask) and LDAP.

##### File Structure and Architectural Patterns
- There are top-level directories (ut1-Compose, ut1-Docker, ut2, ut3, ut4, ut5) that clearly separate different deployment experiments.
- Each UT folder often contains a README and a “docker” or “docker-compose.yml” file. This indicates the heavy use of containerization.
- The presence of Vagrant files (Vagrantfile, provisioning scripts) in some UTs (UT1 and UT2) suggests virtual machines act as environments hosting one or several containers.
- Besides code-related folders, there is a “datos_varios” directory holding images and logs, which are used for documentation and display of technologies.

a. Your Main Components:
- Virtualization Layer: Illustrate VirtualBox running Vagrant-managed VMs.
- Container Layer: Represent Docker orchestration with containers and docker-compose configurations.
- Deployment & Integration Tools: Include the Git-based deployment components (UT4) and infrastructure integrations (DNMask and LDAP in UT5).

b. Relationships and Interactions:
- How Vagrant VMs (in UT1) host Docker containers using a docker-compose file.
- For UT4, indicate the Git repository (and hook scripts) flowing changes to deployed applications.
- For UT5, illustrate how the DNS mask or LDAP service connects with the overall network layer or provides infrastructure-level services.

c. Architectural Patterns:
- Containerization and orchestration are central: Docker, docker-compose, and Vagrant serve as key tools.
- Separation of concerns is visible with each UT being a self-contained experimental module, reflecting a micro- or modular architectural approach.

d. Incorporate Key Technologies:
- Docker and docker-compose as building blocks for containers.
- Vagrant and VirtualBox for VM-based isolation.
- Frameworks (Flask, JakartaEE, Laravel, Node.js) denoting the application layer.
- Reverse proxies (Caddy) to manage incoming traffic.
- Git hooks and bare repositories for deployment automation.
- DNS and LDAP for networking and directory services.

- Every component is clearly labeled with its role (for instance, “Vagrant VM with docker-compose” or “Caddy Reverse Proxy”).
- If relevant, include notes about configuration files (like Vagrantfile, docker-compose.yml) to indicate where orchestration or provisioning takes place.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Client("External Client"):::client

    subgraph "Virtualization Layer"
        UT1ComposeV("UT1-Compose Vagrant"):::virtualization
        UT1DockerV("UT1-Docker Vagrant"):::virtualization
    end

    subgraph "Container Orchestration Layer"
        U1ComposeDC("UT1-Compose docker-compose"):::orchestration
        UT2DuckDC("UT2 DuckDNS docker-compose"):::orchestration
        UT2GeneralDC("UT2 General docker-compose"):::orchestration
        UT3FlaskDC("UT3 Flask docker-compose"):::orchestration
        UT3JakartaT("UT3 JakartaEE Tomcat docker-compose"):::orchestration
        UT3JakartaC("UT3 JakartaEE Caddy docker-compose"):::orchestration
        UT3LaravelDC("UT3 Laravel docker-compose"):::orchestration
        UT3NodeDC("UT3 Node.js docker-compose"):::orchestration
        UT4LocalDC("UT4 composer-local docker-compose"):::orchestration
        UT4RemoteDC("UT4 composer-remoto docker-compose"):::orchestration
        UT5DNMDC("UT5 dnsmask docker-compose"):::orchestration
        UT5LDAPDC("UT5 LDAP docker-compose"):::orchestration
    end

    subgraph "Application Components (UT3)"
        FlaskApp("Flask Application"):::application
        JakartaApp("JakartaEE Application"):::application
        LaravelApp("Laravel Application"):::application
        NodeApp("Node.js Application"):::application
    end

    subgraph "Deployment & Git Integration (UT4)"
        GitHooks("Git Hook Scripts"):::deployment
        HTMLRes("HTML Resources"):::deployment
    end

    subgraph "Infrastructure & Network Services (UT5)"
        DNService("DNS Service"):::network
        LDAPService("LDAP Service"):::network
    end

    %% Connections from External Client to Virtualization and UT2 reverse proxies
    Client -->|"accesses"| UT1ComposeV
    Client -->|"accesses"| UT1DockerV
    Client -->|"accesses"| UT2DuckDC
    Client -->|"accesses"| UT2GeneralDC

    %% Connections from Virtualization Layer to Container Orchestration (UT1)
    UT1ComposeV -->|"hosts"| U1ComposeDC
    UT1DockerV -->|"hosts"| U1ComposeDC

    %% UT3 Orchestration to Application Components
    UT3FlaskDC -->|"deploys"| FlaskApp
    UT3JakartaT -->|"deploys"| JakartaApp
    UT3JakartaC -->|"deploys"| JakartaApp
    UT3LaravelDC -->|"deploys"| LaravelApp
    UT3NodeDC -->|"deploys"| NodeApp

    %% Deployment and Git Integration connections
    GitHooks -->|"triggers"| UT4LocalDC
    GitHooks -->|"triggers"| UT4RemoteDC
    HTMLRes -->|"supports"| UT4RemoteDC

    %% Infrastructure connections
    UT5DNMDC -->|"manages"| DNService
    UT5LDAPDC -->|"manages"| LDAPService

    %% Styling Definitions
    classDef virtualization fill:#f9e79f,stroke:#d35400,stroke-width:2px;
    classDef orchestration fill:#aed6f1,stroke:#2874a6,stroke-width:2px;
    classDef application fill:#a9dfbf,stroke:#27ae60,stroke-width:2px;
    classDef deployment fill:#f5b7b1,stroke:#c0392b,stroke-width:2px;
    classDef network fill:#d2b4de,stroke:#8e44ad,stroke-width:2px;
    classDef client fill:#f7dc6f,stroke:#b7950b,stroke-width:2px;

    %% Click Events
    click UT1ComposeV "https://github.com/ismaelph/despliegue-app-web/tree/main/ut1-Compose/Vagrant"
    click UT1DockerV "https://github.com/ismaelph/despliegue-app-web/tree/main/ut1-Docker/Vagrant"
    click U1ComposeDC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut1-Compose/Vagrant/docker-compose.yml"
    click UT2DuckDC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut2/examen/compose-duckdns/docker-compose.yml"
    click UT2GeneralDC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut2/examen/compose-general/docker-compose.yml"
    click UT3FlaskDC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut3/flask/docker/docker-compose.yml"
    click UT3JakartaT "https://github.com/ismaelph/despliegue-app-web/blob/main/ut3/jakartaEE/docker/tomcat/docker-compose.yml"
    click UT3JakartaC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut3/jakartaEE/docker/caddy/docker-compose.yml"
    click UT3LaravelDC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut3/laravel/docker/docker-compose.yml"
    click UT3NodeDC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut3/node.js/docker/docker-compose.yml"
    click UT4LocalDC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut4/practica/docker/composer-local/docker-compose.yml"
    click UT4RemoteDC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut4/practica/docker/composer-remoto/docker-compose.yml"
    click UT5DNMDC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut5/dnsmask/docker/docker-compose.yml"
    click UT5LDAPDC "https://github.com/ismaelph/despliegue-app-web/blob/main/ut5/ldap/archivos/docker-compose.yml"
    click FlaskApp "https://github.com/ismaelph/despliegue-app-web/tree/main/ut3/flask/archivos"
    click JakartaApp "https://github.com/ismaelph/despliegue-app-web/tree/main/ut3/jakartaEE/docker"
    click LaravelApp "https://github.com/ismaelph/despliegue-app-web/tree/main/ut3/laravel/docker"
    click NodeApp "https://github.com/ismaelph/despliegue-app-web/tree/main/ut3/node.js/javascript"
    click GitHooks "https://github.com/ismaelph/despliegue-app-web/tree/main/ut4/practica/hook"
    click HTMLRes "https://github.com/ismaelph/despliegue-app-web/tree/main/ut4/practica/html"
    click DNService "https://github.com/ismaelph/despliegue-app-web/tree/main/ut5/dnsmask"
    click LDAPService "https://github.com/ismaelph/despliegue-app-web/tree/main/ut5/ldap"
```
