Overview
Thecreator_profiles collection stores platform account configurations, encrypted credentials, and scraping status for connected creator accounts. Each profile represents a connection to a creator platform (OnlyFans, Fansly, etc.).
Purpose
- Store encrypted platform credentials using AES-256-GCM server-side encryption
- Track scraping status and last successful sync timestamps
- Manage platform-specific configuration and authentication state
- Link platform accounts to user personas for multi-platform management
Key Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Primary key |
user_id | Foreign Key | Links to directus_users |
platform | String | Platform identifier (e.g., “onlyfans”, “fansly”) |
username | String | Platform username/handle |
credentials | JSON | Encrypted credentials object (AES-256-GCM) |
scrape_status | String | Current status: idle, scraping, success, error |
last_scraped_at | DateTime | Timestamp of last successful scrape |
is_active | Boolean | Whether this profile is actively monitored |
created_at | DateTime | Profile creation timestamp |
updated_at | DateTime | Last modification timestamp |
Credential Encryption
Credentials are encrypted using server-side AES-256-GCM encryption before storage:- All encryption happens server-side only
- Encryption key stored in
CREDENTIALS_ENC_KEY_B64environment variable - No encryption keys are ever sent to the browser
- See
server/utils/credentialsCrypto.jsfor implementation details
Example Queries
List All Creator Profiles
Get Single Profile
Update Scrape Status
Search Profiles by Platform
Related Collections
platform_sessions- Encrypted browser cookies from extension for authenticationmedia_jobs- Scraping jobs triggered for this profilescraped_media- Content scraped from this profilehitl_sessions- Human-in-the-loop login requests when scraping requires manual intervention
Workflow Integration
Profile Scraping Flow
- User connects platform via
/app/platforms - System checks for existing cookies in
platform_sessions - If cookies exist: Create
media_jobsentry with typescrape_profile - If no cookies: Create
hitl_sessionsentry and show yellow dashboard alert - Media worker processes job using Stagehand browser automation
- Results stored in
scraped_media, profile’sscrape_statusupdated
Credential Management
All credential encryption/decryption happens server-side:- Encryption endpoint:
POST /api/credentials/encrypt - Decryption endpoint:
POST /api/credentials/decrypt - Implementation:
server/utils/credentialsCrypto.js - Format: Legacy string support + new object format
{enc: "v1:..."}
Best Practices
- Never decrypt credentials in browser - All encryption operations are server-side only
- Check
platform_sessionsbefore scraping - Avoids unnecessary HITL requests - Monitor
scrape_status- Poll for job completion rather than blocking - Respect rate limits - Use
last_scraped_atto prevent over-scraping - Validate platform field - Ensure platform is in supported list before creating profile
See Also
- Media Collections - Scraped content and scheduled posts
- Jobs Collections - Background job tracking
- Directus MCP Tools - Full tool reference
