AI Sizing Assistant
An AI-assisted sizing product that tells shoppers what size to buy in any brand, from clothes they already own.

The product is a consumer web application built around a simple inversion: instead of asking shoppers to measure their chest, waist, and hips, it builds a private fit profile from anchors, garments the user already owns and loves, and translates that profile into a size recommendation for any brand in its curated database.
We delivered the complete product across two repositories: the user application with its marketing site, onboarding, sizing engine, AI integrations, and billing; and a standalone admin panel for catalog management, bulk imports, pricing, and moderation, both sharing one Supabase database.
The project began as an interactive design demo built around body measurements and was rebuilt as a real product around the anchor model, with the migration mapped in a requirements document preserved in the repository.
Sizes are not standardized, and measurement tools get skipped
A Medium in one brand is a Large in another, and returns driven by wrong sizes are a persistent cost for online fashion. Most sizing tools attack this by asking shoppers to measure themselves, a step most people skip or get wrong.
The product needed to turn two to four 'this fits me well' data points into a usable fit profile, accept a size question in whatever form the shopper has it, a typed brand name, a pasted product link, or a photo of a size chart, and give an honest answer: when no size in a brand truly fits, say so and offer the nearest option rather than fake confidence.
It also needed to give the operating team full control of the sizing dataset, since recommendations are only as good as the brand data behind them.

Deterministic sizing, AI at the edges, honesty enforced server-side
The size recommendation itself is computed by a deterministic engine: anchor ranges are intersected into a centimeter fit band, matched against each brand's size rows, then adjusted for fit preference and known brand bias. AI models are used only where language and vision are genuinely needed, interpreting a free-text query, reading a product page, parsing a size-chart photo, answering follow-ups, and are explicitly instructed never to alter the engine's recommendation. Every AI path has a non-AI fallback.
Honesty is product behavior, enforced server-side. Ambiguous brand queries return candidate lists to confirm rather than a guess; blurry size-chart photos are rejected with a request for a better shot; a chart that visibly belongs to a different brand is flagged; and when the profile lands outside every size range, the result is marked no-fit with the nearest size and whether it will run snug or loose.
We consolidated the originally specified separate backend into Next.js route handlers backed by Supabase, one deployable unit per app, cookie sessions, and Postgres row-level security policies doing the enforcement work a separate API layer would otherwise carry.

From two anchors to an explained recommendation, with a business around it
Onboarding is a guided five-step flow that resumes exactly where the user left off. The anchors step is the heart of it: the user searches the brand list, picks the category and the size that fits them well, with two anchors required and up to four sharpening the profile. Body measurements are an optional refinement, never a requirement, and the user never sees raw numbers.
To check a size, the user types a brand and item, pastes a product link, or uploads a photo of a size chart. The result shows the recommended size in large display type, an alternative, a low/medium/high confidence indicator, and a one-line reason referencing one of the user's own anchors. An AI chat box answers follow-up questions about that specific result, and every past check is kept in a reopenable history.
The commercial wrapper is complete: a metered free plan with capped checks and AI messages per rolling 30-day window, Stripe hosted checkout and Customer Portal, and webhook-driven subscription lifecycle handling including renewal-time price migration. The admin panel gives the operating team brand records with bias flags and verification status, per-gender size rows in centimeters, an Excel bulk importer with per-row reporting, pricing configuration that drives both the marketing page and Stripe, review moderation, and admin invites.
Anchor-based fit profiles
Two to four garments the user already owns replace body measurements; measurements remain an optional refinement, and any change triggers a server-side profile rebuild.
Three-way size check
A typed brand query, a pasted product link, or a photo of a garment's size chart, the AI vision path includes quality classification that rejects unreadable charts instead of interpreting them.
Explained, confidence-rated results
Each recommendation carries an alternative size, a confidence level, and a reason citing the user's own anchors, with honest no-fit results when no size in the brand truly matches.
Guarded per-result AI chat
A follow-up assistant scoped to each check, instructed never to alter the engine's recommendation and able to explain itself when AI services are unavailable.
Metered plans and Stripe billing
A usage-capped free tier with soft warnings and reset dates, hosted Stripe Checkout and Customer Portal, and webhook-synced subscription state including scheduled price changes.
Admin-curated sizing dataset
Brand management with bias flags and verification status, per-gender size rows, an Excel bulk importer with a per-row report of imported, skipped, and unreadable rows, plus pricing and review moderation.




- 01
Deterministic engine, explainable results
Sizes come from arithmetic over curated data, anchor ranges intersected into a centimeter fit band, adjusted for preference and brand bias, making results repeatable, testable, and explainable.
- 02
Server-side enforcement throughout
All sizing logic lives in server-side services behind Next.js route handlers, with Supabase row-level security, hardened definer functions, and billing procedures gated by a vault-stored secret.
- 03
Graceful degradation around every external service
A missing OpenAI key falls back to local matching; a retailer blocking scraping falls back to URL inference, the core loop keeps working regardless of third-party behavior.
- 04
A demo mode as a first-class artifact
A drop-in in-memory mock API mirrors the entire API surface, so the complete product runs with seeded data and zero external services for demos, design review, and testing.
- 05
Tested where correctness matters
39 Vitest unit-test files across the two repos cover the sizing engine, profile builder, checks flow, auth, billing, price migration, Excel import, and onboarding resume logic.
- A shopper can build a fit profile in a few minutes from clothes they already own, then get an explained, confidence-rated size recommendation for any brand in the database via text, link, or photo.
- The operating team can curate the entire sizing dataset, set pricing, meter free usage, and run a subscription business without developer involvement.
- The build progressed from an interactive design demo through requirements mapping to a production codebase with 19 versioned database migrations and 13 tables under row-level security.