How pajlada/chatterino2 works
Chatterino 2 is a desktop Twitch chat client. The principal workflow is to open a chat view, receive Twitch chat or event data, turn it into messages, and present it to the user; commands and moderation are additional interaction paths. The source index and excerpts show application wiring, command execution, PubSub handling, and window management. Message parsing and rendering links are shown as unverified because their implementation excerpts were not provided.
Main entry points: Application.cpp Application · WindowManager.cpp Window manager · CommandController.cpp Commands · Message.cpp Chat messages
Components 22
Application
- Application
src/Application.cpp - Window manager
src/singletons/WindowManager.cpp
Chat Experience
- Channel state
src/common/Channel.cpp - Message builder
src/messages/MessageBuilder.cpp - Chat messages
src/messages/Message.cpp - Message layout
src/messages/layouts/MessageLayout.cpp
Twitch Integration
- Twitch IRC
src/providers/twitch/TwitchIrc.cpp - IRC messages
src/providers/twitch/IrcMessageHandler.cpp - Twitch PubSub
src/providers/twitch/PubSubManager.cpp - Twitch EventSub
src/providers/twitch/eventsub/Controller.cpp - Helix API
src/providers/twitch/api/Helix.cpp
Client Features
- Accounts
src/controllers/accounts/AccountController.cpp - Commands
src/controllers/commands/CommandController.cpp - Highlights
src/controllers/highlights/HighlightController.cpp - Ignore rules
src/controllers/ignores/IgnoreController.cpp - Notifications
src/controllers/notifications/NotificationController.cpp - Lua plugins
src/controllers/plugins/PluginController.cpp
Shared Services
- Network manager
src/common/network/NetworkManager.cpp - Settings
src/singletons/Settings.hpp - Application paths
src/singletons/Paths.hpp
Other components
- Chat user
- Twitch services
Connections 29
- Chat user → Window manager: opens chat
README.md - Application → Accounts: creates
src/Application.cpp - Application → Commands: creates
src/Application.cpp - Application → Notifications: creates
src/Application.cpp - Application → Highlights: creates
src/Application.cpp - Application → Twitch PubSub: initializes
src/Application.cpp - Application → Twitch EventSub: initializes
src/Application.cpp - Application → Window manager: manages
src/Application.cpp - Window manager → Settings: reads
src/singletons/WindowManager.cpp - Window manager → Channel state: lays out
src/singletons/WindowManager.cpp - Channel state → Twitch IRC: connects
- Twitch IRC → IRC messages: dispatches
- IRC messages → Message builder: builds
- Message builder → Chat messages: constructs
- Chat messages → Message layout: renders
- Commands → Accounts: uses
src/controllers/commands/CommandController.cpp - Commands → Channel state: executes for
src/controllers/commands/CommandController.cpp - Highlights → Chat messages: evaluates
src/controllers/highlights/HighlightController.cpp - Notifications → Chat messages: handles
src/controllers/notifications/NotificationController.cpp - Notifications → Helix API: queries
src/controllers/notifications/NotificationController.cpp - Lua plugins → Commands: registers commands
src/controllers/plugins/PluginController.cpp - Lua plugins → Network manager: uses
src/controllers/plugins/PluginController.cpp - Twitch PubSub → Accounts: tracks account
src/providers/twitch/PubSubManager.cpp - Twitch PubSub → Twitch services: receives events
- Twitch EventSub → Helix API: requests subscriptions
src/providers/twitch/eventsub/Controller.cpp - Twitch EventSub → Twitch services: receives events
- Helix API → Network manager: uses
- Accounts → Settings: persists configuration
- Application → Application paths: configures services