Progressive Web App (PWA)
Relevant source files
The following files were used as context for generating this wiki page:
The Progressive Web App (PWA) serves as the MiniApp control panel for the Telegram Summary Bot project. It provides a centralized interface for managing Telegram channels, groups, and members without requiring manual code execution or complex command-line interactions.
Sources: README.md:1-5, README.md:162-166
Overview and Core Capabilities
The PWA functions as a "TelePilot" dashboard that integrates with the Python-based Telegram bot. It enables users to perform administrative tasks, view analytics, and configure bot behavior through a mobile-friendly web interface.
Key Features
| Feature | Description |
|---|---|
| Installation | Installs on any device like a native application. |
| Offline Support | Provides functionality even without an active internet connection. |
| Home Screen | Supports shortcuts for quick access from device home screens. |
| Zero Dependencies | Operates without Node.js, Composer, or external frameworks. |
Sources: README.md:163-171, README.md:175-179
System Architecture
The PWA acts as the front-end management layer for the underlying bot logic. While the bot handles real-time message processing and summarization via bot.py, the PWA manages the broader ecosystem including member segments, broadcasting, and moderation rules.
The diagram above shows the relationship between the administrative PWA interface, the shared database, and the active Telegram bot service.
Sources: README.md:85-110, README.md:177, bot.py:38-51
Functional Modules
Management and Moderation
The PWA provides granular control over Telegram entities through several dedicated modules:
- Channel & Group Management: Organizes unlimited channels into custom categories with per-channel settings.
- Moderation Suite: Configures prohibited word filters, auto-moderation rules, and CAPTCHA verification for new members.
- Member Management: Facilitates advanced searching, filtering, and bulk operations on chat participants.
Sources: README.md:87-100, README.md:126-130
Content and Communication
Administrative users utilize the PWA to automate and scale content delivery:
- Smart Broadcasting: Segments audiences into categories like VIP, Premium, or Active for targeted messaging.
- Scheduled Posts: Manages post timing with retry logic and engagement tracking.
- Auto Messages: Configures welcome, goodbye, and seasonal greetings using dynamic placeholders.
Sources: README.md:104-123
AI Integration
The PWA leverages AI models (Gemini and ChatGPT) to provide insights into channel activity. It generates chat summaries and allows users to query channel history for specific information.
The sequence diagram illustrates the flow of a chat summarization request initiated through the PWA dashboard.
Sources: README.md:144-147
Technical Requirements
The PWA is designed for high compatibility and minimal overhead. It runs on standard shared hosting environments.
- Runtime: PHP 7.4+
- Database: MySQL
- Environment: Works on cPanel, Hostinger, Plesk, and similar platforms.
- Security: Includes built-in protections for CSRF, XSS, and SQL injection.
Sources: README.md:155-157, README.md:175-179
Conclusion
The Progressive Web App (PWA) transforms the Telegram Summary Bot from a simple script into a comprehensive management platform. By providing a native-like experience with offline capabilities and centralized control, it allows administrators to manage large-scale Telegram operations efficiently.