How ram333n/tg-bot-personal-assistant works
Proko is a Telegram personal-assistant bot. Users interact through stateful conversations: incoming updates are handled according to session state, then feature services produce replies or persist/schedule work. The README documents translation, QR generation, notes, reminders (manual and AI-assisted), and weather. The excerpts show service-to-repository scheduling and session persistence, but not the bot’s dispatch wiring or most feature handlers; those connections are therefore marked unverified where needed.
Main entry points: impl Conversation handlers · DefaultNotificationService.java Reminder scheduling · CustomTelegramLongPollingBot.java Long-polling bot · DefaultDispatcherHandler.java Request dispatcher
Components 18
Telegram conversations
- Long-polling bot
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/bot/CustomTelegramLongPollingBot.java - Request dispatcher
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/handler/impl/DefaultDispatcherHandler.java - Conversation handlers
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/handler/impl - Conversation state
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/session/service/impl/DefaultUserSessionService.java - Message sender
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/sender/impl/DefaultSenderService.java
Assistant features
- Notes management
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/notes/service/impl/DefaultNoteService.java - Reminder scheduling
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/notification/service/impl/DefaultNotificationService.java - AI assistance
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/ai/impl/DefaultAiService.java - QR generation
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/qr/impl/DefaultQrService.java - Weather forecast
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/weather/impl/DefaultWeatherService.java - Text translation
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/ai
Persistence and scheduling
- Session store
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/session/repository/UserSessionRepository.java - Notes store
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/notes/repository/NoteRepository.java - Reminder store
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/notification/repository/NotificationRepository.java
External integrations
- Telegram platform
- Job scheduler
- OpenWeatherMap
Other components
- Telegram user
Connections 19
- Telegram user → Telegram platform: sends updates
README.md - Telegram platform → Long-polling bot: delivers updates
- Long-polling bot → Request dispatcher: routes updates
- Request dispatcher → Conversation handlers: dispatches by state
- Conversation handlers → Conversation state: reads and updates
- Conversation state → Session store: reads and writes
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/session/service/impl/DefaultUserSessionService.java - Conversation handlers → Notes management: manages notes
- Notes management → Notes store: reads and writes
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/notes/service/impl/DefaultNoteService.java - Conversation handlers → Reminder scheduling: manages reminders
- Reminder scheduling → Reminder store: reads and writes
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/notification/service/impl/DefaultNotificationService.java - Reminder scheduling → Job scheduler: schedules jobs
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/notification/service/impl/DefaultNotificationService.java - Reminder scheduling → Message sender: sends due reminders
- Conversation handlers → AI assistance: requests suggestions
- AI assistance → Reminder scheduling: suggests reminders
- Conversation handlers → QR generation: requests QR image
- Conversation handlers → Weather forecast: requests forecast
- Weather forecast → OpenWeatherMap: fetches current weather
tg-bot-personal-assistant/src/main/java/com/prokopchuk/tgbotpersonalassistant/weather/impl/DefaultWeatherService.java - Conversation handlers → Text translation: requests translation
- Message sender → Telegram platform: sends replies