AI OPS.
An AI background replacement pipeline for product photos. It preserves the product, removes the studio and speeds up creative production.
Role
Architecture, fullstack, deployment
Year
2026
Stack
Next.js 16 · TypeScript · Supabase
20 sec
average generation
$0.02
per generation
100%
product preserved
3
languages
The task
Businesses need product creatives, but photo shoots are expensive and generic AI generators break logos, seams and textures. One bad image means a return and lost money.
The solution
The service uploads a product photo, accepts a scene description and replaces the background while preserving the product. The demo works in three languages, with limits and spam protection.
Architecture
An async pipeline: the API responds immediately, generation continues in the background, and the client polls for the result.
Browser
upload + prompt
Next.js API
route handlers
Supabase
queue + storage
fal.ai
generation
Telegram
lead notification
Key decisions
A queue without extra infrastructure
after() runs the pipeline after the API response. The user gets a runId immediately and generation never breaks the request.
Polling that survives a reload
The runId is stored in localStorage, so the client reconnects and keeps waiting for the result.
Atomic limits
2 generations per email and 3 per IP. Errors do not consume the limit, so the user can retry.
Three languages and production
en / ru / uk, Caddy + systemd, health checks and atomic deploys with rollback.
Before & after
Stack
Drag the handle to compare the original and the result.
Back home


