# deduu/vidavox_client architecture

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

- Interactive diagram: https://gitdiagram.com/deduu/vidavox_client
- Repository: https://github.com/deduu/vidavox_client

## Overview

##### Project type and purpose
- This is an open-source Python client library (SDK) for interacting with a remote Retrieval-Augmented Generation (RAG) API service.
- The library abstracts folder management, file uploads, search operations, error handling, and configuration.

##### File structure
- Top level:
- setup.py, README.md, examples/
- Core package: vidavox_rag_client/
- client.py – main entry point (RAGClient class)
- config.py – environment-based configuration loader
- folder_service.py & search_service.py – domain-specific API wrappers
- models/ – representations of Folder, File, Search results
- exceptions.py – custom exception hierarchy
- utils.py – shared HTTP request or helper functions
- Examples directory shows typical usage scenarios.

##### README for additional insights
- Describes features (folder ops, file ops, search, upload+search).
- Shows configuration via .env or explicit parameters.
- Demonstrates how RAGClient delegates to service classes.
- Mentions dependencies (Python 3.8+, dotenv, HTTP library).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Layers
    subgraph "User Application"
        UA["User Application"]:::user
    end

    subgraph "Configuration Store"
        CFG["Configuration Loader"]:::config
    end

    subgraph "Façade Layer"
        RC["RAGClient"]:::façade
    end

    subgraph "Service Layer"
        FS["FolderService"]:::service
        SS["SearchService"]:::service
    end

    subgraph "Transport Layer"
        HTTP["HTTP/REST Transport"]:::transport
    end

    subgraph "Model Layer"
        MFile["File Model"]:::model
        MFolder["Folder Model"]:::model
        MSearch["Search Model"]:::model
    end

    subgraph "Exceptions"
        EXC["Exceptions"]:::exception
    end

    ExternalAPI["External RAG API"]:::external

    %% Connections
    UA -->|"invoke methods"| RC
    RC -->|"load config"| CFG
    RC -->|"delegates to"| FS
    RC -->|"delegates to"| SS
    FS -->|"uses HTTP"| HTTP
    SS -->|"uses HTTP"| HTTP
    HTTP -->|"POST/GET JSON"| ExternalAPI
    HTTP -->|"maps JSON to model"| MFile
    HTTP -->|"maps JSON to model"| MFolder
    HTTP -->|"maps JSON to model"| MSearch
    FS -->|"returns models or raises"| EXC
    SS -->|"returns models or raises"| EXC
    HTTP -->|"raises on error"| EXC
    UA -->|"handles exceptions"| EXC

    %% Click Events
    click UA "https://github.com/deduu/vidavox_client/blob/main/examples/basic_usage.py"
    click RC "https://github.com/deduu/vidavox_client/blob/main/vidavox_rag_client/client.py"
    click CFG "https://github.com/deduu/vidavox_client/blob/main/vidavox_rag_client/config.py"
    click FS "https://github.com/deduu/vidavox_client/blob/main/vidavox_rag_client/folder_service.py"
    click SS "https://github.com/deduu/vidavox_client/blob/main/vidavox_rag_client/search_service.py"
    click HTTP "https://github.com/deduu/vidavox_client/blob/main/vidavox_rag_client/utils.py"
    click MFile "https://github.com/deduu/vidavox_client/blob/main/vidavox_rag_client/models/file.py"
    click MFolder "https://github.com/deduu/vidavox_client/blob/main/vidavox_rag_client/models/folder.py"
    click MSearch "https://github.com/deduu/vidavox_client/blob/main/vidavox_rag_client/models/search.py"
    click EXC "https://github.com/deduu/vidavox_client/blob/main/vidavox_rag_client/exceptions.py"

    %% Styles
    classDef user fill:#D0E8FF,stroke:#333,stroke-width:1px
    classDef façade fill:#D0E8FF,stroke:#333,stroke-width:1px
    classDef service fill:#D0E8FF,stroke:#333,stroke-width:1px
    classDef transport fill:#D0E8FF,stroke:#333,stroke-width:1px
    classDef model fill:#D0E8FF,stroke:#333,stroke-width:1px
    classDef config fill:#F0F0F0,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
    classDef exception fill:#FFCCCC,stroke:#333,stroke-width:1px
    classDef external fill:#CFFFB3,stroke:#333,stroke-width:1px,stroke-dasharray: 2 2
```
