# agcastillo2/gestion_proyectos architecture

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

- Interactive diagram: https://gitdiagram.com/agcastillo2/gestion_proyectos
- Repository: https://github.com/agcastillo2/gestion_proyectos

## Overview

##### Project Type and Purpose
- This project is structured as a microservices-based system for managing projects (or "gestion_proyectos"). It comprises multiple services, each in its own Maven module (or subproject), such as:
- ApiGatewayApplication: Acts as the centralized entry point.
- EurekaServerApplication: Provides service discovery via Eureka.
- Domain-specific microservices for handling different functionalities: completado, proyecto, rol, tarea, and usuario.
- The very short README implies that the primary focus is on integrating these components into a distributed management system of projects.

##### Analyzing the File Structure
- Top-Level Directories: The root includes several subprojects that correspond to independent services. All projects follow a similar structure (Dockerfile, pom.xml, src directories), indicating Spring Boot microservices.
- The "ApiGatewayApplication" houses configurations for CORS, IP addresses, and Spring Cloud likely to route requests to appropriate services.
- The "EurekaServerApplication" includes similar configuration files, ensuring that each service registers itself within this service discovery layer.
- Each microservice (completado, proyecto, rol, tarea, usuario) contains a full MVC structure with controllers, services, repositories, models, configurations, and exception handling. This clearly indicates that every service is self-contained.

a. Main Components:
- External Clients: Users or external applications that interact with the system.
- API Gateway: The ApiGatewayApplication that receives requests and forwards them.
- Service Discovery: The EurekaServerApplication allowing dynamic registration and discovery.
- Microservices:
- Completado Service
- Proyecto Service
- Rol Service
- Tarea Service
- Usuario Service
- (Optional) Infrastructure components: Docker Compose file indicates container orchestration and deployment.

b. Relationships and Interactions:
- External clients send requests to the API Gateway.
- The API Gateway routes requests to the appropriate microservice based on the service URL or configuration.
- Each microservice registers and discovers other services via the Eureka Server.

c. Architectural Patterns and Design Principles:
- Use of Gateway Pattern for request routing.
- Service Discovery pattern via Eureka Server.
- Standard MVC for each microservice (controllers, services, repositories).
- Containerization hints with Dockerfiles and docker-compose for deployment, aiding in scalability.

d. Technologies and Frameworks:
- Java Spring Boot (suggested by package naming and Maven configuration).
- Spring Cloud (as indicated by configuration classes in ApiGatewayApplication).
- Eureka for service discovery.
- Docker for containerization and orchestration.
- Likely RESTful APIs for inter-service communication.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Client["External Client"]:::client
    APIGateway["API Gateway"]:::gateway
    Eureka["Eureka Server"]:::discovery
    Completado["Completado Service"]:::service
    Proyecto["Proyecto Service"]:::service
    Rol["Rol Service"]:::service
    Tarea["Tarea Service"]:::service
    Usuario["Usuario Service"]:::service
    Docker["Docker Compose"]:::docker

    Client -->|"HTTP/REST_Requests"| APIGateway

    APIGateway -->|"Routes_to"| Completado
    APIGateway -->|"Routes_to"| Proyecto
    APIGateway -->|"Routes_to"| Rol
    APIGateway -->|"Routes_to"| Tarea
    APIGateway -->|"Routes_to"| Usuario

    Completado -->|"Registers_with"| Eureka
    Proyecto -->|"Registers_with"| Eureka
    Rol -->|"Registers_with"| Eureka
    Tarea -->|"Registers_with"| Eureka
    Usuario -->|"Registers_with"| Eureka

    Docker -->|"Orchestrates"| APIGateway
    Docker -->|"Orchestrates"| Eureka
    Docker -->|"Orchestrates"| Completado
    Docker -->|"Orchestrates"| Proyecto
    Docker -->|"Orchestrates"| Rol
    Docker -->|"Orchestrates"| Tarea
    Docker -->|"Orchestrates"| Usuario

    classDef client fill:#FFD700,stroke:#000,stroke-width:2px;
    classDef gateway fill:#66CDAA,stroke:#000,stroke-width:2px;
    classDef discovery fill:#6495ED,stroke:#000,stroke-width:2px;
    classDef service fill:#FFB6C1,stroke:#000,stroke-width:2px;
    classDef docker fill:#90EE90,stroke:#000,stroke-width:2px;

    click APIGateway "https://github.com/agcastillo2/gestion_proyectos/tree/main/Gestion_Proyectos/ApiGatewayApplication"
    click Eureka "https://github.com/agcastillo2/gestion_proyectos/tree/main/Gestion_Proyectos/EurekaServerApplication"
    click Completado "https://github.com/agcastillo2/gestion_proyectos/tree/main/Gestion_Proyectos/completado"
    click Proyecto "https://github.com/agcastillo2/gestion_proyectos/tree/main/Gestion_Proyectos/proyecto"
    click Rol "https://github.com/agcastillo2/gestion_proyectos/tree/main/Gestion_Proyectos/rol"
    click Tarea "https://github.com/agcastillo2/gestion_proyectos/tree/main/Gestion_Proyectos/tarea"
    click Usuario "https://github.com/agcastillo2/gestion_proyectos/tree/main/Gestion_Proyectos/usuario"
    click Docker "https://github.com/agcastillo2/gestion_proyectos/blob/main/Gestion_Proyectos/docker-compose.yml"
```
