Skip to content

Data & Sync

Creator data

Source of record: Airtable (app2aM3opg3qw7WVp, Creators table)

Pipeline:

  1. Airtable holds all creator fields — name, headshot, bio, platforms, followers, demographics, brand partnerships, rates, tags, etc.
  2. ca-data syncs from Airtable on a 2-hour cron and exposes a /creators endpoint
  3. The media kits app fetches from ca-data on every server-side page load — no static build-time snapshot

This means creator data is always current within ~2 hours of an Airtable change. It also means the app has a hard dependency on ca-data — if that service is down, creator pages return empty.

Sync helper

For adding a single new creator without waiting for the cron:

bash
ssh mini
cd /Users/ari/code/creator-media-kits-app
bash scripts/sync_one_creator.sh <airtable-record-id>

Headshot requirement

A creator must have a headshot in Airtable before they'll appear in the app. No headshot = skipped during sync. The headshot autofill script (on Studio) can backfill missing ones from platform profile photos.


Videos are stored in the videos table in the ca-data Neon database and served via GET /videos.

Sync sources:

  • YouTube channel search (via YouTube Data API) — top videos by view count
  • Monday.com video links for TikTok/Instagram creators

Platform logic (per creator):

Primary platformVideos shown
YouTubeTop 4 YouTube videos
TikTok or InstagramTop 2 native + top 2 YouTube
OtherTop 2 YouTube only

Current coverage: 268 videos across 94 creators

Known gaps: 5 creators are missing ytChannelId in Airtable — BetterWallet, Charan Invests, Financially Free Leigh, Seth Godwin, Tik Stocks. These can't get YouTube videos until the field is filled.

Re-sync a creator's videos:

POST ca-data.vercel.app/sync/featured-videos/:creator-slug

Brand logos

Brand logos on creator pages and the shareable roster are fetched at runtime via /api/brand-logo.

Lookup order:

  1. BRAND_DOMAINS override map (hardcoded for tricky brands)
  2. Clearbit logo API
  3. Google Favicons
  4. Falls back to no logo (no broken image shown)

Logo fetching is handled by the Mini webhook at https://aris-mac-mini.tail8a5b32.ts.net/fetch-logo — the Next.js API route proxies to it. If Mini is unreachable, logo fetches fail silently.


API routes

RoutePurpose
GET /api/brandsList all brands for the brand filter dropdown
GET /api/brand-logoFetch a brand's logo URL (proxies to Mini webhook)
POST /api/generate-pitchAI pitch generation for a selected creator lineup
GET /api/creator-ratesInternal rates for selected creators (agent view only)
POST /api/brand-contextFetch brand context from Fathom/email for the proposal builder
GET /api/competitive-contextCompetitive landscape context for pitch generation
GET /api/healthHealth check — returns 200 if the app is up

Vercel env vars

VarPurpose
CA_DATA_URLBase URL for ca-data API
CA_DATA_TOKENBearer token for ca-data requests
OPENAI_API_KEYUsed by pitch generation and AI features
RAPID_KEYRapidAPI key (used by ca-data for TikTok data)