How heeetz/heetkit-bot works
HeetKit is a desktop Twitch chat bot with a local React control panel. The main workflow is chat arriving from Twitch, dispatch through command and permission checks, then a reply or AI response; the panel manages configuration and displays live status/logs. The graph preserves documented command, filter, personality, memory, profile, and utility capabilities. Some runtime wiring is documented or named in the source index rather than shown in excerpts, so uncertain links are omitted or marked unverified.
Main entry points: webview_host.py Desktop host API · registry.py Command dispatch · facade.py Service facade · gemini_ai_service.py Gemini responder
Components 31
Desktop control
- Control panel
frontend/src/App.tsx - Frontend bridge
frontend/src/bridge.ts - Desktop host API
app/webview_host.py - Live log buffer
app/utils/logging.py
Twitch chat
- Twitch chat service
app/twitch/client.py - Command dispatch
app/commands/registry.py - Role permissions
app/twitch/permissions.py - Built-in commands
app/commands - Custom commands
app/custom_commands.py - Cooldown tracking
app/utils/cooldown.py - Message triggers
app/message_triggers.py
AI and filters
- AI chat command
app/commands/ai.py - Gemini responder
app/services/gemini_ai_service.py - AI personalities
app/config/personalities.py - Chat and AI filters
app/services/filter_manager.py - Conversation memory
app/services/memory.py
Settings and state
- Local data store
app/database/database.py - Data repository
app/database/repository.py - Runtime controls
app/runtime_state.py - Profile settings
app/app_settings.py - Command settings
app/command_settings.py - AI model settings
app/config/ai_models.py - Filter settings
app/filter_settings.py - Local profile files
app/runtime_paths.py
Application services
- Weather utility
app/services/weather.py - Twitch utilities
app/services/twitch.py - Service facade
app/services/facade.py
Other components
- Desktop user
- Twitch chat users
- Twitch
- Gemini API
Connections 32
- Desktop user → Control panel: controls
README.md - Control panel → Frontend bridge: calls API
frontend/src/App.tsx - Frontend bridge → Desktop host API: invokes
- Desktop host API → Profile settings: manages profiles
app/webview_host.py - Desktop host API → Runtime controls: updates controls
app/webview_host.py - Desktop host API → Live log buffer: reads recent logs
app/webview_host.py - Twitch chat users → Twitch: sends chat
README.md - Twitch → Twitch chat service: delivers events
app/twitch/client.py - Twitch chat service → Command dispatch: dispatches messages
app/twitch/client.py - Command dispatch → Role permissions: checks roles
app/commands/registry.py - Command dispatch → Custom commands: resolves custom commands
app/commands/registry.py - Command dispatch → Runtime controls: reads command state
app/commands/registry.py - Command dispatch → Cooldown tracking: checks cooldowns
app/commands/registry.py - Command dispatch → Message triggers: checks triggers
app/commands/registry.py - Command dispatch → Built-in commands: dispatches built-ins
app/commands/social.py - Command dispatch → Service facade: uses services
app/commands/registry.py - Built-in commands → AI chat command: includes
- AI chat command → Service facade: requests AI
- Service facade → Gemini responder: provides AI service
- Gemini responder → Gemini API: requests completions
app/services/gemini_ai_service.py - Gemini responder → AI personalities: builds instructions
app/services/gemini_ai_service.py - Gemini responder → Chat and AI filters: applies filters
app/services/gemini_ai_service.py - Service facade → Conversation memory: provides memory
app/services/facade.py - Service facade → Data repository: uses persistence
app/services/facade.py - Data repository → Local data store: reads and writes
app/database/repository.py - Service facade → Twitch utilities: provides Twitch utilities
app/services/facade.py - Built-in commands → Weather utility: offers weather
- Desktop host API → Command settings: manages commands
app/webview_host.py - Desktop host API → Filter settings: manages filters
app/webview_host.py - Desktop host API → AI model settings: manages AI settings
app/webview_host.py - Runtime controls → Local profile files: persists profile state
- Desktop host API → Live log buffer: exposes log feed
app/webview_host.py