How junah201/chzzk-discord-bot works
Main System Components
The system should be divided into these key components:
a) Frontend Layer
• React-based dashboard application
• User authentication flow
• Guild management interface
• Notification configuration UI
b) Backend Layer (Serverless)
• Lambda functions for different operations
• DynamoDB for data persistence
• Discord API integration
• Chzzk API integration
Key Architectural Elements
a) Client-Side Flow:
• User authentication via Discord OAuth2
• Dashboard interface for managing notifications
• Documentation and help pages
b) Serverless Backend:
• Event-driven Lambda functions
• Periodic checks for stream status
• Session management for Naver/Chzzk
• Discord webhook notifications
Specific Implementation Details
[Frontend Application]
• [Discord OAuth2 Flow]
• [API Gateway]
• [Lambda Functions]
• discord_oauth2_redirect
• discord_guilds
• discord_me
• event_handler
• live_check (5-min intervals)
• naver_session_renew (12-hour intervals)
• [DynamoDB]
• Notification configurations
• [External Services]
• Discord API
• Chzzk API
• [Notification Delivery]
• Discord Webhooks
Flow Directions
Key flows:
• User interaction flow
• Authentication flow
• Notification check flow
• Alert delivery flow
Important Notes
• Serverless architecture
• Event-driven nature of the system
• Periodic checks for stream status
• Session renewal mechanism
• Data persistence patterns
Special Attention Points
Crucial elements:
• Security flow with Discord OAuth2
• Periodic stream status checking mechanism
• Session management for Naver/Chzzk
• Error handling paths
• Scalability aspects of the serverless architecture