# matahash/proyecto-rd-tourist-chatbot-ia-telegram-py architecture

> Architecture diagram of the GitHub repository matahash/proyecto-rd-tourist-chatbot-ia-telegram-py, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py
- Repository: https://github.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py

## Overview

RD Tourist AI Bot is a Telegram travel assistant. A user starts the bot to receive an interactive menu, then can share GPS coordinates for nearby recommendations or send text for tourism answers. Both recommendation paths call Groq’s Llama model; the location path also includes a Google Maps link. The implementation is concentrated in one Python file, so the handler nodes describe distinct responsibilities within that file. The README documents the menu and capabilities; the source excerpt shows their implementation and routing.

Main entry points: [`rdbot.py`](https://github.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py/blob/main/rdbot.py) (GPS recommendations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_telegram["Telegram interaction"]
  node_telegram_platform["Telegram platform"]
  node_polling_app["Polling app<br/>[rdbot.py]"]
  node_start_handler["Start and menu<br/>[rdbot.py]"]
end

subgraph group_guidance["Travel guidance"]
  node_location_handler["GPS recommendations<br/>[rdbot.py]"]
  node_text_handler["Tourism answers<br/>[rdbot.py]"]
  node_groq["Groq Llama"]
  node_maps["Google Maps"]
end

node_traveler(("Traveler"))

node_traveler -->|"sends updates"| node_telegram_platform
node_telegram_platform -->|"polls updates"| node_polling_app
node_polling_app -->|"routes /start"| node_start_handler
node_polling_app -->|"routes location"| node_location_handler
node_polling_app -->|"routes text"| node_text_handler
node_start_handler -->|"sends menu"| node_telegram_platform
node_location_handler -->|"requests recommendations"| node_groq
node_groq -->|"returns generated text"| node_location_handler
node_location_handler -->|"creates map link"| node_maps
node_location_handler -->|"replies with results"| node_telegram_platform
node_text_handler -->|"requests answer"| node_groq
node_groq -->|"returns generated text"| node_text_handler
node_text_handler -->|"replies with answer"| node_telegram_platform

click node_polling_app "https://github.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py/blob/main/rdbot.py"
click node_start_handler "https://github.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py/blob/main/rdbot.py"
click node_location_handler "https://github.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py/blob/main/rdbot.py"
click node_text_handler "https://github.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py/blob/main/rdbot.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_telegram_platform,node_polling_app,node_start_handler toneBlue
class node_location_handler,node_text_handler,node_groq,node_maps toneAmber
class node_traveler toneIndigo
```

## Components

### Telegram interaction

- **Telegram platform**
- [Polling app](https://github.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py/blob/main/rdbot.py): `rdbot.py`
- [Start and menu](https://github.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py/blob/main/rdbot.py): `rdbot.py`

### Travel guidance

- [GPS recommendations](https://github.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py/blob/main/rdbot.py): `rdbot.py`
- [Tourism answers](https://github.com/matahash/proyecto-rd-tourist-chatbot-ia-telegram-py/blob/main/rdbot.py): `rdbot.py`
- **Groq Llama**
- **Google Maps**

### Other components

- **Traveler**

## Connections

- Traveler → Telegram platform: sends updates
- Telegram platform → Polling app: polls updates (evidence: `rdbot.py`)
- Polling app → Start and menu: routes /start (evidence: `rdbot.py`)
- Polling app → GPS recommendations: routes location (evidence: `rdbot.py`)
- Polling app → Tourism answers: routes text (evidence: `rdbot.py`)
- Start and menu → Telegram platform: sends menu (evidence: `rdbot.py`)
- GPS recommendations → Groq Llama: requests recommendations (evidence: `rdbot.py`)
- Groq Llama → GPS recommendations: returns generated text (evidence: `rdbot.py`)
- GPS recommendations → Google Maps: creates map link (evidence: `rdbot.py`)
- GPS recommendations → Telegram platform: replies with results (evidence: `rdbot.py`)
- Tourism answers → Groq Llama: requests answer (evidence: `rdbot.py`)
- Groq Llama → Tourism answers: returns generated text (evidence: `rdbot.py`)
- Tourism answers → Telegram platform: replies with answer (evidence: `rdbot.py`)
