How otb2124/workgreg works
WorkGreg is a Telegram-based vacancy watcher: users configure keyword profiles, filters, and job-board sources; scheduled or manual checks fetch vacancies, persist them, filter per profile, and deliver new matches. The bot uses a client abstraction to reach the core through the HTTP API (or in-process); the core also owns profile and settings operations, polling, and retention. Fetcher details and some runtime wiring are not shown, so uncertain links are omitted or marked dashed.
Main entry points: AppDb.cs Application database · ApiEndpoints.cs API endpoints · SourceSyncService.cs Source sync · DeliveryService.cs Delivery service
Components 22
Telegram bot
- Update dispatcher
src/WorkGreg.Bot/Telegram/UpdateDispatcher.cs - Commands and menus
src/WorkGreg.Bot/Telegram/Commands - Bot service
src/WorkGreg.Bot/Telegram/BotService.cs
Client and API
- Client contract
src/WorkGreg.Contracts/IWorkGregClient.cs - HTTP client
src/WorkGreg.Bot/Client/HttpWorkGregClient.cs - API endpoints
src/WorkGreg.Host/Api/ApiEndpoints.cs
Profile management
- Profile service
src/WorkGreg.Core/Services/ProfileService.cs - Source service
src/WorkGreg.Core/Services/SourceService.cs - Settings service
src/WorkGreg.Core/Services/SettingsService.cs - Source catalog
src/WorkGreg.Core/Domain/SourceCatalog.cs
Vacancy polling
- Poll runner
src/WorkGreg.Core/Services/PollRunner.cs - Source sync
src/WorkGreg.Core/Services/SourceSyncService.cs - Fetch pipeline
src/WorkGreg.Core/Fetching/FetchPipeline.cs - Feed and API fetchers
src/WorkGreg.Core/Fetching - Profile filtering
src/WorkGreg.Core/Filtering/ProfileCriteria.cs
Persistence and delivery
- Application database
src/WorkGreg.Core/Data/AppDb.cs - Delivery service
src/WorkGreg.Core/Services/DeliveryService.cs - Telegram notifier
src/WorkGreg.Core/Services/INotifier.cs - Job retention
src/WorkGreg.Core/Services/RetentionService.cs
Other components
- Telegram user
- Job boards
- Telegram
Connections 25
- Telegram user → Update dispatcher: sends updates
README.md - Update dispatcher → Commands and menus: dispatches to
src/WorkGreg.Bot/Telegram/UpdateDispatcher.cs - Commands and menus → Client contract: requests core operations
- HTTP client → Client contract: implements
src/WorkGreg.Bot/Client/HttpWorkGregClient.cs - HTTP client → API endpoints: calls over HTTP
- API endpoints → Profile service: routes profile operations
src/WorkGreg.Host/Api/ApiEndpoints.cs - API endpoints → Source service: routes source operations
src/WorkGreg.Host/Api/ApiEndpoints.cs - API endpoints → Settings service: routes settings operations
src/WorkGreg.Host/Api/ApiEndpoints.cs - Profile service → Application database: reads and writes
src/WorkGreg.Core/Services/ProfileService.cs - Source service → Source catalog: validates provider
src/WorkGreg.Core/Services/SourceService.cs - Source service → Application database: reads and writes
src/WorkGreg.Core/Services/SourceService.cs - Settings service → Application database: reads and writes
src/WorkGreg.Core/Services/SettingsService.cs - Poll runner → Source sync: syncs sources
src/WorkGreg.Core/Services/PollRunner.cs - Source sync → Fetch pipeline: requests fetch results
src/WorkGreg.Core/Services/SourceSyncService.cs - Fetch pipeline → Feed and API fetchers: dispatches fetch
src/WorkGreg.Core/Fetching/FetchPipeline.cs - Job boards → Feed and API fetchers: provides vacancies
- Source sync → Application database: stores jobs
src/WorkGreg.Core/Services/SourceSyncService.cs - Source sync → Profile filtering: applies profile criteria
src/WorkGreg.Core/Services/SourceSyncService.cs - Poll runner → Delivery service: delivers matches
src/WorkGreg.Core/Services/PollRunner.cs - Delivery service → Profile filtering: evaluates criteria
src/WorkGreg.Core/Services/DeliveryService.cs - Delivery service → Application database: reads and updates
src/WorkGreg.Core/Services/DeliveryService.cs - Delivery service → Telegram notifier: sends messages
src/WorkGreg.Core/Services/DeliveryService.cs - Telegram notifier → Telegram: sends vacancy messages
src/WorkGreg.Core/Services/INotifier.cs - Job retention → Application database: deletes expired jobs
src/WorkGreg.Core/Services/RetentionService.cs - Bot service → Update dispatcher: processes updates
src/WorkGreg.Bot/Telegram/BotService.cs