# eiffelcsy/esd-project architecture

> Architecture diagram of the GitHub repository eiffelcsy/esd-project, 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/eiffelcsy/esd-project
- Repository: https://github.com/eiffelcsy/esd-project

## Overview

##### Project Type and Purpose
- This appears to be a full-stack, microservices-based application. The presence of a distinct frontend (built with Vue.js) combined with multiple service directories (such as calendar, expense-management, finance, group-management, itinerary, recommendation-management, trip-management, trip, and user) indicates that the system is segmented into dedicated functionalities.
- Each microservice is containerized (each having its own Dockerfile, and there’s a top-level docker-compose.yml) so that these services can be deployed and scaled independently while communicating with one another.
- Although the README is minimal (“# esd-project”), the file tree itself reveals that the project likely addresses a domain related to travel or trip planning (e.g., TripIdeation, TripPlanning, itinerary services) along with features around finance, expense management, group management, and recommendations.

##### File Structure – Key Observations
- Frontend:
- Located in the “frontend” directory.
- Uses Vue.js (notice the App.vue, main.js, and various UI components, such as buttons, dialogs, cards, etc.).
- Contains routing configuration (frontend/src/router) and utility libraries.
- Contains configuration files like tailwind.config.js and vite.config.js, suggesting modern frontend tooling and styling.
- Backend Microservices:
- Each service (e.g., calendar, expense-management, finance, etc.) is self-contained with its own Dockerfile and often its own docker-compose.yml.
- Most services are written in Python (files like app.py, client.py, models.py, routes.py, etc.), indicating a REST API or messaging pattern based on microservices architecture.
- Notice integration hints like “rabbitmq_consumer.py” and “rabbitmq_config.py” in some services, so an asynchronous messaging system (likely RabbitMQ) is used for inter-service communication.
- The file structure within each service is modular (e.g., for group-management, there is a nested app directory with routes, models, services) which suggests the use of architectural patterns such as MVC or service-based routing.
- Containerization & Orchestration:
- A top-level docker-compose.yml and individual Dockerfiles in each service indicate that orchestration is managed via Docker Compose.
- There is also evidence of environment configuration (e.g., .env files or .env.example) for services which might be deployed in different environments.

##### Specific Elements
- Clear Labeling:

– Top: Frontend – detail its key components (routing, major UI components).
– Middle: Backend Microservices – each service from the file tree should be a module within this layer.
– Bottom: Infrastructure Services – include the database(s) and messaging system (RabbitMQ).

## Diagram (Mermaid)

```mermaid
graph TD
    %% Containerization & Orchestration
    DC["Docker Compose"]:::container

    %% Deployment Environment
    subgraph "Deployment Environment"
        %% Frontend Layer
        F["Frontend (Vue.js)"]:::frontend

        %% Backend Microservices
        subgraph "Backend Microservices"
            CAL["Calendar Service"]:::backend
            EXP["Expense Management Service"]:::backend
            FIN["Finance Service"]:::backend
            GRP["Group Management Service"]:::backend
            ITN["Itinerary Service"]:::backend
            REC["Recommendation Management Service"]:::backend
            TRM["Trip Management Service"]:::backend
            TRIP["Trip Service"]:::backend
            USR["User Service"]:::backend
        end

        %% Infrastructure Layer
        subgraph "Infrastructure"
            DB["Database(s)"]:::db
            subgraph "Messaging System (RabbitMQ)"
                RMQ_CAL["RabbitMQ (Calendar)"]:::messaging
                RMQ_REC["RabbitMQ (Recommendation)"]:::messaging
                RMQ_TRIP["RabbitMQ (Trip)"]:::messaging
            end
        end
    end

    %% Deployment arrows from Docker Compose
    DC -->|"deploys"| F
    DC -->|"deploys"| CAL
    DC -->|"deploys"| EXP
    DC -->|"deploys"| FIN
    DC -->|"deploys"| GRP
    DC -->|"deploys"| ITN
    DC -->|"deploys"| REC
    DC -->|"deploys"| TRM
    DC -->|"deploys"| TRIP
    DC -->|"deploys"| USR
    DC -->|"orchestrates"| DB

    %% Frontend to Backend Services (HTTP REST)
    F -->|"HTTPREST"| CAL
    F -->|"HTTPREST"| EXP
    F -->|"HTTPREST"| FIN
    F -->|"HTTPREST"| GRP
    F -->|"HTTPREST"| ITN
    F -->|"HTTPREST"| REC
    F -->|"HTTPREST"| TRM
    F -->|"HTTPREST"| TRIP
    F -->|"HTTPREST"| USR

    %% Backend Services to Database
    CAL -->|"SQL"| DB
    EXP -->|"SQL"| DB
    FIN -->|"SQL"| DB
    GRP -->|"SQL"| DB
    ITN -->|"SQL"| DB
    REC -->|"SQL"| DB
    TRM -->|"SQL"| DB
    TRIP -->|"SQL"| DB
    USR -->|"SQL"| DB

    %% Microservices - Asynchronous messaging with RabbitMQ
    CAL -->|"AMQP"| RMQ_CAL
    REC -->|"AMQP"| RMQ_REC
    TRM -->|"AMQP"| RMQ_TRIP

    %% Click Events for Component Mapping
    click F "https://github.com/eiffelcsy/esd-project/tree/main/frontend"
    click CAL "https://github.com/eiffelcsy/esd-project/tree/main/services/calendar"
    click EXP "https://github.com/eiffelcsy/esd-project/tree/main/services/expense-management"
    click FIN "https://github.com/eiffelcsy/esd-project/tree/main/services/finance"
    click GRP "https://github.com/eiffelcsy/esd-project/tree/main/services/group-management"
    click ITN "https://github.com/eiffelcsy/esd-project/tree/main/services/itinerary"
    click REC "https://github.com/eiffelcsy/esd-project/tree/main/services/recommendation-management"
    click TRM "https://github.com/eiffelcsy/esd-project/tree/main/services/trip-management"
    click TRIP "https://github.com/eiffelcsy/esd-project/tree/main/services/trip"
    click USR "https://github.com/eiffelcsy/esd-project/tree/main/services/user"
    click DC "https://github.com/eiffelcsy/esd-project/blob/main/docker-compose.yml"
    click RMQ_CAL "https://github.com/eiffelcsy/esd-project/blob/main/services/calendar/rabbitmq_consumer.py"
    click RMQ_REC "https://github.com/eiffelcsy/esd-project/blob/main/services/recommendation-management/app/rabbitmq_config.py"
    click RMQ_TRIP "https://github.com/eiffelcsy/esd-project/blob/main/services/trip-management/app/rabbitmq_config.py"

    %% Style definitions
    classDef frontend fill:#fef2cc,stroke:#333,stroke-width:2px;
    classDef backend fill:#cce5ff,stroke:#003366,stroke-width:2px;
    classDef container fill:#ffe6b3,stroke:#cc6600,stroke-width:2px;
    classDef messaging fill:#d1f0d1,stroke:#006400,stroke-width:2px;
    classDef db fill:#ffe6ec,stroke:#d63384,stroke-width:2px;
```
