How sickmz/microw works
Main Components
a) Client Layer:
• Telegram Bot Interface
• User Interaction Components (Commands: Add, Delete, Charts, List, Budget, Settings)
b) Application Core:
• Main Bot Service (src/main.py)
• Handler System (src/handlers.py)
• Configuration Management (src/config.py)
• Synchronization Service (src/sync.py)
c) Storage Layer:
• Local Storage (.xlsx file)
• Google Sheets Integration (optional sync)
d) Utility Services:
• Charts Generation (src/charts.py)
• Utility Functions (src/utils.py)
┌─────────────────────────────────────────────────────────────┐
• Telegram Platform │
• ┘
• ↕️
┌─────────────────────────────────────────────────────────────┐
• Bot Interface Layer │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
• Add │ │ Delete │ │ Charts │ │ Budget │ │
• ┘ └─────────┘ └─────────┘ └─────────┘ │
• ┘
• ↕️
┌─────────────────────────────────────────────────────────────┐
• Core Application Layer │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
• Handlers│ │ Sync │ │ Charts │ │ Config │ │
• ┘ └─────────┘ └─────────┘ └─────────┘ │
• ┘
• ↙️ ↘️
┌────────────────────┐ ┌─────────────────┐
• Local Storage │ ← − − − − − − − → │ Google Sheets │
• (.xlsx file) │ Sync │ (Optional) │
• ┘ └─────────────────┘
Important Relationships to Highlight
a) Data Flow:
• User interactions through Telegram → Bot Interface
• Command handling through Handlers
• Storage operations (Local → Google Sheets sync)
• Chart generation flow
b) Key Integration Points:
• Telegram Bot API connection
• Google Sheets API integration
• Local file system interaction
Technical Details
• Python-based implementation
• Docker container boundary
• Environment configuration dependencies
• Service account authentication for Google Sheets
State Management
Remember to:
• Keep components modular and clearly separated
• Both synchronous and asynchronous operations
• Optional components (like Google Sheets sync)
• Error handling paths
• Security boundaries