Inspiration

Skincare is sold on claims like "reduces redness in 4 weeks", and most of us judge them by memory and the bathroom mirror. Lighting, sleep, weather and routine changes make it almost impossible to tell whether a product did anything. We wanted the honest version of a skin app: one that runs a small, fair experiment on you, and says "not enough data" when that is the truth.

What it does

Receipts turns "is this product working?" into a pre-registered n=1 trial.

  1. Design. Enter a product and its claim. A Protocol Agent (Claude, tool use) looks up what YouCam can measure, picks the matching skin concern, estimates the YouCam unit cost, and chooses a design: a split-face trial (product on one side, the other side as a control, side randomized by the server) or a baseline then treatment period. It sets the smallest change worth caring about and checks its own draft against the design rules.
  2. Lock. You lock the protocol before day one. The metric, threshold and analysis are hashed, so the goalposts can't move later.
  3. Measure. Each check-in runs in-browser face detection and quality checks (framing, resolution, pose, brightness, left/right lighting evenness, focus, consistency) before any upload, so bad photos never spend API units. The cropped photo is encrypted at rest and sent only to YouCam.
  4. Verdict. A Verdict Agent explains a locked statistical analysis: the estimated change, an approximate 95% interval, missing data, and how many more days are needed. It cannot pick a different metric or override the computed label; answers that disagree with the math or overclaim are rejected.
  5. Receipt. A shareable one-screen receipt (protocol, chart, verdict) exports as PNG and never includes the selfie.

How we built it

  • YouCam AI Skin Analysis (v2.1) through a typed client: POST /s2s/v2.0/file for a pre-signed upload, PUT the bytes, POST /s2s/v2.1/task/skin-analysis with up to four concerns, format: "json" and raw per-concern masks, then poll GET .../skin-analysis/{task_id} with backoff. Retries respect rate limits, task creation is never retried on 5xx (to avoid double charges), and every task goes through a unit ledger with a budget guard (SD, 1–4 concerns = 9 units). We exercised the real upload, task, polling, JSON scores and PNG masks with one consented live analysis; a stateless mock transport reproduces the same wire format for development and the public demo.
  • Split-face measurement: YouCam's scores are whole-face, so for split-face trials we sample YouCam's detection-mask intensity in two approximate cheek patches, split at the midline from the in-browser face detector. One API call per day is enough.
  • Statistics: an AR(1)-sieve bootstrap with a Student-t interval, because daily skin readings are autocorrelated. A fixed decision rule is applied at the locked endpoint, and interim estimates are labeled exploratory.
  • Stack: Next.js (App Router) + TypeScript + Tailwind, Prisma (SQLite locally, Postgres on Render), MediaPipe BlazeFace served from our own origin, Anthropic Claude for the two agents (deterministic mock agents when no key is set), Vitest + Playwright.

Challenges we ran into

  • Honest uncertainty. Our first bootstrap looked fine but, in simulation, its "95%" intervals covered the true effect only about 79% of the time on short autocorrelated series. We replaced it and now test calibration in the unit suite.
  • Split-face from whole-face scores. Per-side numbers had to come from masks, which is why we call that measure an experimental proxy.
  • Agents that can't overclaim. The model writes the explanation, but the label comes from code, and submissions that contradict it are bounced back.

Accomplishments that we're proud of

A complete product loop (design, lock, capture, verdict, receipt) that will say "not enough data", a real YouCam integration with cost controls, a public demo that never receives personal photos or API keys, and tests covering the stats, the YouCam client, the agent guardrails and the end-to-end flow.

What we learned

Statistics need tests too, pre-registration is a product feature, and the most useful thing an AI skin app can say is sometimes "not yet".

What's next

Validate the cheek-patch proxy across skin tones, facial hair and lighting; add real accounts; and partner with brands to run transparent, consented product trials.

Honest limitations

This is a research prototype, not medical advice. Split-face measurements are mask intensity in approximate cheek patches, not clinically validated measurements. Performance across faces, skin tones, lighting and products is unvalidated, intervals are approximate, and the demo data shown is synthetic.

Try it

Built With

Share this project:

Updates

Submission history