# juanyacovino77/factoria architecture

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

- Interactive diagram: https://gitdiagram.com/juanyacovino77/factoria
- Repository: https://github.com/juanyacovino77/factoria

## Overview

##### Project Type and Purpose
- The project is a full-stack application designed for orchestrating activities among various sectors (e.g., caja, cocina, etc.) within a chain of autoservicios.
- The system lets employees on different POCs open/close shifts, operate control panels, and exchange messages/tasks across sectors.
- The README and file tree indicate a clear separation between the client (located under “codigo/Cliente”) and server (located under “codigo/Servidor”), as well as shared contracts in “codigo/Contratos.”

##### Analysis of the File Structure
- The top-level “codigo” directory divides the project into the following major parts:
- Cliente: Contains the MAUI app that supports multiple platforms (Android, iOS, Windows, MacCatalyst, Tizen). This part includes UI components (Pantallas, Componentes) and models;
- Contratos: Shared project that likely defines data transfer objects and interfaces ensuring consistency between client and server;
- Servidor: Contains several components:
▪ API: The web API project, including hubs (PuertoEntrante and PuertoSaliente) for real-time communication, static resources (wwwroot), and configuration files;
▪ Dominio: Domain models and business rules (e.g., Mensaje, Tarea, Turno, etc.);
▪ Infraestructura and Servicios: Further layers that support persistence, business logic, and integration among components.
- Additional directories like “diagramas” (storing concept and architectural drawings) and build-related files (e.g., .gitignore, .csproj files) indicate a well-organized multi-project solution.

##### Specific Elements
- Clear labels for each component (e.g., “Cliente App (MAUI)”, “Servidor API”, “Hubs: PuertoEntrante / PuertoSaliente”, “Contratos”, “Dominio”, “Servicios & Infraestructura”).
- Annotations that call out the technologies (e.g., mention “SignalR-like hub” for real-time messaging, “Bootstrap/jQuery” for admin UI elements in the server web root, etc.).

## Diagram (Mermaid)

```mermaid
graph TD
    %% Client Layer
    subgraph "Client Layer"
        A["Cliente App (MAUI)"]:::client
    end

    %% Shared Components
    subgraph "Shared Components"
        C["Shared Contracts"]:::shared
    end

    %% Server Layer
    subgraph "Server Layer"
        B["Servidor API"]:::api
        subgraph "Real-time Communication"
            D["Hub: PuertoEntrante"]:::hub
            E["Hub: PuertoSaliente"]:::hub
        end
        F["Dominio"]:::domain
        G["Services Layer"]:::services
        H["Infrastructure Layer"]:::infra
    end

    %% External communication arrows
    A -->|"calls"| B
    A -->|"uses"| C
    B -->|"uses"| C

    %% Real-time messaging arrows
    B -->|"communicates"| D
    B -->|"communicates"| E
    A <-->|"realTime"| D
    A <-->|"realTime"| E

    %% Internal server processing arrows
    B -->|"processes"| F
    F -->|"triggers"| G
    F -->|"triggers"| H

    %% Click Events
    click A "https://github.com/juanyacovino77/factoria/tree/master/codigo/Cliente"
    click C "https://github.com/juanyacovino77/factoria/tree/master/codigo/Contratos"
    click B "https://github.com/juanyacovino77/factoria/tree/master/codigo/Servidor/API"
    click D "https://github.com/juanyacovino77/factoria/tree/master/codigo/Servidor/API/Hubs/PuertoEntrante"
    click E "https://github.com/juanyacovino77/factoria/tree/master/codigo/Servidor/API/Hubs/PuertoSaliente"
    click F "https://github.com/juanyacovino77/factoria/tree/master/codigo/Servidor/Dominio"
    click G "https://github.com/juanyacovino77/factoria/tree/master/codigo/Servidor/Servicios"
    click H "https://github.com/juanyacovino77/factoria/tree/master/codigo/Servidor/Infraestructura"

    %% Styles
    classDef client fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef shared fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef api fill:#FFA500,stroke:#000,stroke-width:2px;
    classDef hub fill:#FFFF99,stroke:#000,stroke-width:2px;
    classDef domain fill:#FFB6C1,stroke:#000,stroke-width:2px;
    classDef services fill:#D8BFD8,stroke:#000,stroke-width:2px;
    classDef infra fill:#D3D3D3,stroke:#000,stroke-width:2px;
```
