# anishraj2195/rcbticket-bot architecture

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

- Interactive diagram: https://gitdiagram.com/anishraj2195/rcbticket-bot
- Repository: https://github.com/anishraj2195/rcbticket-bot

## Overview

Rcbticket-bot is a small polling notifier for CSK–RCB IPL tickets. Its main workflow repeatedly fetches the RCB ticket page, finds the match listing, classifies ticket availability, and sends a Telegram alert when availability changes to available; it also prints status to the terminal. The implementation is contained in one file. The README gives little detail, so the graph reflects only behavior explicit in the sampled source.

Main entry points: [`ticketbot.py`](https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.py) (Ticket checker)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_loop["Polling loop<br/>[ticketbot.py]"]
node_checker["Ticket checker<br/>[ticketbot.py]"]
node_listing["Match detection<br/>[ticketbot.py]"]
node_classifier["Status classifier<br/>[ticketbot.py]"]
node_state["Previous status<br/>[ticketbot.py]"]
node_tickets["RCB ticket page"]
node_telegram["Telegram API"]
node_recipient(("Telegram recipient"))
node_terminal["Terminal"]

node_loop -->|"calls"| node_checker
node_checker -->|"fetches"| node_tickets
node_tickets -->|"returns page"| node_checker
node_checker -->|"parses page"| node_listing
node_listing -->|"provides match text"| node_classifier
node_classifier -->|"reads and updates"| node_state
node_checker -->|"sends alert"| node_telegram
node_telegram -->|"delivers message"| node_recipient
node_checker -->|"prints status"| node_terminal

click node_loop "https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.py"
click node_checker "https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.py"
click node_listing "https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.py"
click node_classifier "https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.py"
click node_state "https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.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_loop,node_checker,node_listing,node_classifier,node_state toneTeal
class node_tickets,node_recipient,node_terminal toneIndigo
class node_telegram toneMint
```

## Components

### Other components

- [Polling loop](https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.py): `ticketbot.py`
- [Ticket checker](https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.py): `ticketbot.py`
- [Match detection](https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.py): `ticketbot.py`
- [Status classifier](https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.py): `ticketbot.py`
- [Previous status](https://github.com/anishraj2195/rcbticket-bot/blob/main/ticketbot.py): `ticketbot.py`
- **RCB ticket page**
- **Telegram API**
- **Telegram recipient**
- **Terminal**

## Connections

- Polling loop → Ticket checker: calls
- Ticket checker → RCB ticket page: fetches
- RCB ticket page → Ticket checker: returns page
- Ticket checker → Match detection: parses page
- Match detection → Status classifier: provides match text
- Status classifier → Previous status: reads and updates
- Ticket checker → Telegram API: sends alert
- Telegram API → Telegram recipient: delivers message
- Ticket checker → Terminal: prints status
