Skip to content
Back to portfolio
Medical ad creative generation and review pipelineMVP

AdGate

A creative pipeline that extracts brand DNA from a storefront URL, generates copy and artwork, and only emits code-rendered PNGs and a review package for what clears the medical ad-law gate.

AdGate | Medical ad creative generation and review pipeline

Overview

The expensive moment in ad production is not writing the copy. It is finishing the artwork and then failing review. AdGate is a pipeline that inverts that order.

Give it a storefront URL and it pulls out the brand's colors and tone, generates copy and creative angles, and then has to clear the medical ad-law gate before anything reaches the renderer. Only what passes comes out as PNGs and a review package.

The PNGs are rendered from code, not from an image model. The same input gives the same bytes, and a font missing from the license whitelist blocks the render outright. Anything submitted for review has to be explainable, and you cannot explain output from a pipeline that answers differently each run.

Every artifact carries per-stage PII evidence and a SHA-256. DEMO runs are flagged separately in the manifest so they can never be confused with LIVE output.

I am still holding production closed. Recall and precision sign-off on the wording verdict is outstanding, and the font licensing and ad-law pieces need a human's final approval. 328 passing tests and being ready to publish someone else's advertising are two different claims.

Core skills

Designing an ad-law gate as a stage inside a render pipeline
Deterministic rendering with a font-license whitelist
Fail-closed PII intake and output provenance recording

Implementation

  1. 1Split scrape, palette, color roles, angle engine, compliance gate, and render engine into eight modules with an orchestrator that fixes their order.
  2. 2Renders PNGs from code rather than an image model, so the same input yields the same bytes and an unlisted font blocks the render outright.
  3. 3Records per-stage PII evidence and a SHA-256 for every artifact, and flags DEMO output in the manifest so it can never be mistaken for LIVE.

Strengths

  • Puts the ad-law verdict ahead of human review, so wording that fails the gate never becomes a rendered creative.
  • 328 tests pin determinism, fail-closed PII, compliance, rendering, and orchestration separately.
  • Production is deliberately still gated: recall and precision sign-off plus human legal and license approval remain open.

Metrics

164
commits
328
tests
8
pipeline modules
3
output ratios

Tech stack

Node.jsPlaywrightsharpPostgreSQLn8nVitestClaude APIOllama

Screenshots

AdGate 1