How nappa85/pokifications works
Main Components
a) Webhook Receiver Layer
• Entry point for incoming webhooks from PokéSpawn
b) Core Processing Components
• Bot module (central component based on the file structure)
• Alert system (from alerts.rs)
• Configuration management (from config.rs)
• Database interface (from db.rs)
c) Output Layer
• Telegram integration (from telegram.rs)
• Notification dispatch system
Component Relationships
[WebHook Input] → [Configuration Manager]
• ↘ [Bot Core] ← [File Cache]
• ← [Map System]
• ← [Message Handler]
• [Database] ↗
[Alert Manager] ← [Bot Core] → [Telegram API]
Specific Elements
a) Input Processing:
• Webhook endpoint (entry point)
• Configuration validation (pokifications.toml)
• Request parsing and validation
b) Core Processing:
• Bot module components:
• File caching system (file_cache.rs)
• Handling (map.rs)
• Message processing (message.rs)
• Selection logic (select_all.rs)
• Database operations (db.rs)
• Management (lists.rs)
c) Output Handling:
• Alert generation system
• Telegram message formatting and delivery
• Cleanup procedures (cleanup.rs)
Technical Details to Highlight
• Rust-specific concurrent processing
• WebHook handling mechanism
• Database interactions
• Telegram API integration points
• Configuration management flow
┌─────────────────────────────────────────┐
• External Layer │
• ┘
• ↓ ↑
┌─────────────────────────────────────────┐
• Processing Layer │
• [Bot Core] ←→ [Alert Manager] │
• ↕ ↕ │
• [Database] ←→ [Cache System] │
• ┘
• ↓ ↑
┌─────────────────────────────────────────┐
• Output Layer │
• ┘