# sakexyz/trellobot architecture

> Architecture diagram of the GitHub repository sakexyz/trellobot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sakexyz/trellobot
- Repository: https://github.com/sakexyz/trellobot

## Overview

TrelloBot accepts Telegram messages, forwards them to a support chat, acknowledges requests with a video, and creates a Trello card from the message text. The start route also welcomes users and provides format/media instructions. The README documents these capabilities; the sampled handlers show their implementation. The message handler splits text into card fields but does not validate the documented format. The support-chat destination and Telegram/Trello services are external; no separate persistence layer is shown.

Main entry points: [`handlers/message_handler.py`](https://github.com/sakexyz/trellobot/blob/main/handlers/message_handler.py) (Request handling), [`config/config.py`](https://github.com/sakexyz/trellobot/blob/main/config/config.py) (Bot configuration), [`handlers/start_handler.py`](https://github.com/sakexyz/trellobot/blob/main/handlers/start_handler.py) (Start and instructions), [`services/trello_service.py`](https://github.com/sakexyz/trellobot/blob/main/services/trello_service.py) (Card creation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot runtime"]
  node_main["Polling entry point<br/>[main.py]"]
  node_config["Bot configuration<br/>[config.py]"]
end

subgraph group_handlers["User interactions"]
  node_start["Start and instructions<br/>[start_handler.py]"]
  node_message["Request handling<br/>[message_handler.py]"]
  node_assets["Bot media"]
end

subgraph group_integrations["External integrations"]
  node_telegram["Telegram platform"]
  node_trello["Trello API"]
  node_trello_service["Card creation<br/>[trello_service.py]"]
end

node_user(("Telegram user"))
node_support(("Support chat"))

node_user -->|"sends messages"| node_telegram
node_telegram -->|"delivers updates"| node_config
node_main -->|"starts polling"| node_config
node_start -->|"registers routes"| node_config
node_message -->|"registers route"| node_config
node_start -->|"forwards and replies"| node_telegram
node_message -->|"forwards request"| node_support
node_message -->|"sends video"| node_telegram
node_start -->|"reads images"| node_assets
node_message -->|"reads video"| node_assets
node_message -->|"creates card"| node_trello_service
node_trello_service -->|"posts card"| node_trello

click node_main "https://github.com/sakexyz/trellobot/blob/main/main.py"
click node_config "https://github.com/sakexyz/trellobot/blob/main/config/config.py"
click node_start "https://github.com/sakexyz/trellobot/blob/main/handlers/start_handler.py"
click node_message "https://github.com/sakexyz/trellobot/blob/main/handlers/message_handler.py"
click node_trello_service "https://github.com/sakexyz/trellobot/blob/main/services/trello_service.py"
click node_assets "https://github.com/sakexyz/trellobot/tree/main/img"

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_main,node_config,node_user toneBlue
class node_start,node_message,node_assets toneAmber
class node_telegram,node_trello,node_trello_service toneMint
class node_support toneIndigo
```

## Components

### Bot runtime

- [Polling entry point](https://github.com/sakexyz/trellobot/blob/main/main.py): `main.py`
- [Bot configuration](https://github.com/sakexyz/trellobot/blob/main/config/config.py): `config/config.py`

### User interactions

- [Start and instructions](https://github.com/sakexyz/trellobot/blob/main/handlers/start_handler.py): `handlers/start_handler.py`
- [Request handling](https://github.com/sakexyz/trellobot/blob/main/handlers/message_handler.py): `handlers/message_handler.py`
- [Bot media](https://github.com/sakexyz/trellobot/tree/main/img): `img`

### External integrations

- **Telegram platform**
- **Trello API**
- [Card creation](https://github.com/sakexyz/trellobot/blob/main/services/trello_service.py): `services/trello_service.py`

### Other components

- **Telegram user**
- **Support chat**

## Connections

- Telegram user → Telegram platform: sends messages
- Telegram platform → Bot configuration: delivers updates
- Polling entry point → Bot configuration: starts polling
- Start and instructions → Bot configuration: registers routes
- Request handling → Bot configuration: registers route
- Start and instructions → Telegram platform: forwards and replies
- Request handling → Support chat: forwards request
- Request handling → Telegram platform: sends video
- Start and instructions → Bot media: reads images
- Request handling → Bot media: reads video
- Request handling → Card creation: creates card
- Card creation → Trello API: posts card
