# alepeteporico/proyecto_integrado architecture

> Architecture diagram of the GitHub repository alepeteporico/proyecto_integrado, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alepeteporico/proyecto_integrado
- Repository: https://github.com/alepeteporico/proyecto_integrado

## Overview

##### Project Type and Purpose
- This is a full-stack, multi-service application orchestrated with Docker Compose.
- It bundles three major web applications—Redmine, Moodle, and WordPress—behind a centralized OAuth2-proxy for authentication, and persists data in Docker-mounted database volumes (PostgreSQL for some services and MySQL for Redmine).

##### File-Structure Analysis
- Top‐level “docker” directory holds certificates, a PostgreSQL data volume (`docker/db`), and a `docker-compose.yml` that ties all containers together.
- Folders `moodle`, `redmine`, `wordpress-docker-compose` contain the application artifacts (tarballs, plugin code) and/or secondary Compose files.
- The presence of `oauth2-proxy-v6.1.1.linux-amd64` indicates an OAuth2 authentication gateway.
- Under `redmine/db` there’s a full MySQL data directory (InnoDB files, schema, etc.), so Redmine uses MySQL.

##### Essential Details to Capture
- The chain of authentication and routing via OAuth2-Proxy
- Per-service persistence: PostgreSQL vs. MySQL
- Docker Compose as the central orchestration mechanism
- TLS termination using `docker/certs`
- Volume mounting strategy for database durability

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Docker Compose Orchestration"
        style DockerCompose fill:#f0f0f0,stroke:#ccc,stroke-width:2px
        DockerCompose["Docker Compose\n(docker-compose.yml)"]:::orchestrator
        subgraph "Docker Network" 
            direction TB
            User["User"]:::external
            OAuth["OAuth2-Proxy\n(port 443)"]:::proxy
            Certs["TLS Certificates"]:::infrastructure
            MoodleApp["Moodle App\n(port 80)"]:::app
            RedmineApp["Redmine App\n(port 3000)"]:::app
            WordPressApp["WordPress App\n(port 80)"]:::app
            PostgresDB["PostgreSQL\n(port 5432)"]:::db
            MySQLDB["MySQL (Redmine)\n(port 3306)"]:::db
        end
        subgraph "Volumes"
            direction TB
            VolPostgres["postgres volume\ndocker/db"]:::volume
            VolMySQL["mysql volume\nredmine/db"]:::volume
            VolCerts["certs\ndocker/certs"]:::volume
        end
    end

    %% Connections
    User -->|"HTTPS 443"| OAuth
    OAuth -->|"routes /moodle"| MoodleApp
    OAuth -->|"routes /redmine"| RedmineApp
    OAuth -->|"routes /wordpress"| WordPressApp
    MoodleApp -->|"reads/writes"| PostgresDB
    WordPressApp -->|"reads/writes"| PostgresDB
    RedmineApp -->|"reads/writes"| MySQLDB

    %% Volumes mounting
    PostgresDB -->|mounts| VolPostgres
    MySQLDB -->|mounts| VolMySQL
    OAuth -->|uses TLS certs| VolCerts

    %% Click Events
    click DockerCompose "https://github.com/alepeteporico/proyecto_integrado/blob/main/docker/docker-compose.yml"
    click OAuth "https://github.com/alepeteporico/proyecto_integrado/tree/main/oauth2-proxy-v6.1.1.linux-amd64/oauth2-proxy"
    click Certs "https://github.com/alepeteporico/proyecto_integrado/blob/main/docker/certs/localhostcert.pem"
    click MoodleApp "https://github.com/alepeteporico/proyecto_integrado/blob/main/moodle/moodle-latest-400.tgz"
    click RedmineApp "https://github.com/alepeteporico/proyecto_integrado/blob/main/redmine/docker-compose.yaml"
    click WordPressApp "https://github.com/alepeteporico/proyecto_integrado/tree/main/wordpress-docker-compose/"
    click PostgresDB "https://github.com/alepeteporico/proyecto_integrado/tree/main/docker/db/"
    click MySQLDB "https://github.com/alepeteporico/proyecto_integrado/tree/main/redmine/db/"

    %% Styles
    classDef orchestrator fill:#f5f5f5,stroke:#666,stroke-dasharray: 5 5
    classDef proxy fill:#a8d5a2,stroke:#333,stroke-width:1px
    classDef app fill:#9ec1cf,stroke:#333,stroke-width:1px
    classDef db fill:#f8b195,stroke:#333,stroke-width:1px
    classDef external fill:#cccccc,stroke:#333,stroke-width:1px
    classDef infrastructure fill:#c3bef0,stroke:#333,stroke-width:1px
    classDef volume fill:#f0e68c,stroke:#333,stroke-width:1px
```
