Overview
Genie Helperβs post scheduler polls thescheduled_posts collection every 60 seconds and automatically publishes posts to X, Reddit, Instagram, TikTok, and other platforms using Stagehand browser automation.
Collection: scheduled_postsWorker: Media worker (BullMQ)
Poll interval: 60 seconds (configurable via
POST_SCHEDULER_MS)
Architecture
Scheduling Flow
Collections
scheduled_posts
platform_meta Examples
Post Scheduler
Implementation:media-worker/index.js:1186-1241
Polling Logic
Publishing Operation
Operation:publish_post (media-worker)Browser: Local Playwright (headless Chrome)
Vision LLM:
ollama/qwen-2.5
Supported Platforms
X (Twitter) Publishing
Implementation:media-worker/index.js:879-890
Reddit Publishing
Implementation:media-worker/index.js:893-920
Cookie Injection
The worker automatically loads cookies fromplatform_sessions to bypass login:
Content Calendar UI
Page:dashboard/src/pages/ContentCalendar/index.jsx
Features
-
AI Caption Generator (Modal 3A)
- Platform selector (TikTok, Instagram, X, Reddit, OnlyFans)
- Tone selector (flirty, playful, intimate, professional, casual, teasing)
- Topic input (optional)
- Length picker (short, medium, long)
- Try Again feedback loop with adjustment notes
-
Post Draft Editor (Modal 3B)
- Platform specs validation (text limits, video dimensions)
- Media attachment from scraped_media
- Platform-specific clip generator (9:16 for TikTok/Snapchat)
- Schedule time picker
- Usage pill (plan limits)
-
Media Picker (Modal 3C)
- Grid view of scraped_media
- Search filter
- Video duration + codec display
Plan Limits
Tracked in:usage API (/api/usage/increment)
Enforcement:
dashboard/src/pages/ContentCalendar/index.jsx:220-227
AI Caption Generation
Endpoint:/api/captions/generateModel:
dolphin-mistral:7b (uncensored content writer)
Request
Feedback Loop
After first generation, user can click βTry Againβ β Enters feedback note β Re-generates with adjustment:Status Flow
scheduled_posts.error_message
Common failures:
HITL_REQUIREDβ No cookies availableStagehand timeoutβ Page load failedAuto-posting to {platform} not yet implementedβ Platform stub
Logs & Debugging
Related
- Media Processing β Clip generation for platform specs
- Platform Scraping β Cookie capture flow
- Dashboard β Content Calendar UI
