# ethcelon/willie architecture

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

- Interactive diagram: https://gitdiagram.com/ethcelon/willie
- Repository: https://github.com/ethcelon/willie

## Overview

Willie is a Python IRC utility bot: an operator starts it with configuration, it connects to an IRC server, interprets incoming messages, and dispatches registered core tasks and extensible modules that produce replies or perform scheduled work. The map preserves the major runtime layers and representative feature modules, including RSS, search, URL handling, and meetbot. Several module implementations were not sampled; their inclusion reflects the file tree, while uncertain call relationships are omitted. Optional external web lookups are shown separately.

Main entry points: [`willie/bot.py`](https://github.com/ethcelon/willie/blob/master/willie/bot.py) (Bot runtime), [`willie/web.py`](https://github.com/ethcelon/willie/blob/master/willie/web.py) (HTTP helpers), [`willie.py`](https://github.com/ethcelon/willie/blob/master/willie.py) (Bot entry point), [`willie/modules/url.py`](https://github.com/ethcelon/willie/blob/master/willie/modules/url.py) (URL titles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup and configuration"]
  node_entry["Bot entry point<br/>[willie.py]"]
  node_configuration["Configuration<br/>[config.py]"]
end

subgraph group_runtime["IRC runtime"]
  node_bot["Bot runtime<br/>[bot.py]"]
  node_irc["IRC transport<br/>[irc.py]"]
  node_coretasks["Core IRC tasks<br/>[coretasks.py]"]
  node_module_api["Module API<br/>[module.py]"]
end

subgraph group_state["State and scheduling"]
  node_database[("Database interface<br/>[db.py]")]
  node_scheduler["Job scheduling<br/>[bot.py]"]
  node_utilities["Shared utilities<br/>[tools.py]"]
  node_web["HTTP helpers<br/>[web.py]"]
end

subgraph group_features["Bot capabilities"]
  node_admin["Administration<br/>[adminchannel.py]"]
  node_dice["Dice commands<br/>[dice.py]"]
  node_github["GitHub commands<br/>[github.py]"]
  node_meetbot["Meeting tools<br/>[meetbot.py]"]
  node_rss["RSS feeds<br/>[rss.py]"]
  node_search["Web search<br/>[search.py]"]
  node_url["URL titles<br/>[url.py]"]
  node_other_modules["Other commands"]
end

node_operator(("Operator"))
node_server(("IRC server"))
node_web_services(("External web services"))

node_operator -->|"starts"| node_entry
node_entry -->|"loads"| node_configuration
node_entry -.->|"starts"| node_bot
node_bot -->|"uses"| node_configuration
node_bot -->|"uses"| node_irc
node_irc -->|"connects"| node_server
node_bot -->|"loads"| node_coretasks
node_bot -.->|"registers"| node_module_api
node_bot -.->|"loads"| node_admin
node_bot -.->|"loads"| node_dice
node_bot -.->|"loads"| node_github
node_bot -.->|"loads"| node_meetbot
node_bot -.->|"loads"| node_rss
node_bot -.->|"loads"| node_search
node_bot -.->|"loads"| node_url
node_bot -.->|"loads"| node_other_modules
node_bot -->|"uses"| node_database
node_bot -->|"schedules"| node_scheduler
node_rss -->|"reads and writes"| node_database
node_search -->|"requests"| node_web
node_url -->|"fetches pages"| node_web
node_github -->|"requests"| node_web
node_meetbot -->|"uses"| node_url
node_web -->|"makes HTTP requests"| node_web_services

click node_entry "https://github.com/ethcelon/willie/blob/master/willie.py"
click node_configuration "https://github.com/ethcelon/willie/blob/master/willie/config.py"
click node_bot "https://github.com/ethcelon/willie/blob/master/willie/bot.py"
click node_irc "https://github.com/ethcelon/willie/blob/master/willie/irc.py"
click node_coretasks "https://github.com/ethcelon/willie/blob/master/willie/coretasks.py"
click node_module_api "https://github.com/ethcelon/willie/blob/master/willie/module.py"
click node_database "https://github.com/ethcelon/willie/blob/master/willie/db.py"
click node_scheduler "https://github.com/ethcelon/willie/blob/master/willie/bot.py"
click node_utilities "https://github.com/ethcelon/willie/blob/master/willie/tools.py"
click node_admin "https://github.com/ethcelon/willie/blob/master/willie/modules/adminchannel.py"
click node_dice "https://github.com/ethcelon/willie/blob/master/willie/modules/dice.py"
click node_github "https://github.com/ethcelon/willie/blob/master/willie/modules/github.py"
click node_meetbot "https://github.com/ethcelon/willie/blob/master/willie/modules/meetbot.py"
click node_rss "https://github.com/ethcelon/willie/blob/master/willie/modules/rss.py"
click node_search "https://github.com/ethcelon/willie/blob/master/willie/modules/search.py"
click node_url "https://github.com/ethcelon/willie/blob/master/willie/modules/url.py"
click node_other_modules "https://github.com/ethcelon/willie/tree/master/willie/modules"
click node_web "https://github.com/ethcelon/willie/blob/master/willie/web.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_entry,node_configuration toneBlue
class node_bot,node_irc,node_coretasks,node_module_api toneAmber
class node_database,node_scheduler,node_utilities,node_web,node_server toneMint
class node_admin,node_dice,node_github,node_meetbot,node_rss,node_search,node_url,node_other_modules toneRose
class node_operator,node_web_services toneIndigo
```

## Components

### Startup and configuration

- [Bot entry point](https://github.com/ethcelon/willie/blob/master/willie.py): `willie.py`
- [Configuration](https://github.com/ethcelon/willie/blob/master/willie/config.py): `willie/config.py`

### IRC runtime

- [Bot runtime](https://github.com/ethcelon/willie/blob/master/willie/bot.py): `willie/bot.py`
- [IRC transport](https://github.com/ethcelon/willie/blob/master/willie/irc.py): `willie/irc.py`
- [Core IRC tasks](https://github.com/ethcelon/willie/blob/master/willie/coretasks.py): `willie/coretasks.py`
- [Module API](https://github.com/ethcelon/willie/blob/master/willie/module.py): `willie/module.py`

### State and scheduling

- [Database interface](https://github.com/ethcelon/willie/blob/master/willie/db.py): `willie/db.py`
- [Job scheduling](https://github.com/ethcelon/willie/blob/master/willie/bot.py): `willie/bot.py`
- [Shared utilities](https://github.com/ethcelon/willie/blob/master/willie/tools.py): `willie/tools.py`
- [HTTP helpers](https://github.com/ethcelon/willie/blob/master/willie/web.py): `willie/web.py`

### Bot capabilities

- [Administration](https://github.com/ethcelon/willie/blob/master/willie/modules/adminchannel.py): `willie/modules/adminchannel.py`
- [Dice commands](https://github.com/ethcelon/willie/blob/master/willie/modules/dice.py): `willie/modules/dice.py`
- [GitHub commands](https://github.com/ethcelon/willie/blob/master/willie/modules/github.py): `willie/modules/github.py`
- [Meeting tools](https://github.com/ethcelon/willie/blob/master/willie/modules/meetbot.py): `willie/modules/meetbot.py`
- [RSS feeds](https://github.com/ethcelon/willie/blob/master/willie/modules/rss.py): `willie/modules/rss.py`
- [Web search](https://github.com/ethcelon/willie/blob/master/willie/modules/search.py): `willie/modules/search.py`
- [URL titles](https://github.com/ethcelon/willie/blob/master/willie/modules/url.py): `willie/modules/url.py`
- [Other commands](https://github.com/ethcelon/willie/tree/master/willie/modules): `willie/modules`

### Other components

- **Operator**
- **IRC server**
- **External web services**

## Connections

- Operator → Bot entry point: starts
- Bot entry point → Configuration: loads (evidence: `willie.py`)
- Bot entry point → Bot runtime: starts
- Bot runtime → Configuration: uses (evidence: `willie/bot.py`)
- Bot runtime → IRC transport: uses (evidence: `willie/bot.py`)
- IRC transport → IRC server: connects (evidence: `willie/irc.py`)
- Bot runtime → Core IRC tasks: loads (evidence: `willie/bot.py`)
- Bot runtime → Module API: registers (evidence: `willie/bot.py`)
- Bot runtime → Administration: loads
- Bot runtime → Dice commands: loads
- Bot runtime → GitHub commands: loads
- Bot runtime → Meeting tools: loads
- Bot runtime → RSS feeds: loads
- Bot runtime → Web search: loads
- Bot runtime → URL titles: loads
- Bot runtime → Other commands: loads
- Bot runtime → Database interface: uses (evidence: `willie/bot.py`)
- Bot runtime → Job scheduling: schedules (evidence: `willie/bot.py`)
- RSS feeds → Database interface: reads and writes (evidence: `willie/modules/rss.py`)
- Web search → HTTP helpers: requests (evidence: `willie/modules/search.py`)
- URL titles → HTTP helpers: fetches pages (evidence: `willie/modules/url.py`)
- GitHub commands → HTTP helpers: requests (evidence: `willie/modules/github.py`)
- Meeting tools → URL titles: uses (evidence: `willie/modules/meetbot.py`)
- HTTP helpers → External web services: makes HTTP requests (evidence: `willie/web.py`)
