All case studies

Case study · Premier Courses

An automated AI pipeline that replaced a full content team — and then kept going

Industry
Real Estate Licensing Education
Platform
premiercourses.co (Shopify)
Markets
California & Florida
Visit premiercourses.co
0

manual steps from trigger to published post

2 + 6

SEO articles & images auto-produced per run

~65%

faster image generation via parallelization

3

channels auto-published: blog, LinkedIn, Pinterest

Overview

Premier Courses is a real estate licensing education platform serving students in California and Florida. Like most online education businesses, staying visible in search required a steady stream of authoritative, state-specific content — but producing it manually was expensive, slow, and inconsistent. We designed and deployed a fully automated, end-to-end AI content pipeline: two interlocking engines that work together without human intervention, from idea to published post across every channel.

The challenge

Real estate licensing content is highly regulated and jurisdiction-specific — a California DRE article can't be reused for Florida without significant rewriting, and every piece must cite the right regulatory body and reflect current law. Three compounding problems made manual content at scale impossible:

  • Volume: Two states, multiple topic clusters, and a weekly cadence demanded more output than a small team could sustain.

  • Consistency: Human writers required briefing, revision cycles, and approval workflows — and quality still varied.

  • Distribution: Each article needed a matching social package — LinkedIn captions, Pinterest graphics in multiple formats, UTM-tagged links — adding hours to every publish cycle.

  • Activation: On the student side: once someone enrolled, manual email sequences weren't enough to keep them engaged, completing, and referring.

Engine 1 — The Content Engine

A scheduled, multi-step pipeline orchestrated across Vercel cron jobs, Next.js API routes, and Supabase. It runs the complete lifecycle of a piece of content in five stages:

  • Content audit & topic research: Audits existing blog content, identifies coverage gaps against CA DRE and FL licensing topic clusters, and selects the next topic per state. All citations trace back to official regulatory sources.

  • Article generation (Claude): Anthropic's Claude writes a full SEO-optimized article using a structured prompt system that enforces state specificity, correct regulatory citations, and brand voice — generating all social captions in the same run.

  • Image generation (GPT-image-2): Three image variants are generated in parallel — 1:1 square (LinkedIn), 9:16 vertical (Pinterest), 16:9 landscape (blog header) — each with a state label and stored in Supabase Storage.

  • Shopify publishing: The finished article — body copy, SEO meta, and header image — is posted as a draft to the correct Shopify blog (California or Florida) via the Admin API.

  • Social distribution: A Supabase row insert fires database triggers and Edge Functions that auto-post to LinkedIn (API v2) and Pinterest (API v5), routing each pin to the correct board with full OAuth 2.0 token management and auto-refresh.

Engine 2 — The Customer Activation Engine

Running on a separate cadence, the Activation Engine targets enrolled students. Claude generates motivational, state-specific concepts grounded in real licensing milestones; GPT-image-2 produces matching creative; and a status workflow (generated → approved → posted) in Supabase provides a quality-control gate before anything auto-publishes to LinkedIn and Pinterest.

Key engineering decisions

  • Parallel image generation: All three aspect ratios are generated concurrently with Promise.all(), cutting image generation time by ~65% versus sequential calls.

  • Database-driven publishing: Social posting is triggered by Supabase PostgreSQL triggers, not the pipeline — so any row insert (pipeline, manual, or backfill) automatically triggers distribution.

  • Hands-off OAuth: LinkedIn tokens auto-refresh when within 7 days of expiry; a dedicated callback route manages Pinterest's authorization exchange — zero manual intervention.

What this means in practice

Before these engines existed, a single week of content — two articles, six images, LinkedIn posts, and Pinterest pins — required coordinating writers, designers, and a social media manager. Today the entire process runs end-to-end without a human in the loop. The team simply reviews drafts in Shopify; everything else runs itself. Adding a new state is a configuration change, not a rebuild.

The stack

Anthropic Claude (Opus, Sonnet)OpenAI GPT-image-2Next.js 14 (App Router)Vercel (Cron + Edge)Shopify Storefront & Admin APISupabase (PostgreSQL + Storage + Edge Functions)LinkedIn API v2Pinterest API v5GitHub ActionsOAuth 2.0TypeScriptDeno

Want an engine like this for your team?

We build the same kind of automation for agents and brokerages. Let's find your first one.

Schedule a Discovery Call