Inspiration
Everyone has a shelf of skincare they think might be working. Results take weeks, mirrors are biased, and a bad night's sleep looks exactly like a bad serum. So people keep paying for duds, or give up on good products too early.
The hackathon brief described the moment I wanted to build for: standing in front of the mirror, deciding whether a product is working. I turned that question into a court case.
What it does
Product on Trial puts your skincare on trial, and your skin is the witness.
- File a case. Name the product and pick what it claims to do (hydrates, clears breakouts, boosts glow…). Each claim has a realistic time-to-results: hydration ~7 days, texture ~28, acne ~42. Nothing gets judged too early.
- Submit evidence. Take a selfie at the start and at each check-in. The YouCam Skin Analysis API scores 8 concerns (acne, redness, oiliness, pores, texture, moisture, radiance, fine lines), and YouCam's detection maps appear as "forensic photos".
- Witness statements. Log anything else that changed (bad sleep, stress, period, a new product, weather). These become objections that lower the court's confidence, so the product isn't blamed or credited unfairly.
- Hear the verdict:
- ✅ Acquitted: it's working, keep it on the shelf
- ⛓️ Guilty: it's irritating your skin, or it did nothing after a fair trial. Off to product jail
- ⏳ Case continued: not enough evidence yet, and the court sets your next hearing date
Every ruling lists the charges, the evidence and concrete next steps (e.g. "patch-test on your jawline", "add a ceramide moisturizer"). The docket tracks how much money you've stopped wasting on duds.
How I built it
- Next.js 16 + TypeScript + Tailwind CSS, deployed on Vercel.
- YouCam APIs: the File API (register, then a signed
PUTupload), then Skin Analysis V2.1 with 8 SD concerns in JSON format with mask overlays, polled with backoff. Engine errors such aserror_lighting_darkorerror_src_face_too_smallbecome friendly retake instructions. - A deterministic verdict engine, so verdicts are consistent and explainable. For each concern $c$, with baseline score $s_0$, the latest evidence averages the last two scans so one bad photo can't decide a case:
$$\Delta_c = \frac{s_{n-1} + s_n}{2} - s_0$$
Changes within a noise band of $|\Delta_c| < 5$ are ignored. A weekly trend (least-squares slope) checks that changes are consistent. Charges are raised from the evidence:
- Aggravated Irritation: redness or acne drops by 6+ points
- Breach of Promise: a claimed concern gets worse
- False Advertising: a claimed concern barely moves after its expected time
- Collateral Damage: an unclaimed concern gets worse
The court's confidence combines scan count, time on trial relative to what the claims need, and trend consistency, minus a penalty for recent confounders:
$$\text{confidence} = 0.4\,\min!\left(1, \tfrac{n-1}{4}\right) + 0.4\,\min!\left(1, \tfrac{t}{T_{\text{claims}}}\right) + 0.2\,\text{consistency} - 0.15\,[\text{confounders}]$$
- Rulings are written in a playful courtroom voice with concern-specific advice, but the numbers always decide the verdict.
- Privacy: cases and photo thumbnails stay in the browser. Photos are only sent to YouCam for scoring.
- A soft daily scan cap protects API units on the public deployment.
Challenges I ran into
- Noisy single scans. Lighting and angle move scores by a few points. Rather than trust any one number, I built in baselines, a noise band, averaging and a confidence score.
- Being honest with an AI. Generated text can drift from the data, so the verdict comes only from the scan numbers, and the text explains it.
- Side effects hide. A product can improve what it promises while quietly irritating your skin, so every scan checks all 8 concerns, not just the claimed ones.
- Demoing a multi-week trial in 3 minutes. I added a demo mode that fast-forwards the calendar while every scan stays real.
Accomplishments that I am proud of
- A verdict that catches a product that "works" but irritates your skin.
- Fully explainable rulings: every verdict cites its exact numbers.
- An experience playful enough that people want to check in: mugshot-style scans, rubber-stamp verdicts and product jail.
What I learned
How YouCam's skin scores behave across sessions, why baselines and realistic timelines matter more than any single scan, and that a clear verdict with next steps is far more useful than a dashboard of numbers.
What's next for Product on Trial
- Check-in reminders
- Head-to-head trials ("Serum A v. Serum B")
- Ingredient-aware advice when a product is convicted
- Shareable case files
- Routine-level trials that track several products at once
Built With
- nextjs
- node.js
- perfect-corp
- react
- skin-analysis
- tailwindcss
- typescript
- vercel
- youcam-api
Log in or sign up for Devpost to join the conversation.