How regcyb1/reddit_orchestrator works
This service schedules recurring subreddit monitoring jobs, fetches posts from an ingestion API, cleans and converts them, and stores posts plus scrape metadata in MongoDB. Operators can access the BlueBerry scheduler API/dashboard; task registration loads enabled subreddit configurations and schedules them. The sampled code supports the scheduled workflow and persistence operations, but does not show dashboard handlers for editing subreddit configurations. BlueBerry internals and the ingestion service are external to this repository.
Main entry points: subreddit_tasks.go Subreddit tasks · app.go App wiring · mongo_storage.go Mongo storage · ingestion_client.go Ingestion client
Components 12
Application runtime
- Server entry
cmd/server/main.go - Runtime config
internal/config/config.go - App wiring
internal/app/app.go
Task scheduling
- BlueBerry scheduler/API
internal/app/app.go - Subreddit tasks
internal/tasks/subreddit_tasks.go
Post ingestion
- Ingestion client
internal/client/ingestion_client.go - Ingestion API
- Post processor
internal/processor/processor.go - Domain models
internal/models/models.go
MongoDB persistence
- Mongo storage
internal/storage/mongo_storage.go - MongoDB
Other components
- Operator
Connections 18
- Server entry → App wiring: initializes
- App wiring → Runtime config: loads
- App wiring → Mongo storage: initializes
- App wiring → BlueBerry scheduler/API: starts API
- App wiring → Subreddit tasks: registers tasks
- App wiring → Ingestion client: creates
- App wiring → Post processor: creates
- Operator → BlueBerry scheduler/API: uses dashboard
- Subreddit tasks → Mongo storage: reads active configs
- Subreddit tasks → BlueBerry scheduler/API: registers schedules
- BlueBerry scheduler/API → Subreddit tasks: dispatches task
- Subreddit tasks → Mongo storage: reads scrape metadata
- Subreddit tasks → Ingestion client: fetches posts
- Ingestion client → Ingestion API: requests posts
- Subreddit tasks → Post processor: processes posts
- Subreddit tasks → Mongo storage: writes posts and metadata
- Mongo storage → MongoDB: reads and writes
- BlueBerry scheduler/API → MongoDB: uses scheduler store