## Inspiration
Shopping for jewellery and makeup in India is deeply personal — yet most apps treat every face the same. A wedding guest in Chennai and a festival-goer in Jaipur wear completely different palettes, and no generic "try this product" carousel accounts for that. We wanted to build the stylist that understands you — your skin tone, your occasion, your cultural context — before making a single recommendation.
## What we built
StyleMirror is an AI-powered personal stylist. You pick an occasion (Wedding, Festival, Office, Casual), upload a selfie, and within seconds you get:
- A skin analysis — undertone, skin type, radiance & moisture scores
- A virtual makeup try-on — skin-smoothing preview rendered on your actual face
- Curated jewellery & beauty picks — matched to your undertone and the occasion's colour palette
Everything is woven into one seamless flow, not three disconnected tools.
## How we built it
The frontend is a vanilla HTML/CSS/JS single-page app — five screens driven by a goTo() navigation
function, with a glassmorphism dark-gold design system. A Node.js/Express backend proxies all Perfect Corp
API calls so the API key never touches the browser.
The backend pipeline runs in parallel:
- Upload the selfie to Perfect Corp via the S2S File Upload API
- Fire Skin Analysis and Makeup VTO concurrently
- Poll both tasks until
task_status === "success" - Unzip the skin analysis result, parse
score_info.json, and return structured JSON to the frontend Product recommendations are occasion-aware: each of the four occasions carries its own colour palette and curated accessory set, cross-referenced with the skin undertone returned by the API.
## Challenges
Async polling across two APIs in parallel was the trickiest engineering problem. Both tasks are
fire-and-poll, and we needed both results before rendering — so we used Promise.all with individual
exponential-backoff pollers rather than a single polling loop.
Undocumented VTO effect catalog — effects like lip_color and blush require shape.name and
pattern values that aren't in the public docs. We reverse-engineered working configurations through
trial and error, and ultimately shipped with skin_smooth as the confirmed-working effect while logging
the others for a post-hackathon follow-up.
Designing for cultural diversity — generic Western beauty references don't map well to South Asian occasions. Building occasion-specific palettes (Vermillion + Marigold for Holi festivals, 22k gold tones for bridal) required research beyond the API docs.
## What we learned
Perfect Corp's S2S API is production-grade and fast — skin analysis + VTO in under 8 seconds end-to-end. The biggest unlock was treating the two APIs as a pipeline rather than sequential steps, which cut perceived wait time significantly.
Built With
- analysis
- css
- express.js
- html
- javascript
- makeup
- node.js
- s2s
- skin
- vto
Log in or sign up for Devpost to join the conversation.