# airamsveedraaa/practica2ed architecture

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

- Interactive diagram: https://gitdiagram.com/airamsveedraaa/practica2ed
- Repository: https://github.com/airamsveedraaa/practica2ed

## Overview

##### Project type and purpose
- This is a monolithic C++ console application (Practica2ED) whose goal is to manage a pool of server objects (“Servidores”) and dispatch requests via custom data structures (a queue “TADCola” and a list “TADLista”). It reads commands from stdin or a file, manipulates servers (e.g. assign jobs, release jobs) and writes results to stdout.

##### File structure
- Top-level:
– main.cpp            → entry point (CLI layer)
– include/            → public interfaces of each module (Comun.h, GestorServidores.h, Servidor.h, TADCola.h, TADLista.h)
– src/                → implementations matching each header
– bin/Debug/…         → compiled executable
– obj/Debug/…         → object files (build artifacts)
– Practica2ED.* files → project config and problem statement PDF
- Patterns & layers:
– Presentation/CLI layer: main.cpp
– Business logic layer: GestorServidores (server pool management)
– Domain model: Servidor (individual server state and behavior)
– Data-structure layer: TADCola (queue), TADLista (list)

##### README
- Empty—no additional architectural guidance.

- Use rectangles for modules (e.g., “main”, “GestorServidores”, “Servidor”, “TADCola”, “TADLista”).
- Blue for CLI/entry,
- Green for business logic,
- Orange for domain model,
- Yellow for data‐structures.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        Main["main.cpp"]:::cli
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        Gestor["GestorServidores"]:::biz
    end

    %% Domain Model Layer
    subgraph "Domain Model Layer"
        Servidor["Servidor"]:::domain
    end

    %% Data-Structures Layer
    subgraph "Data-Structures Layer"
        Cola["TADCola"]:::ds
        Lista["TADLista"]:::ds
    end

    %% Shared Utilities
    Comun["Comun"]:::util

    %% Connections
    Main -->|"initialize, parse commands"| Gestor
    Gestor -->|"manages 1..* Servidor instances"| Servidor
    Gestor -->|"enqueue(request)"| Cola
    Gestor -->|"insert/remove servers"| Lista
    Servidor -->|"uses constants/utilities"| Comun

    %% Click Events
    click Main "https://github.com/airamsveedraaa/practica2ed/blob/main/main.cpp"
    click Gestor "https://github.com/airamsveedraaa/practica2ed/blob/main/include/GestorServidores.h"
    click Gestor "https://github.com/airamsveedraaa/practica2ed/blob/main/src/GestorServidores.cpp"
    click Servidor "https://github.com/airamsveedraaa/practica2ed/blob/main/include/Servidor.h"
    click Servidor "https://github.com/airamsveedraaa/practica2ed/blob/main/src/Servidor.cpp"
    click Cola "https://github.com/airamsveedraaa/practica2ed/blob/main/include/TADCola.h"
    click Cola "https://github.com/airamsveedraaa/practica2ed/blob/main/src/TADCola.cpp"
    click Lista "https://github.com/airamsveedraaa/practica2ed/blob/main/include/TADLista.h"
    click Lista "https://github.com/airamsveedraaa/practica2ed/blob/main/src/TADLista.cpp"
    click Comun "https://github.com/airamsveedraaa/practica2ed/blob/main/include/Comun.h"

    %% Styles
    classDef cli fill:#cce5ff,stroke:#333,stroke-width:1px;
    classDef biz fill:#d4edda,stroke:#333,stroke-width:1px;
    classDef domain fill:#ffe5b4,stroke:#333,stroke-width:1px;
    classDef ds fill:#fff3cd,stroke:#333,stroke-width:1px;
    classDef util fill:#e2e3e5,stroke:#333,stroke-width:1px;
```
