AI Integration · 2026
A creator matching engine and AI brief generator for influencer campaigns, with a readable score breakdown for every match.
This is an influencer marketing toolkit built as a take-home technical assessment for an influencer marketing agency. A team can create campaigns, browse a creator roster, rank the creators that best fit a campaign and generate a personalized brief for a chosen creator. The seed dataset of 50 creators and 3 campaigns is loaded into Supabase with a CLI script. The aim is a ranking a marketer can read and defend, not a single unexplained number.
Matching is a pure TypeScript function that splits 100 points across six factors (niche 30, audience country 20, engagement 15, watch time 15, follower fit 10, hook type 10) and subtracts 5 points per brand-safety conflict, with ties broken by engagement rate and then followers. Briefs come from gpt-4o-mini in JSON mode and are checked with Zod; invalid output goes back to the model in a repair prompt, then falls back to gpt-4o before failing. Finished briefs are cached in Postgres under a SHA-256 hash of the inputs with a one-hour TTL.
Each ranked creator shows points for niche, audience country, engagement, watch time, follower fit and hook type out of 100. Any brand-safety penalty appears on its own line.
Equal totals are ordered by engagement rate and then follower count, so the same campaign always gives the same ranking.
Pick a campaign and a creator to get an outreach message of up to 3 sentences, 5 content ideas and 3 hook suggestions in the campaign's tone.
Creator risk flags are matched against the campaign's banned words. Each overlap removes 5 points and marks the creator card with a Risk badge.
A form for new campaigns with target country, gender and age range, niches, preferred hooks, follower range, minimum watch time, tone and banned words.
A searchable roster with a profile page per creator showing followers, engagement rate, average watch time, content style, niches and brand-safety flags.
A pure function using Jaccard overlap for niches, full or half points for audience country, a linear engagement scale from 1% to 10%, and linear drop-offs below the minimum watch time or outside the follower range. The total is floored at 0.
gpt-4o-mini runs in JSON mode; if Zod validation fails, the error text is sent back in a repair prompt, then a stricter prompt runs on gpt-4o before the request errors. Each stored brief records the model used and an error count.
Five tRPC routers (campaign, creator, match, brief, stats) with Zod schemas on both input and output, and all Supabase access kept inside repository modules. A verification script runs the scorer on the seeded data and prints the top 5 creators per campaign with breakdowns.
Supabase Postgres with campaigns, creators and ai_briefs tables. Filterable fields are plain columns, nested data (niches, audience, recent posts) is JSONB, and briefs are unique per campaign and creator, keyed by a SHA-256 prompt hash.
Have a project in mind or a question about my work? Email or LinkedIn is the best way to reach me.