Skip to content

Database Reference

The Brand Match App has no local database. All data lives in a shared Neon Postgres instance, accessed via the ca-data API backend. This page documents the key Neon tables that power the app.


Entity Relationship Diagram


matches

The central table powering all match views. One row per creator–brand pair.

FieldTypeNotes
idIntPrimary key
brandStringBrand name
creatorStringCreator name
agentStringAssigned agent name (annie, charlie, henry, or null for unassigned)
match_scoreFloatOverall match score 0–100
rateIntCreator's rate in dollars
cpmFloatCreator's CPM
avg_viewsIntCreator's average view count
subscribersIntSubscriber count
nichesStringComma-separated niche tags
platformStringPrimary content platform
statusStringPipeline status: not_pitched, reached_out, in_negotiation, won, not_a_fit
pitch_narrativeString?Pre-written pitch angle for this pair
pitch_angleString?Shorter pitch hook
notesString?Agent notes
us_pctFloatUS audience percentage
male_pctFloatMale audience percentage
brand_deals_totalIntNumber of past brand deals for this creator
niche_fitFloatSignal 2 component score
view_scoreFloatSignal 1 view fit score
audience_scoreFloatSignal 5 audience demo score
cpm_scoreFloatSignal 4 price/market fit score
score_versionString?Scorer version tag (e.g. v3)
scored_atDateTime?When this score was computed

Total rows: ~107,000+ (as of last full V3 rescore).

→ See Matching & Scoring


brand_intel

One row per brand. Contains CRM data, scoring context, deal history, and AI-enriched intelligence.

FieldTypeNotes
idIntPrimary key
nameStringBrand name (canonical form)
websiteString?Brand website from Close CRM
emailString?Primary contact email from Close
avg_cpmFloat?Weighted average CPM from matched creators
avg_rateFloat?Average deal rate from monday_deliverables
total_dealsInt?Total deal count from Monday
agentString?Assigned CA agent
last_activity_dateDate?Most recent deal date (from Monday, synced 6-hourly)
last_contacted_dateDateTime?Most recent outbound email timestamp (from Close, synced daily)
last_contact_agentString?Agent who sent the most recent email
last_contact_subjectString?Subject of the most recent email
last_contact_summaryString?AI-generated summary of the most recent email thread
profileJSON?Enriched brand profile: { creators, verticals, audience, content_themes, ideal_creator_archetype, platforms }
what_they_wantJSON?Simplified targeting profile
fathom_callsJSON?Array of past Fathom call objects with summaries
deal_historyJSON?Array of past deals with creator, value, close date
agenciesJSON?Other agencies this brand works with

Total rows: 2,786 brands (1,178 original + 1,608 from Close import).


creators

Creator profile data synced from Airtable. Used for match context and the creator detail page.

FieldTypeNotes
idIntPrimary key
nameStringCreator name (canonical, matches matches.creator)
slugStringURL slug for the creator detail page
platformStringPrimary platform (youtube, tiktok, etc.)
subscribersInt?Subscriber/follower count
avg_viewsInt?Average views per video
rateInt?Rate in dollars
cpmFloat?CPM value
nichesString?Niche tags
headshot_urlString?Airtable CDN URL for headshot
airtable_idString?Airtable record ID for this creator

Synced from Airtable on ca-data startup and every 2 hours via src/sync.js.


brand_emails

Latest email thread per brand, sourced from Close CRM. One row per brand (the most recent thread).

FieldTypeNotes
idIntPrimary key
brandStringBrand name
contact_emailsString[]Email addresses involved in the thread
thread_idStringGmail thread ID
thread_subjectStringEmail subject
thread_dateDateTimeDate of the most recent message
agentStringCA agent whose inbox the thread was found in
summaryString?AI-generated summary (gpt-4o-mini)

Synced by sync-close-contacts.js (daily, 4am UTC). Searches across 5 agent Gmail inboxes for threads matching each Close lead.


monday_deliverables

Deal records synced from Monday.com. Source of avg_rate, total_deals, and last_activity_date in brand_intel.

FieldTypeNotes
idIntPrimary key
deal_nameStringMonday item name (e.g. "Caleb Hammer YouTube Integration for SoFi")
creatorStringCreator name (parsed + normalized from deal name)
brandStringBrand name (parsed from deal name)
agentString?Agent column from Monday
creator_paymentInt?Deal value in dollars
statusString?Monday deal status
close_dateDate?Deal close date
created_atDateTimeRow creation time

Cancelled items are excluded from all rate/count aggregations.

Name normalization: Deal names are stripped of suffixes like (renewal), (extension), (upsell), (copy) before creator matching.


conflict_database

Active sponsor conflicts detected for roster creators. Used to show conflict warning badges on match cards.

FieldTypeNotes
idIntPrimary key
creatorStringCreator name
brandStringBrand the creator is actively sponsoring
detected_atDateTimeWhen the conflict was first detected
sourceString?Detection source (e.g. video transcript ID)

Populated by the separate sponsor detection pipeline. ~39 creators have active detections.