← Selected work
Case study / Applied AI & Media Pipeline

UGC Content Studio — AI Media Generation Pipeline

Automated media pipeline that combines product and model references into campaign images and short videos through Google AI and Cloudinary CDN.

Problem & context

Turn product and model reference uploads into an image, then an optional short video, while tracking the account's credits and project processing state.

My contribution

full-stack generation endpoints, account-scoped project records, media integrations, and the creation/result interface.

UGC Content Studio sample workspace showing reference inputs, saved output, and generation status
Captured from the app’s public sample workspace. Bundled fixtures demonstrate the interface; no real customer account or provider request.
Product evidence

Inspect the workflow.

Explore the sample workflow without creating an account. The application renders bundled fixtures through its public preview interface.

Open sample workspace

Read-only fixtures · no sign-in · no real generation or financial action

Failure path: The image provider throws or returns no usable image after credits have been deducted.

The catch path stores the error when a project exists, clears its generating flag, attempts a five-credit increment, captures the exception, and returns an error response. Compensation itself can fail; no database transaction spanning the provider call is claimed.

Authenticated app ↗

An engineering decision.

stored processing/error fields give subsequent project reads a concrete result to display, while explicit compensation handles caught provider errors. Separate mutations still require care around interrupted or concurrent requests.

Implemented approach

Persist project status and media URLs around the provider workflow, with compensating credit increments in caught failure paths.

Alternative & tradeoff

Keep generation state only in the browser and treat every provider request as an immediate result.

Follow the system.

Contract / Product/model references + prompt → generation request

Technical detail / Product and model references, prompt fields, and generation UI state

Authenticated generation requests with media storage and relational project state.

Recovery / stateCaught image-generation errors restore credits and persist project error state.

Verified behavior & limitations.

What the evidence establishes

  • Source review: image generation accepts reference uploads, deducts five credits, calls the image provider, and stores the generated Cloudinary URL.
  • Source review: video generation polls the provider operation until done, uploads its output, and updates project processing state.
  • Source review: caught image-generation failures record project error state and attempt to restore deducted credits.
  • Source review: project lookup combines the project identifier with the authenticated Clerk user identifier.

Boundaries & remaining work

  • These records establish source behavior. They do not establish a successful paid provider generation or production load test.
  • Credit checks, deduction, provider work, and compensation are separate operations. This is not evidence of atomic billing or universal rollback; some video early returns occur after deduction.
  • Video polling has no demonstrated bounded completion guarantee in this source snapshot.

Inspect the source.

References are pinned to the reviewed revision. Public sample screens demonstrate the interface with fixtures; source review and executed checks are labelled separately.

Ask Harsh’s AI

Explore Harsh’s work, with sources.

A useful place to start

What would you like
to know?

I can help you explore Harsh’s projects, experience, and skills. You can also paste a short job description to discuss the fit.