Context
Personalised gifting sits between an e-commerce shop and a small factory. A customer uploads a photo taken on a phone, in bad light, at an odd angle — and that file eventually has to become something printable on a physical product. Every manual touch-up between those two points is a cost and a delay.
What makes it hard is the input. Customer photos are unpredictable in resolution, framing and quality, and the person who uploaded one has a very precise expectation of how their own face should look.
What we built
The workflow covers photo intake from the shop, AI image editing and verification, and a review queue before the result goes back to the order.
- Intake and validation — photos arrive from the shop through a token-protected API tied to the order, or over WhatsApp, and are checked (type, size, real image content) before anything expensive runs.
- Background removal — the subject is separated from its background so it can be placed on the chosen product template.
- Portrait editing — AI editing steps adjust the subject for the gift format in two passes (body first, then faces), with the original file preserved so any step can be re-run.
- Verification loop — every output is checked by a second model pass against the brief and regenerated automatically when it fails, so bad results are caught before a person sees them.
- Review and hand-back — results land in an approve/reject queue, and finished images are returned to the shop by polling or callback, so the order moves on without manual file exports.
Stack
A Next.js/TypeScript application with a SQLite database and local file storage, image models from two providers with automatic fallback and retries, and sharp for framing and post-processing. Generation runs asynchronously behind the API — the shop gets a job ID and a callback — and a job takes anywhere from a few seconds to a few minutes, so nothing on the shop side waits on a model.
Status
Private engagement. Detailed metrics and client references are available on request under NDA.