Upload a garment photo, pick a model, get back an on-model catalog shot. Built for a small clothing brand as a credit-based web app with a job queue and swappable try-on providers.
The problem
The client runs a small clothing brand and sells through Instagram and a website. Every drop meant booking a model, picking a location, hoping the light held, editing, posting, and doing it again the next week. That is a lot of work for one person running the whole business. They had tried a few virtual try-on tools and none of them did what they needed.
What I built
The first version did one thing. Upload a garment, pick a model from a small set, get back a photorealistic shot ready to post. The brand started using it for product shots straight away.
Over the following weeks it became a proper web app:
- A studio wizard: garment upload, garment category, model, pose, background and quality.
- A catalog of about twenty preset models, owned by the backend so the frontend never hardcodes options.
- Job history, so past shots can be downloaded again.
- Sign-in, a credit balance, and credits that are charged per shot and refunded automatically if a job fails.
- An admin console for managing credits.
- A marketing site with before-and-after sliders for flat lays and garments, and a cost comparison against a studio shoot.
How it works
The FastAPI backend accepts the upload, stores it in S3-compatible storage, and puts a job on an ARQ queue backed by Redis. A worker strips the garment's background with rembg, then sends garment and model to the try-on provider.
Providers sit behind one interface. A dedicated virtual try-on API can be switched on by configuration, and an OpenRouter image model stays available for development and as a fallback. Timeouts and polling are set per provider, so a slow render fails cleanly and the credit goes back.
The Next.js frontend polls job status and serves catalog and model images through next/image as AVIF or WebP. Auth is Clerk, with users synced to MongoDB through a webhook. Everything runs in Docker Compose.
Outcome
The brand uses it to produce product shots without booking a shoot. The web app and landing site shipped, with credits and admin tooling in place for paying users.
Need something like this built? contact@akhilsingh.in