How marknote/teleshellbot works
Main Components
a) Client Side:
• Telegram Client (Mobile/Desktop)
• Telegram Bot API Server (External Service)
b) Application Side:
• TeleShellBot Node.js Application
• Shell Command Execution Interface
• Server's Operating System Shell
Key Architectural Elements
• Authentication flow (using adminUsers configuration)
• Command processing pipeline
• Integration with Telegram's Bot API
• Shell command execution flow
[Telegram Client] <---> [Telegram Bot API] <---> [TeleShellBot Application]
• v
• [Config Manager]
• v
• [Authentication Handler]
• v
• [Shell Command Executor]
• v
• [System Shell]
Important Flows to Highlight
a) Authentication Flow:
• User ID verification against adminUsers array
• Token validation with Telegram Bot API
b) Command Execution Flow:
• Message receipt from Telegram
• Command parsing
• Shell execution
• Response handling
Technical Details
• Node.js runtime environment
• Telegram Bot API integration
• Configuration management (config.js)
• Security boundaries and access control
Implementation Notes
• Single responsibility (shell command execution)
• Simple configuration
• Limited user access
• Direct communication paths
Remember to:
• Security boundaries
• Clear data flow directions
• Critical components while avoiding unnecessary detail