# Bloggers

The blogger tracking system monitors social media accounts (TikTok, Instagram, YouTube) and automatically fetches their latest videos on a schedule. Videos are saved to the database with statistics and linked to the blogger's profile.


# Key Concepts

  • A blogger is a social media account tracked by an organization
  • A tracked account is the link between a blogger and an organization (with per-org settings like daily_videos_count)
  • Initial fetch — when a blogger is first added, their recent videos are fetched immediately
  • Midnight + noon batch — all active tracked accounts get new videos fetched twice daily

# Two Workers

Worker Type Role
bloggers-worker HTTP + Scheduled API for managing bloggers; schedules batch fetches
blogger-video-consumer Queue Consumer Actually fetches videos from platform APIs and saves them

# Three Platforms

All platforms use a unified getUserVideosBatch() interface via apiServiceFactory:

Platform API Host
TikTok tiktok-api23.p.rapidapi.com
Instagram instagram-looter2.p.rapidapi.com
YouTube youtube-data-api-v33.p.rapidapi.com

# Section Contents

  • Architecture — Initial tracking + midnight/noon batch flows
  • Tags — Automatic tag propagation via DB triggers
  • Workers — bloggers-worker endpoints, blogger-video-consumer handlers
  • Queues — BLOGGER_VIDEO_QUEUE + HIGH_PRIORITY_QUEUE message shapes
  • API — All /blogger/* endpoints