Engineering portfolioAI product engineering
PRODUCTION ENGINEERING

Building a production Campaign Director for AI-generated campaigns

A complex AI campaign workflow converted into a progressive, production-oriented product experience while preserving the existing generation, billing, authentication, and persistence stack.

Role

  • Product architecture
  • Full-stack engineering
  • AI workflow design
  • Production integration
  • Verification

Category

AI Products

Engineering discipline

PRODUCTION ENGINEERING

Rollback commit:17a6b32
Implementation commit:cf3165d
Tests passed:41 / 41

Engineering objective

System challenge

Convert a complex campaign-direction concept into a production-oriented workflow integrated with the application’s real generation, billing, authentication, persistence, and campaign lineage systems.

Constraints

Working within real limits

  • Existing active production worktree — no parallel product stack
  • Existing generation, billing, authentication, portal, and Supabase boundaries must be preserved
  • Existing campaign-related changes had to be preserved exactly
  • Customer-facing identity controls required explicit privacy and safety boundaries
  • Campaign direction preview and activation needed to remain separate concerns

Approach

How it was built

  1. 01

    Audited the complete active worktree and read all campaign, generation, authentication, billing, portal, and Supabase boundaries

  2. 02

    Created a rollback snapshot before new implementation (commit 17a6b32)

  3. 03

    Built a Campaign Director domain module with Quick Campaign setup, three cast modes, per-model product and wardrobe assets, shared campaign assets, and mood + advanced direction controls

  4. 04

    Added four campaign directions with preview and activation flow

  5. 05

    Added campaign history and lineage tracking

  6. 06

    Persisted director state through the existing campaign API and Supabase schema

  7. 07

    Reused the existing generation and credit-deduction path without modification

Workflow

Implementation flow

Quick Campaign setup
Cast and asset selection
Optional Advanced Direction controls
Four campaign directions generated
Preview and review
Activate and lock direction
Continue campaign lineage

Technical validation

Implementation evidence

Observable engineering evidence. Discipline: PRODUCTION ENGINEERING

Rollback commit

17a6b32

Implementation commit

cf3165d

Tests passed

41 / 41

TypeScript

Passed

ESLint

Passed

Production build

Passed

State persistence

director_state via existing campaign system

Outcome

What was delivered

  • Campaign Director integrated into the existing application stack without replacing production boundaries

  • 41 tests passed, TypeScript passed, ESLint passed, production build passed

  • director_state persisted through the existing campaign system

Technologies

Stack and tools

ReactTypeScriptNext.jsSupabaseVitestAI generation APIsCampaign state managementPortal authenticationCredit-based billing

Next engineering system

AI SAAS RELIABILITY

Hardening AI SaaS Pipeline

Have an ambitious AI system to build?

Let’s build something serious.

I work across AI architecture, product engineering, private inference, automation, SaaS infrastructure, and production hardening.