How kittynxr/maowbot works
Main Components
a) Core System Components:
• Plugin System (gRPC + In-Process)
• EventBus (Central Message Broker)
• Platform Integrations (Twitch, Discord, VRChat)
• Authentication System
• Database Layer
• Service Layer
• Task Scheduler
b) External Components:
• External Plugin Clients
• Platform Services (Twitch, Discord, VRChat APIs)
• SQLite Database
Layer 1 (External Clients):
• External Plugins (gRPC)
• Platform Services (Twitch/Discord/VRChat)
Layer 2 (Interface Layer):
• Plugin Manager
• Platform Integration Managers
• Authentication Manager
Layer 3 (Core Services):
• EventBus (Central Hub)
• Message Service
• User Service
Layer 4 (Data Layer):
• Repository Layer
• SQLite Database
• Message Cache
Key Relationships to Highlight
a) Data Flow Paths:
• Service communication with EventBus
b) Component Dependencies:
• How Services depend on Repositories
• EventBus subscribers (DB Logger, Plugin Manager, Services)
• Authentication flow between Platform Integrations and Auth Manager
Additional Elements
• Task Scheduler (Monthly Maintenance, Credential Refresh)
• Cache System
• Crypto Helper
• DB Migrations
Specific Implementation Details
• SQLite as the primary database
• gRPC for external plugin communication
• Event-driven architecture with publish/subscribe pattern
• Platform-specific runtime implementations
• Service layer business logic separation
Notes Section
Annotations for:
• Current development status
• Key dependencies (sqlx, tonic, etc.)
• Testing approach (in-memory DB)
• Migration handling
Remember to maintain a balance between detail and clarity, focusing on the architectural decisions while avoiding implementation-specific details that might change frequently.
This system design should effectively communicate the modular, event-driven nature of the application while highlighting its plugin architecture and multi-platform support capabilities.