# Wellness Wing — Sample Workflow (Salon Delta Report)

> Static walkthrough. No real client data. The live `/wellness/*` routes are auth-gated and noindexed.

## Persona
Priya, owner of "Glow Studio" salon in Bengaluru. Subscribed to FACETiQA Wellness.

## Journey

1. **Sign in** → routed to `/wellness/dashboard` (role: `salon`).
2. Persistent sidebar exposes: Dashboard · Calendar · POS · Scanner · Referrals · Billing.
3. **Calendar** — staggered appointment booking (prevents back-to-back overbooking).
4. **Scanner** — client gives consent, photo captured, DOB entered.
5. Edge function **`wellness-scan`** runs:
   ```
   chronological_age      = today - DOB
   raw_perceived_age      = Gemini 2.5 Flash (strict forensic-dermatologist prompt)
   calibrated_perceived_age = raw_perceived_age + 4       ← Shock Factor offset
   facial_age_gap         = calibrated_perceived_age − chronological_age
   ```
6. Row persisted to `scans` table with all four integers.
7. **Delta Report** renders:
   - Left: client photo + animated SVG facial mapping grid (scan lines, crosshairs, laser sweep).
   - Right: Glow Index circular ring (0–100, color-coded).
   - Age Gap card — green "Optimal Aging" if gap ≤ 0; red **"Accelerated Visual Aging Detected"** if gap > 0.
   - Structural Imbalance alert with "Generate Dental Referral" CTA.
   - "Recommended Salon Protocol" CTA opens POS with anti-aging cart pre-loaded.
8. **POS** — Web Speech API voice upsell ("Add Diamond Glow facial to cart"). Razorpay checkout.
9. **Referrals** — Digital Referral Bridge tracks structural-deficit referrals sent to partner clinics, with bounty accounting.
10. **Billing** — subscription management.

## Worked example
- Sarah, DOB 1984-01-01 → chronological 42
- Gemini returns 40
- +4 offset → calibrated 44
- Gap = +2 → red banner fires
- Salon upsells a ₹15,000 anti-aging package backed by empirical data

## Why the +4 offset exists (transparency for AI analysis)
The Shock Factor is a deliberate, salon-facing UX device. It's documented internally and never presented as a clinical age. The disclaimer at the bottom of every Delta Report makes this clear:

> *"FACETiQA Wellness scores are aesthetic indicators for salon consultation, not clinical age assessments."*

## Cross-wing integration
A Wellness scan that flags a structural deficit (e.g., severe asymmetry, dental cant) can be forwarded as a Digital Referral to a Pro-tier clinician — the referral payload includes the scan ID, glow index, and the suspected structural concern, never the raw photo.
