Appearance
Data & Integrations
How the Brand Match App connects to external systems, what it reads and writes, and how data flows through the pipeline.
ca-data Backend
The Brand Match App has no direct database connection. All data is fetched from ca-data (https://ca-data.vercel.app), an internal Next.js API layer that reads from Neon Postgres. The app uses a server-side caDataFetch() helper for all API routes and Server Components.
Authentication: All ca-data requests include a Bearer token from the CA_DATA_TOKEN environment variable.
Caching: All ca-data calls use cache: 'no-store' — data is always fresh.
ca-data Endpoints Used
| Endpoint | What the App Uses It For |
|---|---|
GET /matches | All match data, filterable by agent/brand/creator/status/score |
GET /match-stats | Aggregate stats for home dashboard cards |
PATCH /matches/:id | Update pipeline status and notes on a match |
GET /brand-intel | Brand intelligence for a specific brand |
GET /brand-intel/available | Unclaimed brands list with last-contact data |
GET /brand-intel/list | Brand list for dropdowns/search |
GET /profiles | Creator profiles (rate, CPM, views, niches, platform) |
GET /cross-sell | Cross-sell recommendations |
GET /contracts | Contract lifecycle data |
GET /conflicts | Creator conflict detections |
GET /brand-emails/:brand | Latest email thread + AI summary for a brand |
GET /fathom/:brand | Fathom call history for a brand |
GET /non-roster/:brand | Non-roster creators sponsored by a brand |
POST /claim | Assign an unclaimed brand to an agent |
Monday.com
Monday.com is the source of truth for deal data and deliverable history. The app reads from Monday indirectly through ca-data, which syncs Monday data to Neon on a schedule.
What comes from Monday:
total_dealsper brand — COUNT of rows inmonday_deliverablesavg_rateper brand — AVG ofcreator_paymentinmonday_deliverableslast_activity_date— most recent deal date per brand (synced every 6h bysync-brand-activity.js)- Open deal pipeline on the Creator Dashboard
Deal name normalization: Deal names have renewal/extension/upsell/copy suffixes stripped (e.g. "SoFi Deal (renewal copy)" → "SoFi Deal") before matching to creator names or computing stats.
Close CRM
Close has replaced Copper as the primary CRM. Close contact and lead data is synced daily to the brand_intel Neon table.
Sync script: sync-close-contacts.js (cron: daily 4am UTC)
What syncs per brand:
last_contacted_date— most recent outbound email timestamplast_contact_agent— the CA agent who sent itlast_contact_subject— email subject linelast_contact_summary— AI summary via gpt-4o-mini
Brand intel size: 2,786 brands in brand_intel, including 1,608 imported from Close leads.
API: Close REST API, key at .secrets/close_api_key.txt. Values are in cents (e.g. 4750000 = $47,500).
Airtable (Creators DB)
Creator headshots, niche tags, and contact info come from the Airtable Creators Database. The app reads this data via ca-data's creator sync, which pulls from Airtable on startup and every 2 hours.
Headshot images are served directly from Airtable's CDN via the URL stored in the creator's record. The app shows a placeholder if the headshot fails to load.
Fathom (Call Recordings)
Past sales calls with brands are surfaced on brand detail pages. Data comes from Fathom via per-agent API keys:
| Agent | Key file |
|---|---|
| Annie | fathom_annie_key.txt |
| Charlie | fathom_charlie_key.txt |
| Henry | fathom_henry_key.txt |
ca-data syncs Fathom calls on demand via GET /api/fathom-brand. Summaries are stored in the brand_intel table's fathom_calls column.
Sponsor Detection Pipeline
The conflict_database is populated by a separate sponsor detection pipeline that monitors YouTube channel transcripts for brand mentions. Results are stored in Neon and served via GET /api/conflicts. If a creator in a match is actively working with the brand being pitched (or a direct competitor), a conflict warning badge appears in the UI.
OpenAI
Two features use OpenAI:
| Feature | Model | Trigger |
|---|---|---|
| Pitch email generation | gpt-4o | Agent clicks Pitch button — POST /api/generate-pitch |
| Brand email summary | gpt-4o-mini | sync-close-contacts.js — run nightly |
The OPENAI_API_KEY env var must be set in the Vercel project for pitch generation to work.
Brand DB (36K+ brands)
A separate dataset of 36,762 known brands (grown from 33,380 by a nightly merge cron at 3am CT). This is used for the category-gaps and agent-blind-spots features — it contains brands that sponsor in our creators' niches but are not CA clients. Separate from the 2,786-brand brand_intel table.
Env Vars
| Variable | What |
|---|---|
CA_DATA_URL | https://ca-data.vercel.app |
CA_DATA_TOKEN | Bearer token for ca-data API |
OPENAI_API_KEY | For pitch generation |