# caonguyen-tran/engapp-infra architecture

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

- Interactive diagram: https://gitdiagram.com/caonguyen-tran/engapp-infra
- Repository: https://github.com/caonguyen-tran/engapp-infra

## Overview

##### Project Type & Purpose
- This repository is an infrastructure builder specifically for the “engapp” microservice system. It’s designed to bring up several infrastructure-level services using Docker Compose. The key services include a Kafka server, an Eureka server (for service discovery), a MySQL database, and a MongoDB.
- The file tree shows that the repository contains one of these components—the Eureka server, which is built as a Spring Boot application using Maven. This indicates a microservices architecture where multiple services are containerized and orchestrated.

##### Analyzing the File Structure
- Top-level: There’s a Docker Compose file (docker-compose.yml) which likely orchestrates launching of all the services.
- The “eureka-server” directory is a Spring Boot application with a typical Maven setup. Configuration files include pom.xml, Dockerfile, and application.yaml to configure environment parameters.
- The inclusion of a .idea folder hints at development in an IDE like IntelliJ IDEA, but that is less important in the architectural overview.
- The structure and naming are highly suggestive of a service-oriented architecture backed by containerized microservices.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Cloud Infrastructure
    subgraph "Cloud Infrastructure"
        gcp["GCP Environment"]:::cloud
        docker["Docker Compose Orchestration"]:::orchestration
    end

    %% Service Components
    subgraph "Service Components"
        micro["Engapp Microservices"]:::microservice
        eureka["Service Discovery (Eureka Server)"]:::service
        kafka["Kafka Server"]:::service
    end

    %% Persistence Layer
    subgraph "Persistence Layer"
        mysql["MySQL Database"]:::database
        mongo["MongoDB"]:::database
    end

    %% Relationships within Cloud Infrastructure
    gcp -->|"hosts"| docker

    %% Docker Compose manages deployments
    docker -->|"runs"| micro
    docker -->|"manages"| eureka
    docker -->|"manages"| kafka
    docker -->|"provisions"| mysql
    docker -->|"provisions"| mongo

    %% Microservices interactions
    micro -->|"registers_to"| eureka
    micro -->|"publishes_to"| kafka
    kafka -->|"delivers_to"| micro

    %% Click Events
    click eureka "https://github.com/caonguyen-tran/engapp-infra/tree/main/eureka-server/"
    click docker "https://github.com/caonguyen-tran/engapp-infra/blob/main/docker-compose.yml"

    %% Styles
    classDef cloud fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef orchestration fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef microservice fill:#FFD700,stroke:#000,stroke-width:2px;
    classDef service fill:#FFA07A,stroke:#000,stroke-width:2px;
    classDef database fill:#FFB6C1,stroke:#000,stroke-width:2px;
```
