
Ruchi Photo Booth — Stand Beside Your Star Player (AI)
Python · FastAPI · uvicorn · Google Gemini (gemini-3-pro-image-preview → gemini-2.5-flash-image) · React/Vite frontend
Problem
Fans at a World Cup activation wanted a believable photo standing next to their country's star player, both in the national jersey — generated on the spot from a single selfie.
Solution
Built a FastAPI backend where the /photobooth route posts a country + base64 image and gets back a generated composite plus the player's name. Gemini generates the whole scene — the fan next to the player in that stadium, both wearing the jersey — while keeping the fan's real face and identity (no face editing on our side). Country/player assets and jerseys are matched by country prefix with aliases; a branding overlay is composited on top. Model order favours gemini-3-pro-image-preview for the best jersey dressing and falls back to gemini-2.5-flash-image on overload.
Impact
A clean, secure FastAPI service: the Gemini key lives only server-side in backend/.env (never exposed to the browser), uploads and outputs are paired and git-ignored, and ALLOWED_ORIGINS is locked down for production. Delivers a shareable "me and my favourite player" moment that drives engagement at live events.
