How arseglaz/competetive-search-bot works
Competitive Search Bot accepts Telegram text queries, searches Wikipedia, GitHub, and Stack Overflow concurrently, then returns a combined message that identifies unavailable sources when a provider fails. The graph captures configuration and polling setup, query handling and formatting, provider orchestration, source integrations, and result models. Relationships are based on the shown entry point and excerpts, plus README capability statements; unsampled handler registration and start/help behavior are not expanded beyond documented behavior.
Main entry points: search_service.py Concurrent search service · __main__.py Polling application · search.py Search handler · search_result.py Search result
Components 18
Runtime and configuration
- Settings
bot/config.py - Polling application
bot/__main__.py
Telegram interaction
- Search handler
bot/handlers/search.py - Start and help handlers
bot/handlers/start_help.py
Search orchestration
- Concurrent search service
bot/services/search_service.py
Search providers
- Wikipedia provider
bot/providers/wikipedia.py - GitHub provider
bot/providers/github.py - Stack Overflow provider
bot/providers/stackoverflow.py - Provider errors
bot/providers/errors.py
Result models and logging
- Search result
bot/models/search_result.py - Search response
bot/models/search_response.py - Request logging context
bot/request_logging.py - Logging configuration
bot/logging_config.py
Other components
- Telegram user
- Telegram API
- Wikipedia API
- GitHub API
- Stack Exchange API
Connections 33
- Telegram user → Telegram API: sends query
README.md - Telegram API → Polling application: delivers updates
README.md - Polling application → Settings: loads
bot/__main__.py - Polling application → Logging configuration: configures
bot/__main__.py - Polling application → Wikipedia provider: constructs
bot/__main__.py - Polling application → GitHub provider: constructs
bot/__main__.py - Polling application → Stack Overflow provider: constructs
bot/__main__.py - Polling application → Concurrent search service: constructs
bot/__main__.py - Polling application → Search handler: registers routers
bot/__main__.py - Search handler → Concurrent search service: searches query
bot/handlers/search.py - Search handler → Search result: formats results
bot/handlers/search.py - Search handler → Search response: formats response
bot/handlers/search.py - Search handler → Telegram API: sends reply
bot/handlers/search.py - Telegram API → Start and help handlers: routes commands
README.md - Concurrent search service → Wikipedia provider: dispatches search
bot/services/search_service.py - Concurrent search service → GitHub provider: dispatches search
bot/services/search_service.py - Concurrent search service → Stack Overflow provider: dispatches search
bot/services/search_service.py - Concurrent search service → Search result: aggregates results
bot/services/search_service.py - Concurrent search service → Search response: builds response
bot/services/search_service.py - Concurrent search service → Provider errors: handles failures
bot/services/search_service.py - Concurrent search service → Request logging context: sets context
bot/services/search_service.py - Search handler → Request logging context: sets context
bot/handlers/search.py - Wikipedia provider → Wikipedia API: requests search
bot/providers/wikipedia.py - GitHub provider → GitHub API: requests search
bot/providers/github.py - Stack Overflow provider → Stack Exchange API: requests search
bot/providers/stackoverflow.py - Wikipedia provider → Search result: maps results
bot/providers/wikipedia.py - GitHub provider → Search result: maps results
bot/providers/github.py - Stack Overflow provider → Search result: maps results
bot/providers/stackoverflow.py - Wikipedia provider → Provider errors: raises failures
bot/providers/wikipedia.py - GitHub provider → Provider errors: raises failures
bot/providers/github.py - Stack Overflow provider → Provider errors: raises failures
bot/providers/stackoverflow.py - Search response → Search result: contains results
bot/models/search_response.py - Logging configuration → Settings: reads log settings
bot/logging_config.py