UGC Content Studio — AI Media Generation Pipeline
The problem & product
Marketing teams need rapid product and model variations without repeated manual shoots. Engineered an end-to-end media workflow coordinating Clerk-authenticated uploads, Google AI image/video synthesis, Cloudinary CDN delivery, and PostgreSQL project and credit records.
Architecture & engineering decisions
- Bound project queries to Clerk user identity through Prisma ownership predicates, keeping account and generation records related in PostgreSQL.
- Coordinated Google AI generation, provider-operation polling, and Cloudinary uploads with persisted isGenerating, output URL, and error fields.
- Used Prisma credit increment/decrement operations and failure-path restoration for caught generation errors, preserving project error state for the interface.
Persisted generated image/video URLs and project error state in PostgreSQL, with Prisma credit updates and restoration paths for caught generation failures.



