# sleet1k/ai-dating-project architecture

> Architecture diagram of the GitHub repository sleet1k/ai-dating-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sleet1k/ai-dating-project
- Repository: https://github.com/sleet1k/ai-dating-project

## Overview

ADP is an interactive Telegram profile-screening agent: the user starts a service, the client receives and queues bot messages, a service-specific engine classifies them, and eligible profiles are assessed by a Gemini VLM before the engine applies a reaction. The graph also shows criteria and self-profile context, service adapters, and local history/cache management. The README documents CLI settings, key rotation, and adaptive criteria; unsampled implementation details are represented only where documented, and uncertain links are omitted.

Main entry points: [`tg_client.py`](https://github.com/sleet1k/ai-dating-project/blob/main/tg_client.py) (Telegram client workflow), [`vlm_analyzer.py`](https://github.com/sleet1k/ai-dating-project/blob/main/vlm_analyzer.py) (Profile analyzer), [`engines/__init__.py`](https://github.com/sleet1k/ai-dating-project/blob/main/engines/__init__.py) (Engine registry), [`engines/base.py`](https://github.com/sleet1k/ai-dating-project/blob/main/engines/base.py) (Engine contract)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_client["Telegram client workflow<br/>[tg_client.py]"]
  node_profile_queue["Profile queue worker<br/>[tg_client.py]"]
end

subgraph group_analysis["Profile analysis"]
  node_analyzer["Profile analyzer<br/>[vlm_analyzer.py]"]
  node_criteria["Criteria translation<br/>[vlm_analyzer.py]"]
  node_profile_context["Self-profile context<br/>[vlm_analyzer.py]"]
end

subgraph group_engines["Bot integrations"]
  node_registry["Engine registry<br/>[__init__.py]"]
  node_engine_base["Engine contract<br/>[base.py]"]
  node_leomatch["Leomatch adapter<br/>[leomatch.py]"]
  node_bibinto["Bibinto adapter<br/>[bibinto.py]"]
  node_blur["Blur adapter<br/>[blur.py]"]
end

subgraph group_settings["Settings and state"]
  node_config["Setup and settings<br/>[settings.py]"]
  node_local_files[("History and image cache<br/>[tg_client.py]")]
end

node_user(("CLI user"))
node_telegram["Telegram services"]
node_gemini["Google Gemini"]
node_translator["Google Translate"]

node_user -->|"chooses mode"| node_client
node_client -->|"loads settings"| node_config
node_client -->|"selects engine"| node_registry
node_registry -->|"registers"| node_leomatch
node_registry -->|"registers"| node_bibinto
node_registry -->|"registers"| node_blur
node_leomatch -->|"implements"| node_engine_base
node_bibinto -->|"implements"| node_engine_base
node_blur -->|"implements"| node_engine_base
node_client -->|"connects session"| node_telegram
node_telegram -->|"delivers messages"| node_profile_queue
node_profile_queue -->|"analyzes profiles"| node_analyzer
node_analyzer -->|"requests verdict"| node_gemini
node_analyzer -->|"loads criteria"| node_criteria
node_criteria -->|"translates text"| node_translator
node_analyzer -->|"loads context"| node_profile_context
node_profile_queue -->|"checks and reacts"| node_engine_base
node_leomatch -->|"sends commands"| node_telegram
node_bibinto -->|"sends commands"| node_telegram
node_blur -->|"sends commands"| node_telegram
node_client -->|"clears history/cache"| node_local_files
node_profile_queue -.->|"stores profile images"| node_local_files

click node_client "https://github.com/sleet1k/ai-dating-project/blob/main/tg_client.py"
click node_profile_queue "https://github.com/sleet1k/ai-dating-project/blob/main/tg_client.py"
click node_registry "https://github.com/sleet1k/ai-dating-project/blob/main/engines/__init__.py"
click node_engine_base "https://github.com/sleet1k/ai-dating-project/blob/main/engines/base.py"
click node_leomatch "https://github.com/sleet1k/ai-dating-project/blob/main/engines/leomatch.py"
click node_bibinto "https://github.com/sleet1k/ai-dating-project/blob/main/engines/bibinto.py"
click node_blur "https://github.com/sleet1k/ai-dating-project/blob/main/engines/blur.py"
click node_analyzer "https://github.com/sleet1k/ai-dating-project/blob/main/vlm_analyzer.py"
click node_criteria "https://github.com/sleet1k/ai-dating-project/blob/main/vlm_analyzer.py"
click node_profile_context "https://github.com/sleet1k/ai-dating-project/blob/main/vlm_analyzer.py"
click node_config "https://github.com/sleet1k/ai-dating-project/blob/main/config/settings.py"
click node_local_files "https://github.com/sleet1k/ai-dating-project/blob/main/tg_client.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client,node_profile_queue,node_user toneBlue
class node_analyzer,node_criteria,node_profile_context toneAmber
class node_registry,node_engine_base,node_leomatch,node_bibinto,node_blur toneMint
class node_config,node_local_files toneRose
class node_telegram,node_gemini,node_translator toneIndigo
```

## Components

### Runtime

- [Telegram client workflow](https://github.com/sleet1k/ai-dating-project/blob/main/tg_client.py): `tg_client.py`
- [Profile queue worker](https://github.com/sleet1k/ai-dating-project/blob/main/tg_client.py): `tg_client.py`

### Profile analysis

- [Profile analyzer](https://github.com/sleet1k/ai-dating-project/blob/main/vlm_analyzer.py): `vlm_analyzer.py`
- [Criteria translation](https://github.com/sleet1k/ai-dating-project/blob/main/vlm_analyzer.py): `vlm_analyzer.py`
- [Self-profile context](https://github.com/sleet1k/ai-dating-project/blob/main/vlm_analyzer.py): `vlm_analyzer.py`

### Bot integrations

- [Engine registry](https://github.com/sleet1k/ai-dating-project/blob/main/engines/__init__.py): `engines/__init__.py`
- [Engine contract](https://github.com/sleet1k/ai-dating-project/blob/main/engines/base.py): `engines/base.py`
- [Leomatch adapter](https://github.com/sleet1k/ai-dating-project/blob/main/engines/leomatch.py): `engines/leomatch.py`
- [Bibinto adapter](https://github.com/sleet1k/ai-dating-project/blob/main/engines/bibinto.py): `engines/bibinto.py`
- [Blur adapter](https://github.com/sleet1k/ai-dating-project/blob/main/engines/blur.py): `engines/blur.py`

### Settings and state

- [Setup and settings](https://github.com/sleet1k/ai-dating-project/blob/main/config/settings.py): `config/settings.py`
- [History and image cache](https://github.com/sleet1k/ai-dating-project/blob/main/tg_client.py): `tg_client.py`

### Other components

- **CLI user**
- **Telegram services**
- **Google Gemini**
- **Google Translate**

## Connections

- CLI user → Telegram client workflow: chooses mode (evidence: `README.md`)
- Telegram client workflow → Setup and settings: loads settings (evidence: `tg_client.py`)
- Telegram client workflow → Engine registry: selects engine (evidence: `tg_client.py`)
- Engine registry → Leomatch adapter: registers (evidence: `engines/__init__.py`)
- Engine registry → Bibinto adapter: registers (evidence: `engines/__init__.py`)
- Engine registry → Blur adapter: registers (evidence: `engines/__init__.py`)
- Leomatch adapter → Engine contract: implements (evidence: `engines/leomatch.py`)
- Bibinto adapter → Engine contract: implements (evidence: `engines/bibinto.py`)
- Blur adapter → Engine contract: implements (evidence: `engines/blur.py`)
- Telegram client workflow → Telegram services: connects session (evidence: `tg_client.py`)
- Telegram services → Profile queue worker: delivers messages (evidence: `tg_client.py`)
- Profile queue worker → Profile analyzer: analyzes profiles (evidence: `tg_client.py`)
- Profile analyzer → Google Gemini: requests verdict (evidence: `vlm_analyzer.py`)
- Profile analyzer → Criteria translation: loads criteria (evidence: `vlm_analyzer.py`)
- Criteria translation → Google Translate: translates text (evidence: `vlm_analyzer.py`)
- Profile analyzer → Self-profile context: loads context (evidence: `vlm_analyzer.py`)
- Profile queue worker → Engine contract: checks and reacts (evidence: `tg_client.py`)
- Leomatch adapter → Telegram services: sends commands (evidence: `engines/leomatch.py`)
- Bibinto adapter → Telegram services: sends commands (evidence: `engines/bibinto.py`)
- Blur adapter → Telegram services: sends commands (evidence: `engines/blur.py`)
- Telegram client workflow → History and image cache: clears history/cache (evidence: `tg_client.py`)
- Profile queue worker → History and image cache: stores profile images (evidence: `tg_client.py`)
