# xisz/yaperino architecture

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

- Interactive diagram: https://gitdiagram.com/xisz/yaperino
- Repository: https://github.com/xisz/yaperino

## Overview

Yaperino is a Windows desktop app that combines Twitch, Kick, YouTube and TikTok chat with a multi-platform Live Streams window. The main workflow is to check channels for live streams, organize the results, open a channel’s chat, and read or send messages through platform-specific connections. The graph also includes account sign-in, chat enhancements, moderation, plugins and settings. Some subsystems are documented in the README but their runtime wiring was not sampled; those relationships are omitted rather than inferred.

Main entry points: [`src/settings_ui.rs`](https://github.com/xisz/yaperino/blob/main/src/settings_ui.rs) (Settings UI), [`src/app.rs`](https://github.com/xisz/yaperino/blob/main/src/app.rs) (Live Streams app), [`src/chat_main.rs`](https://github.com/xisz/yaperino/blob/main/src/chat_main.rs) (Chats window), [`src/features.rs`](https://github.com/xisz/yaperino/blob/main/src/features.rs) (App features)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Application UI"]
  node_app["Live Streams app<br/>[app.rs]"]
  node_chat_window["Chats window<br/>[chat_main.rs]"]
  node_settings["Settings UI<br/>[settings_ui.rs]"]
  node_features["App features<br/>[features.rs]"]
end

subgraph group_streams["Streams and platforms"]
  node_live_fetch["Live checks<br/>[fetch.rs]"]
  node_stream_model["Stream list rules<br/>[model.rs]"]
  node_platforms["Platform discovery and chat<br/>[platforms.rs]"]
  node_tiktok_chat["TikTok chat<br/>[tiktokchat.rs]"]
  node_other_chat["Kick and YouTube chat<br/>[otherchat.rs]"]
end

subgraph group_chat["Chat experience"]
  node_twitch_chat["Twitch chat<br/>[chat.rs]"]
  node_chat_render["Chat rendering<br/>[style.rs]"]
  node_emotes["Emotes and badges<br/>[emotes.rs]"]
  node_chat_rules["Highlights and filters<br/>[rules.rs]"]
  node_moderation["Twitch moderation<br/>[moderation.rs]"]
end

subgraph group_accounts["Accounts and integrations"]
  node_account["Twitch account<br/>[account.rs]"]
  node_kick_auth["Kick sign-in<br/>[kick_auth.rs]"]
  node_youtube_auth["YouTube sign-in<br/>[youtube_auth.rs]"]
  node_web_login["Web login session<br/>[weblogin.rs]"]
  node_browser["Browser launch<br/>[browser.rs]"]
  node_streamlink["Streamlink integration<br/>[streamlink.rs]"]
end

subgraph group_custom["Customization"]
  node_plugins["Lua plugins<br/>[plugins.rs]"]
  node_hotkeys["Hotkeys<br/>[hotkeys.rs]"]
end

node_user(("User"))
node_external_platforms{{"Chat platforms"}}
node_twitch_api{{"Twitch API"}}
node_google{{"Google services"}}
node_kick_service{{"Kick services"}}

node_user -->|"uses"| node_app
node_app -->|"checks streams"| node_live_fetch
node_app -->|"organizes results"| node_stream_model
node_app -->|"finds channels"| node_platforms
node_app -->|"opens chat"| node_twitch_chat
node_app -->|"loads emotes"| node_emotes
node_app -.->|"opens window"| node_chat_window
node_chat_window -->|"dispatches actions"| node_features
node_chat_window -->|"runs actions"| node_moderation
node_chat_window -->|"draws chats"| node_chat_render
node_chat_window -->|"handles shortcuts"| node_hotkeys
node_settings -->|"configures"| node_features
node_settings -->|"configures sign-in"| node_account
node_settings -->|"starts sign-in"| node_kick_auth
node_settings -->|"starts sign-in"| node_youtube_auth
node_settings -->|"configures"| node_streamlink
node_settings -->|"configures"| node_chat_rules
node_settings -->|"manages plugins"| node_plugins
node_settings -->|"configures"| node_hotkeys
node_twitch_chat -->|"connects to Twitch"| node_external_platforms
node_platforms -->|"checks platforms"| node_external_platforms
node_platforms -->|"sends chat"| node_kick_service
node_tiktok_chat -.->|"connects to TikTok"| node_external_platforms
node_other_chat -.->|"connects to platforms"| node_external_platforms
node_account -->|"authenticates"| node_twitch_api
node_moderation -->|"moderates channels"| node_twitch_api
node_kick_auth -->|"authenticates"| node_kick_service
node_youtube_auth -->|"authenticates"| node_google
node_kick_auth -->|"uses session"| node_web_login
node_youtube_auth -->|"uses session"| node_web_login
node_features -->|"applies rules"| node_chat_rules
node_features -->|"runs plugins"| node_plugins
node_features -->|"dispatches moderation"| node_moderation

click node_app "https://github.com/xisz/yaperino/blob/main/src/app.rs"
click node_chat_window "https://github.com/xisz/yaperino/blob/main/src/chat_main.rs"
click node_settings "https://github.com/xisz/yaperino/blob/main/src/settings_ui.rs"
click node_features "https://github.com/xisz/yaperino/blob/main/src/features.rs"
click node_live_fetch "https://github.com/xisz/yaperino/blob/main/src/fetch.rs"
click node_stream_model "https://github.com/xisz/yaperino/blob/main/src/model.rs"
click node_platforms "https://github.com/xisz/yaperino/blob/main/src/platforms.rs"
click node_tiktok_chat "https://github.com/xisz/yaperino/blob/main/src/tiktokchat.rs"
click node_other_chat "https://github.com/xisz/yaperino/blob/main/src/otherchat.rs"
click node_twitch_chat "https://github.com/xisz/yaperino/blob/main/src/chat.rs"
click node_chat_render "https://github.com/xisz/yaperino/blob/main/src/style.rs"
click node_emotes "https://github.com/xisz/yaperino/blob/main/src/emotes.rs"
click node_chat_rules "https://github.com/xisz/yaperino/blob/main/src/rules.rs"
click node_moderation "https://github.com/xisz/yaperino/blob/main/src/moderation.rs"
click node_account "https://github.com/xisz/yaperino/blob/main/src/account.rs"
click node_kick_auth "https://github.com/xisz/yaperino/blob/main/src/kick_auth.rs"
click node_youtube_auth "https://github.com/xisz/yaperino/blob/main/src/youtube_auth.rs"
click node_web_login "https://github.com/xisz/yaperino/blob/main/src/weblogin.rs"
click node_browser "https://github.com/xisz/yaperino/blob/main/src/browser.rs"
click node_streamlink "https://github.com/xisz/yaperino/blob/main/src/streamlink.rs"
click node_plugins "https://github.com/xisz/yaperino/blob/main/src/plugins.rs"
click node_hotkeys "https://github.com/xisz/yaperino/blob/main/src/hotkeys.rs"

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_chat_window,node_settings,node_features,node_user toneBlue
class node_live_fetch,node_stream_model,node_platforms,node_tiktok_chat,node_other_chat toneAmber
class node_twitch_chat,node_chat_render,node_emotes,node_chat_rules,node_moderation,node_twitch_api toneMint
class node_account,node_kick_auth,node_youtube_auth,node_web_login,node_browser,node_streamlink toneRose
class node_plugins,node_hotkeys,node_external_platforms,node_google,node_kick_service toneIndigo
```

## Components

### Application UI

- [Live Streams app](https://github.com/xisz/yaperino/blob/main/src/app.rs): `src/app.rs`
- [Chats window](https://github.com/xisz/yaperino/blob/main/src/chat_main.rs): `src/chat_main.rs`
- [Settings UI](https://github.com/xisz/yaperino/blob/main/src/settings_ui.rs): `src/settings_ui.rs`
- [App features](https://github.com/xisz/yaperino/blob/main/src/features.rs): `src/features.rs`

### Streams and platforms

- [Live checks](https://github.com/xisz/yaperino/blob/main/src/fetch.rs): `src/fetch.rs`
- [Stream list rules](https://github.com/xisz/yaperino/blob/main/src/model.rs): `src/model.rs`
- [Platform discovery and chat](https://github.com/xisz/yaperino/blob/main/src/platforms.rs): `src/platforms.rs`
- [TikTok chat](https://github.com/xisz/yaperino/blob/main/src/tiktokchat.rs): `src/tiktokchat.rs`
- [Kick and YouTube chat](https://github.com/xisz/yaperino/blob/main/src/otherchat.rs): `src/otherchat.rs`

### Chat experience

- [Twitch chat](https://github.com/xisz/yaperino/blob/main/src/chat.rs): `src/chat.rs`
- [Chat rendering](https://github.com/xisz/yaperino/blob/main/src/style.rs): `src/style.rs`
- [Emotes and badges](https://github.com/xisz/yaperino/blob/main/src/emotes.rs): `src/emotes.rs`
- [Highlights and filters](https://github.com/xisz/yaperino/blob/main/src/rules.rs): `src/rules.rs`
- [Twitch moderation](https://github.com/xisz/yaperino/blob/main/src/moderation.rs): `src/moderation.rs`

### Accounts and integrations

- [Twitch account](https://github.com/xisz/yaperino/blob/main/src/account.rs): `src/account.rs`
- [Kick sign-in](https://github.com/xisz/yaperino/blob/main/src/kick_auth.rs): `src/kick_auth.rs`
- [YouTube sign-in](https://github.com/xisz/yaperino/blob/main/src/youtube_auth.rs): `src/youtube_auth.rs`
- [Web login session](https://github.com/xisz/yaperino/blob/main/src/weblogin.rs): `src/weblogin.rs`
- [Browser launch](https://github.com/xisz/yaperino/blob/main/src/browser.rs): `src/browser.rs`
- [Streamlink integration](https://github.com/xisz/yaperino/blob/main/src/streamlink.rs): `src/streamlink.rs`

### Customization

- [Lua plugins](https://github.com/xisz/yaperino/blob/main/src/plugins.rs): `src/plugins.rs`
- [Hotkeys](https://github.com/xisz/yaperino/blob/main/src/hotkeys.rs): `src/hotkeys.rs`

### Other components

- **User**
- **Chat platforms**
- **Twitch API**
- **Google services**
- **Kick services**

## Connections

- User → Live Streams app: uses (evidence: `README.md`)
- Live Streams app → Live checks: checks streams (evidence: `src/app.rs`)
- Live Streams app → Stream list rules: organizes results (evidence: `src/app.rs`)
- Live Streams app → Platform discovery and chat: finds channels (evidence: `src/app.rs`)
- Live Streams app → Twitch chat: opens chat (evidence: `src/app.rs`)
- Live Streams app → Emotes and badges: loads emotes (evidence: `src/app.rs`)
- Live Streams app → Chats window: opens window
- Chats window → App features: dispatches actions (evidence: `src/chat_main.rs`)
- Chats window → Twitch moderation: runs actions (evidence: `src/chat_main.rs`)
- Chats window → Chat rendering: draws chats (evidence: `src/chat_main.rs`)
- Chats window → Hotkeys: handles shortcuts (evidence: `src/chat_main.rs`)
- Settings UI → App features: configures (evidence: `src/settings_ui.rs`)
- Settings UI → Twitch account: configures sign-in (evidence: `src/settings_ui.rs`)
- Settings UI → Kick sign-in: starts sign-in (evidence: `src/settings_ui.rs`)
- Settings UI → YouTube sign-in: starts sign-in (evidence: `src/settings_ui.rs`)
- Settings UI → Streamlink integration: configures (evidence: `src/settings_ui.rs`)
- Settings UI → Highlights and filters: configures (evidence: `src/settings_ui.rs`)
- Settings UI → Lua plugins: manages plugins (evidence: `src/settings_ui.rs`)
- Settings UI → Hotkeys: configures (evidence: `src/settings_ui.rs`)
- Twitch chat → Chat platforms: connects to Twitch (evidence: `src/chat.rs`)
- Platform discovery and chat → Chat platforms: checks platforms (evidence: `src/platforms.rs`)
- Platform discovery and chat → Kick services: sends chat (evidence: `src/platforms.rs`)
- TikTok chat → Chat platforms: connects to TikTok
- Kick and YouTube chat → Chat platforms: connects to platforms
- Twitch account → Twitch API: authenticates (evidence: `src/account.rs`)
- Twitch moderation → Twitch API: moderates channels (evidence: `src/moderation.rs`)
- Kick sign-in → Kick services: authenticates (evidence: `src/kick_auth.rs`)
- YouTube sign-in → Google services: authenticates (evidence: `src/youtube_auth.rs`)
- Kick sign-in → Web login session: uses session (evidence: `src/kick_auth.rs`)
- YouTube sign-in → Web login session: uses session (evidence: `src/youtube_auth.rs`)
- App features → Highlights and filters: applies rules (evidence: `src/features.rs`)
- App features → Lua plugins: runs plugins (evidence: `src/features.rs`)
- App features → Twitch moderation: dispatches moderation (evidence: `src/features.rs`)
