# webcrunch/databaser-informationsstrukturer architecture

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

- Interactive diagram: https://gitdiagram.com/webcrunch/databaser-informationsstrukturer
- Repository: https://github.com/webcrunch/databaser-informationsstrukturer

## Overview

##### Project Type and Purpose
- This is an infrastructure-only Docker Compose stack for a database course environment.
- Purpose: stand up two relational databases (PostgreSQL, MySQL), two NoSQL databases (MongoDB, Redis), plus three web-based GUI tools for administration.

##### Main Components
a. Docker Host / Docker Engine (logical boundary)
b. Docker Network (the default bridge network or a custom network defined in docker-compose.yml)
c. Containers:
- postgres_db (PostgreSQL)
- mysql_db (MySQL)
- mongo_db (MongoDB)
- redis_cache (Redis)
- pgadmin (PostgreSQL GUI)
- mongo-express (MongoDB GUI)
- redisinsight (Redis GUI)
d. Future placeholder: app_server (for student application code)
e. External Users / Tools (e.g., DBeaver, MySQL Workbench, browser clients)

##### Relationships and Data Flows
- All containers communicate over the Docker network.
- External tools (on the host) connect via mapped host ports to each container.
- GUI containers talk internally (e.g., pgadmin → postgres_db).
- The future app_server would connect to each “_db” service by its service name.

##### Architectural Patterns & Principles
- Single Docker Compose file orchestrates multiple loosely coupled containers.
- Separation of concerns: each DB and GUI in its own container.
- Use of service names as DNS within the Docker network.
- Ports exposed to host for external tool connectivity.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Clients
    subgraph "External Tools" 
        direction TB
        DBeaver["DBeaver"]:::external
        Workbench["MySQL Workbench"]:::external
        Browser["Browser Clients"]:::external
    end

    %% Docker Host Boundary
    subgraph "Docker Host / Engine"
        direction TB
        %% Docker Network Boundary
        subgraph "Docker Network"
            direction TB
            postgres_db["postgres_db:5432 → host:5432"]:::db-rel
            mysql_db["mysql_db:3306 → host:3306"]:::db-rel
            mongo_db["mongo_db:27017 → host:27017"]:::db-nosql
            redis_cache["redis_cache:6379 → host:6379"]:::db-nosql
            pgadmin["pgadmin:8081 → host:8081"]:::gui
            mongo_express["mongo-express:8082 → host:8082"]:::gui
            redisinsight["redisinsight:8001 → host:8001"]:::gui
            app_server["app_server (optional)"]:::app
        end
    end

    %% Connections: External to Containers
    DBeaver -->|"5432"| postgres_db
    Workbench -->|"3306"| mysql_db
    Browser -->|"8081"| pgadmin
    Browser -->|"8082"| mongo_express
    Browser -->|"8001"| redisinsight

    %% Internal Service-to-Service Connections
    pgadmin -->|"connects"| postgres_db
    mongo_express -->|"connects"| mongo_db
    redisinsight -->|"connects"| redis_cache
    app_server -.->|"future connect"| postgres_db
    app_server -.->|"future connect"| mysql_db
    app_server -.->|"future connect"| mongo_db
    app_server -.->|"future connect"| redis_cache

    %% Click Events
    click Compose "https://github.com/webcrunch/databaser-informationsstrukturer/blob/main/docker-compose.yml"
    click postgres_db "https://github.com/webcrunch/databaser-informationsstrukturer/blob/main/docker-compose.yml"
    click mysql_db "https://github.com/webcrunch/databaser-informationsstrukturer/blob/main/docker-compose.yml"
    click mongo_db "https://github.com/webcrunch/databaser-informationsstrukturer/blob/main/docker-compose.yml"
    click redis_cache "https://github.com/webcrunch/databaser-informationsstrukturer/blob/main/docker-compose.yml"
    click pgadmin "https://github.com/webcrunch/databaser-informationsstrukturer/blob/main/docker-compose.yml"
    click mongo_express "https://github.com/webcrunch/databaser-informationsstrukturer/blob/main/docker-compose.yml"
    click redisinsight "https://github.com/webcrunch/databaser-informationsstrukturer/blob/main/docker-compose.yml"
    click app_server "https://github.com/webcrunch/databaser-informationsstrukturer/blob/main/docker-compose.yml"

    %% Styles
    classDef db-rel fill:#cce5ff,stroke:#000;
    classDef db-nosql fill:#d4edda,stroke:#000;
    classDef gui fill:#ffe5b4,stroke:#000;
    classDef app fill:#e1bee7,stroke:#000;
    classDef external fill:#f0f0f0,stroke:#666,stroke-dasharray:5 5;
```
