# shad0wcs/broni-code architecture

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

- Interactive diagram: https://gitdiagram.com/shad0wcs/broni-code
- Repository: https://github.com/shad0wcs/broni-code

## Overview

This small bot polls a Pachca chat, ignores messages seen at startup or in prior polls, formats new-order and overdue-order alerts, and sends recognized alerts to Telegram. The single source file owns polling, deduplication, formatting, and delivery; the external chat services are separate endpoints. Evidence is limited to the excerpted app.py; the README is empty.

Main entry points: [`app.py`](https://github.com/shad0wcs/broni-code/blob/main/app.py) (Message poller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bot["Alert bot"]
  node_poller["Message poller<br/>[app.py]"]
  node_seen["Seen IDs<br/>[app.py]"]
  node_formatter["Alert formatter<br/>[app.py]"]
end

node_operator(("Operator"))
node_pachca["Pachca chat"]
node_telegram["Telegram bot"]

node_operator -.->|"posts alerts"| node_pachca
node_poller -->|"polls messages"| node_pachca
node_poller -->|"checks and records"| node_seen
node_poller -->|"formats content"| node_formatter
node_poller -->|"sends recognized alerts"| node_telegram

click node_poller "https://github.com/shad0wcs/broni-code/blob/main/app.py"
click node_seen "https://github.com/shad0wcs/broni-code/blob/main/app.py"
click node_formatter "https://github.com/shad0wcs/broni-code/blob/main/app.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_poller,node_seen,node_formatter toneBlue
class node_operator,node_pachca,node_telegram toneIndigo
```

## Components

### Alert bot

- [Message poller](https://github.com/shad0wcs/broni-code/blob/main/app.py): `app.py`
- [Seen IDs](https://github.com/shad0wcs/broni-code/blob/main/app.py): `app.py`
- [Alert formatter](https://github.com/shad0wcs/broni-code/blob/main/app.py): `app.py`

### Other components

- **Operator**
- **Pachca chat**
- **Telegram bot**

## Connections

- Operator → Pachca chat: posts alerts
- Message poller → Pachca chat: polls messages (evidence: `app.py`)
- Message poller → Seen IDs: checks and records (evidence: `app.py`)
- Message poller → Alert formatter: formats content (evidence: `app.py`)
- Message poller → Telegram bot: sends recognized alerts (evidence: `app.py`)
