Overview
Two primary collections manage creator media content:scraped_media for content with engagement metrics, and scheduled_posts for the publishing queue.
scraped_media
Stores creator content scraped from platform accounts, including engagement metrics, taxonomy classifications, and media metadata.Purpose
- Archive all scraped content from connected platforms
- Track engagement metrics (likes, comments, views, revenue)
- Store taxonomy classifications for content discovery
- Link media to creator profiles and platform sources
- Enable AI-powered content analysis and recommendations
Key Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Primary key |
creator_profile_id | Foreign Key | Links to creator_profiles |
platform | String | Source platform (“onlyfans”, “fansly”, etc.) |
platform_media_id | String | Platform’s unique identifier for this content |
media_type | String | image, video, gallery, text |
media_url | String | Original media URL or local storage path |
thumbnail_url | String | Thumbnail/preview image URL |
caption | Text | Original caption/description |
posted_at | DateTime | When content was posted on platform |
likes_count | Integer | Number of likes |
comments_count | Integer | Number of comments |
views_count | Integer | View count |
revenue | Decimal | Revenue generated (if available) |
taxonomy_tags | JSON | Array of taxonomy dimension assignments |
scraped_at | DateTime | When this was scraped |
created_at | DateTime | Record creation timestamp |
Taxonomy Integration
Media items are classified using the 6-concept taxonomy system:Example Queries
List Recent Media
Find Top Performing Content
Search by Taxonomy Tags
scheduled_posts
Post publishing queue polled every 60 seconds by the media worker.Purpose
- Queue posts for cross-platform publishing
- Schedule posts for specific dates/times
- Track publishing status and errors
- Support multi-platform simultaneous posting
Key Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Primary key |
creator_profile_id | Foreign Key | Links to creator_profiles |
media_id | Foreign Key | Optional link to scraped_media |
platforms | JSON | Array of platform targets ["onlyfans", "fansly"] |
caption | Text | Post caption/description |
media_urls | JSON | Array of media file URLs to publish |
scheduled_for | DateTime | When to publish (null = immediate) |
status | String | pending, processing, published, failed |
published_at | DateTime | Actual publish timestamp |
error_message | Text | Error details if status=failed |
retry_count | Integer | Number of publish attempts |
created_at | DateTime | Queue entry creation timestamp |
Polling Mechanism
The media worker (media-worker/index.js) polls this collection every 60 seconds:
Example Queries
Create Scheduled Post
List Pending Posts
Update Post Status
Related Collections
creator_profiles- Platform accounts that create/publish contentmedia_jobs- Background processing jobs for media operationstaxonomy_mapping- Tag classifications applied to media
Workflow Integration
Content Scraping → Storage Flow
- Media worker runs
scrape_profilejob - Stagehand extracts content from platform
- Records created in
scraped_mediawith engagement metrics - AI taxonomy classification applied (optional)
- Content available in Media Library dashboard
Post Publishing Flow
- User creates post via
/app/calendaror AI chat - Record created in
scheduled_postswith status=pending - Worker polls every 60s for posts where
scheduled_for <= NOW - Creates
media_jobsentry with typepublish_post - Stagehand browser automation publishes to target platforms
- Status updated to
publishedorfailedwith error details
Best Practices
- Use scheduled_for for timing - Set to current time for immediate publish, future time for scheduling
- Monitor retry_count - Posts failing 3+ times may need manual intervention
- Clean up old media - Archive or delete scraped_media after 90+ days to manage storage
- Batch taxonomy classification - Use
taxonomy-tagaction flow to classify multiple items - Handle platform differences - Some platforms may require platform-specific caption formats
See Also
- Creator Profiles - Platform account management
- Jobs Collections - Background job tracking
- Taxonomy Collections - Content classification system
