# tri0nic/dotabuff-parser architecture

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

- Interactive diagram: https://gitdiagram.com/tri0nic/dotabuff-parser
- Repository: https://github.com/tri0nic/dotabuff-parser

## Overview

Dotabuff Parser is a Windows Forms tool for finding Dota 2 counter-picks from Dotabuff disadvantage statistics. The user-facing workflow is to plan a pick, choose a lane and optionally mark signature heroes, then consult counter-pick results. The parser fetches and parses opponent statistics and combines them across up to five enemies, excluding already-picked characters. The README documents the UI capabilities, but Form1 was not sampled, so its calls into parser functionality are shown as unverified; internal parser links reflect only the excerpted calls.

Main entry points: [`DotabuffWF/Form1.cs`](https://github.com/tri0nic/dotabuff-parser/blob/master/DotabuffWF/Form1.cs) (Draft interface), [`Dotabuff Parser/Parser.cs`](https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs) (Build counter results), [`DotabuffWF/Program.cs`](https://github.com/tri0nic/dotabuff-parser/blob/master/DotabuffWF/Program.cs) (Application entry), [`Dotabuff Parser/Characters.cs`](https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Characters.cs) (Hero catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_app["Application entry<br/>[Program.cs]"]
  node_form["Draft interface<br/>[Form1.cs]"]
end

subgraph group_data["Counter-pick data"]
  node_heroes["Hero catalog<br/>[Characters.cs]"]
  node_fetchparse["Fetch and parse stats<br/>[Parser.cs]"]
end

subgraph group_logic["Statistics logic"]
  node_exclude["Exclude picked heroes<br/>[Parser.cs]"]
  node_aggregate["Aggregate enemy stats<br/>[Parser.cs]"]
  node_sumstats["Sum disadvantage and winrate<br/>[Parser.cs]"]
  node_results["Build counter results<br/>[Parser.cs]"]
end

node_user(("Draft planner"))
node_dotabuff["Dotabuff"]

node_user -->|"launches"| node_app
node_app -->|"opens"| node_form
node_user -->|"plans draft"| node_form
node_form -.->|"requests stats"| node_fetchparse
node_form -.->|"selects heroes"| node_heroes
node_fetchparse -->|"fetches page"| node_dotabuff
node_aggregate -->|"removes picked heroes"| node_exclude
node_aggregate -->|"builds results"| node_results
node_results -->|"calculates totals"| node_sumstats
node_form -.->|"shows picks"| node_results

click node_app "https://github.com/tri0nic/dotabuff-parser/blob/master/DotabuffWF/Program.cs"
click node_form "https://github.com/tri0nic/dotabuff-parser/blob/master/DotabuffWF/Form1.cs"
click node_heroes "https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Characters.cs"
click node_fetchparse "https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs"
click node_exclude "https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs"
click node_aggregate "https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs"
click node_sumstats "https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs"
click node_results "https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs"

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_app,node_form toneBlue
class node_heroes,node_fetchparse toneAmber
class node_exclude,node_aggregate,node_sumstats,node_results toneMint
class node_user,node_dotabuff toneIndigo
```

## Components

### Desktop UI

- [Application entry](https://github.com/tri0nic/dotabuff-parser/blob/master/DotabuffWF/Program.cs): `DotabuffWF/Program.cs`
- [Draft interface](https://github.com/tri0nic/dotabuff-parser/blob/master/DotabuffWF/Form1.cs): `DotabuffWF/Form1.cs`

### Counter-pick data

- [Hero catalog](https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Characters.cs): `Dotabuff Parser/Characters.cs`
- [Fetch and parse stats](https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs): `Dotabuff Parser/Parser.cs`

### Statistics logic

- [Exclude picked heroes](https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs): `Dotabuff Parser/Parser.cs`
- [Aggregate enemy stats](https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs): `Dotabuff Parser/Parser.cs`
- [Sum disadvantage and winrate](https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs): `Dotabuff Parser/Parser.cs`
- [Build counter results](https://github.com/tri0nic/dotabuff-parser/blob/master/Dotabuff%20Parser/Parser.cs): `Dotabuff Parser/Parser.cs`

### Other components

- **Draft planner**
- **Dotabuff**

## Connections

- Draft planner → Application entry: launches (evidence: `README.md`)
- Application entry → Draft interface: opens (evidence: `DotabuffWF/Program.cs`)
- Draft planner → Draft interface: plans draft (evidence: `README.md`)
- Draft interface → Fetch and parse stats: requests stats
- Draft interface → Hero catalog: selects heroes
- Fetch and parse stats → Dotabuff: fetches page (evidence: `Dotabuff Parser/Parser.cs`)
- Aggregate enemy stats → Exclude picked heroes: removes picked heroes (evidence: `Dotabuff Parser/Parser.cs`)
- Aggregate enemy stats → Build counter results: builds results (evidence: `Dotabuff Parser/Parser.cs`)
- Build counter results → Sum disadvantage and winrate: calculates totals (evidence: `Dotabuff Parser/Parser.cs`)
- Draft interface → Build counter results: shows picks
