# soulteary/portable-docker-app architecture

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

- Interactive diagram: https://gitdiagram.com/soulteary/portable-docker-app
- Repository: https://github.com/soulteary/portable-docker-app

## Overview

- Emotion Service: A Dockerized text emotion/sentiment analysis tool. This component stands alone under its “emotion” directory.
- Milvus Service: A containerized instance configured via Docker that appears to provide an embedded Milvus vector database. It has its own configuration and entrypoint scripts.
- Reverse Image Search Engine: This has multiple sub-components:
– Client: Built with React/TypeScript (found in the client/ subdirectory). It is responsible for the user interface.
– Gateway: A Go-based microservice (in the “gateway” folder) that likely handles routing or API gateway duties.
– Server: A Python-based backend service (under the “server” directory) likely in charge of search logic, encoding, and interacting with the vector database.
– Additional Docker configurations for deployment.
- Weaviate Service: Another vector database service with a machine-learning/AI focus. It includes Dockerfiles, compose files, and Go modules. It also contains a subfolder with a transformer model (“thenlper/gte-small”), which indicates ML model integration.

##### Relationships and Data Flow
- For the Reverse Image Search Engine:
- For the Emotion Service and the Weaviate Service:

##### Architectural Patterns and Design Principles
- Microservices/Containerization: Each component is fully containerized with its own Dockerfile(s) and configuration. Emphasize the isolation and independent scalability of each service.
- Separation of Concerns:
– Frontend (client) is separated from business logic (gateway and server).
– Dedicated services handle specific domains: vector database (Milvus/Weaviate), image search logic (reverse image search server), and NLP for sentiment (emotion).
- Use of Modern Technologies:
– The client uses contemporary frontend technologies (React/TypeScript).
– The gateway is implemented in Go.
– The server is built with Python, indicating a focus on rapid development and use of ML libraries.
– ML components (e.g., in weaviate’s thenlper folder) indicate deep integration with transformer models.

##### Final Checklist
- Annotations indicating key technologies and Dockerized nature.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Main Components
    ES["Emotion Service\n(Dockerized)"]:::emotion
    MV["Milvus Service\n(Dockerized)"]:::vector
    WV["Weaviate Service\n(Dockerized)"]:::vector

    %% Reverse Image Search Subgraph
    subgraph "Reverse Image Search Engine"
        RIS_CLIENT["Client (React/TypeScript)\n(Dockerized)"]:::frontend
        RIS_GATEWAY["Gateway (Go)\n(Dockerized)"]:::backend
        RIS_SERVER["Server (Python)\n(Dockerized)"]:::backend
    end

    %% Relationships and Data Flow
    RIS_CLIENT -->|"sends_request"| RIS_GATEWAY
    RIS_GATEWAY -->|"routes_to"| RIS_SERVER
    RIS_SERVER -->|"queries"| MV
    RIS_SERVER -.->|"optional_ML_integration"| WV

    %% Independent services (Emotion and Weaviate can be used standalone)
    ES ---|"external_integration"| MV
    ES ---|"external_integration"| WV

    %% Click Events for Component Mapping
    click ES "https://github.com/soulteary/portable-docker-app/tree/main/emotion/"
    click MV "https://github.com/soulteary/portable-docker-app/tree/main/milvus/"
    click RIS_CLIENT "https://github.com/soulteary/portable-docker-app/tree/main/reverse-image-search/client/"
    click RIS_GATEWAY "https://github.com/soulteary/portable-docker-app/tree/main/reverse-image-search/gateway/"
    click RIS_SERVER "https://github.com/soulteary/portable-docker-app/tree/main/reverse-image-search/server/"
    click WV "https://github.com/soulteary/portable-docker-app/tree/main/weaviate/"

    %% Styles
    classDef emotion fill:#cce5ff,stroke:#333,stroke-width:2px;
    classDef vector fill:#c3f9c3,stroke:#333,stroke-width:2px;
    classDef frontend fill:#fff2cc,stroke:#333,stroke-width:2px;
    classDef backend fill:#f8cdda,stroke:#333,stroke-width:2px;
    
    %% Bonus: ML component inside Weaviate Service indicated as integrated model folder
    WV_ML["Transformer Model\n(thenlper/gte-small)"]:::ml
    WV --- WV_ML
    click WV_ML "https://github.com/soulteary/portable-docker-app/tree/main/weaviate/thenlper/gte-small/"
```
