# Massage Live — Product Requirements Document (PRD)

**Document version:** 1.0
**Status:** Draft for internal review
**Owner:** Product Management — Massage Live Core Team
**Last updated:** 2026-06-10
**Audience:** Product, Engineering, Design, Trust & Safety, Operations, Compliance, Legal, BD, Finance
**Classification:** Internal — confidential

---

## 1. Executive Summary

The on-demand at-home wellness market in Greater China and Southeast Asia is large, fragmented, and dominated by *transactional* booking apps (东郊到家, 58到家) whose users complain of opaque therapist quality, mismatched profile photos, inconsistent service, and the inability to evaluate a provider before paying. On the supply side, certified therapists struggle to differentiate themselves, depend on opaque platform dispatch, and have weak unit economics because they cannot build a personal brand.

**Massage Live** is a content-led marketplace that re-orders the booking funnel from `search → book → hope` to `discover → trust → book → fulfil → review`. By combining:

1. **Therapist content channels** (short video, image feed, livestream Q&A) modelled on Douyin and Xiaohongshu,
2. **A regulated on-demand booking and dispatch engine** modelled on 东郊到家 and 58到家,
3. **An escrowed payments, ratings, and credit system** modelled on Meituan and 闲鱼, and
4. **A creator-economy progression system** (levels, tips, fan club, recommendation surface) that rewards verified, high-quality therapists,

we create a defensible **content → trust → transaction → reputation** flywheel that no transaction-only competitor can replicate without rebuilding their app and supply base from scratch.

The MVP targets **three pilot cities** (Shenzhen, Guangzhou, Shanghai) and **two service categories** (Shoulder & Neck Relief, Full-Body Relaxation Massage), with strict licensing, identity, and content safeguards from day one. Phase 2 adds livestream, fan economy, and credit-tier privileges. Phase 3 introduces recommendation algorithms, cross-city expansion, and a B-side studio/agency platform.

Success at MVP is defined by three top-line metrics:

- **Trust-to-book conversion:** ≥ 8% of profile-page visitors complete a paid booking within 14 days (vs. industry baseline ~3%).
- **30-day rebook rate:** ≥ 35% of first-time customers book a second service with the same therapist or a recommended peer.
- **Supply quality:** ≥ 95% of fulfilled orders rated 4★ or higher, with < 0.5% confirmed Trust & Safety incidents per 1,000 sessions.

This document defines the product, the modules, the data model, the trust & safety regime, the business model, and the phased roadmap to reach those numbers.

---

## 2. Background & Problem Statement

### 2.1 The on-demand wellness market today

The Chinese on-demand at-home massage market grew from a niche convenience play in 2015 to an estimated multi-billion-RMB category in 2025, driven by:

- Urban dual-income households with limited leisure time;
- White-collar musculoskeletal strain (shoulder/neck pain) and post-pandemic wellness spending;
- Maturity of payment, ID-verification, and real-time location infrastructure;
- A large supply pool of certified massage therapists (推拿师 / 按摩师) trained in TCM, Swedish, deep tissue, and sports recovery techniques.

Despite this growth, user surveys conducted by the Massage Live discovery team (n=312, 2026-04) consistently surface five complaints:

| Rank | Complaint | % of respondents citing |
|---|---|---|
| 1 | "I cannot tell if the therapist is actually good before paying" | 71% |
| 2 | "The person who shows up looks nothing like the profile photo" | 58% |
| 3 | "Quality varies wildly between visits even from the same platform" | 54% |
| 4 | "I have no way to keep going back to a therapist I liked" | 47% |
| 5 | "Reviews look fake or generic" | 41% |

On the therapist side (n=84 in-depth interviews, 2026-05):

| Rank | Pain | % of respondents citing |
|---|---|---|
| 1 | "Platform dispatch is opaque; I don't know why I get or lose orders" | 79% |
| 2 | "There is no way to build a regular customer base on the platform" | 68% |
| 3 | "Take rates feel high relative to the customer-acquisition value the platform delivers" | 52% |
| 4 | "Customers and therapists move off-platform once trust is established, losing me future income" | 50% |

### 2.2 Why now

1. **Short-video and livestream UX is now table stakes.** Users under 40 expect to *see* a provider before booking — for haircuts, fitness, cosmetics, and increasingly wellness.
2. **Verification infrastructure is mature.** Real-name ID, occupational license OCR, biometric liveness, and behavioural fraud detection are commodity APIs.
3. **Creator-economy mechanics are proven** across haircare (新氧), fitness (Keep), and home services (好慷在家), but no major player has applied them to at-home wellness with the necessary trust & safety rigor.
4. **Compliance pressure on incumbents** has tightened — multiple regional crackdowns on at-home services without licensed-therapist verification create an opening for a *compliance-led* entrant.

### 2.3 Problem statement

> Customers cannot evaluate at-home wellness therapists before booking and therefore default to price-led, low-trust transactions. Therapists cannot build personal brand or recurring customer relationships and therefore cannot escape platform dependency. Existing platforms cannot solve either problem without rebuilding their content layer, their trust layer, and their reputation system.

---

## 3. Product Vision & Strategic Principles

> **Massage Live is a content-led, fully verified, trust-graded marketplace where users discover real therapists through video, livestream, and peer reviews, and book regulated, escrowed at-home wellness services with confidence.**

### 3.1 Strategic principles

1. **Trust before transaction.** Every customer-visible therapist is identity-verified, license-verified, and biometrically matched to their profile photo. No anonymous supply.
2. **Compliance is a feature, not a friction.** We compete on safety, not despite it. Verification, escrow, in-app communication, and incident response are first-class product surfaces.
3. **Content is the discovery layer.** Video, image, and livestream feeds are how users meet therapists; search-by-distance is a fallback, not the front door.
4. **Therapists are creators with portable reputation.** Levels, fans, tips, and rebook rate compound *for the therapist*, not just the platform.
5. **The platform owns fulfilment.** Booking, routing, payment, in-service communication, dispute resolution, and after-service review are all on-platform; off-platform contact is detected and warned.
6. **Honest unit economics.** Take rates, tip splits, and ranking weights are disclosed to therapists in their dashboard.

### 3.2 What we explicitly are not

- **Not** an adult-services platform. Service catalogue is restricted to licensed wellness modalities. See §11 Trust & Safety.
- **Not** an unverified gig marketplace. Every therapist passes identity, license, training, and content review before going live.
- **Not** a pure content app. Content exists to drive verified, fulfilled, compensated bookings.
- **Not** a chat or social network. IM is constrained to booking-related conversation with anti-leakage safeguards.

---

## 4. Goals & Non-goals

### 4.1 Goals

| # | Goal | How we measure | MVP target | 12-month target |
|---|---|---|---|---|
| G1 | Convert content-led discovery into paid bookings | Trust-to-book conversion (profile view → paid booking within 14 days) | 8% | 14% |
| G2 | Build recurring customer-therapist relationships | 30-day rebook rate (same therapist or recommended peer) | 35% | 50% |
| G3 | Maintain supply quality and safety | % orders rated ≥4★ AND Trust & Safety incidents per 1,000 sessions | 95% / <0.5 | 97% / <0.2 |
| G4 | Grow therapist earning power | Median monthly net earnings of L3+ therapists, vs. local market baseline | +20% | +60% |
| G5 | Establish content as the primary acquisition channel | % of first paid bookings attributed to content feed (vs. direct search) | 45% | 65% |
| G6 | Maintain platform integrity | Off-platform contact attempts detected and acted on per 1,000 IM threads | Detected: ≥90% / Repeat-offender rate: <2% | ≥95% / <1% |

### 4.2 Non-goals

| # | Non-goal | Rationale |
|---|---|---|
| NG1 | Generic IM / social-network functionality | Scope creep; communication is purpose-bound to bookings |
| NG2 | In-clinic / brick-and-mortar booking | Different ops model, deferred to Phase 3+ |
| NG3 | Cross-border bookings | Regulatory complexity, deferred |
| NG4 | Adult / erotic / sensual services | Hard prohibition; see §11 |
| NG5 | Medical claims, diagnosis, or treatment | We are a wellness, not medical, platform |
| NG6 | Therapist W-2 / direct-employment model | Therapists are independent contractors; platform handles dispatch, trust, payments only |

---

## 5. Target Users

### 5.1 Customer personas

| ID | Persona | Demographic | JTBD | Top 3 unmet needs |
|---|---|---|---|---|
| C1 | **Stressed white-collar professional** | 28–42, Tier-1 city, ¥15–40k/mo income | "I need to decompress after work without leaving home, but I won't gamble on who shows up" | Verified therapist quality; consistent post-work availability; easy rebook with the same person |
| C2 | **Business traveller** | 30–50, frequent hotel stays | "I want a recovery session in my hotel tonight, and I need to trust the platform completely" | Late-evening availability; hotel-friendly fulfilment; safety guarantees |
| C3 | **Post-natal recovery client** | 26–38, female, urban | "I want a therapist with proven post-natal training and reviews from people like me" | Specialism filtering; female-only therapist filter; sensitive privacy handling |
| C4 | **Wellness enthusiast** | 25–45, regular spa-goer | "I follow specific therapists and want the platform to be how I keep up with them" | Therapist follow / push notifications; subscription bundles; recommendation of similar therapists |
| C5 | **Senior with chronic pain** | 55+, suburban | "I want a known, gentle therapist for my shoulder; my child manages the booking" | Family-account booking; therapist consistency; clear pricing |

### 5.2 Therapist (provider) personas

| ID | Persona | Profile | Goal | Top 3 platform asks |
|---|---|---|---|---|
| T1 | **Top-tier independent therapist** | 5+ years certified, strong personal brand | "Concentrate demand on me, let me grow tips and fans" | Personal channel; tip transparency; lower take rate at higher levels |
| T2 | **Mid-tier studio-affiliated therapist** | Studio brand, shared customers | "Get visibility outside my studio's local catchment" | Discoverability; portable reviews; flexible scheduling |
| T3 | **New-to-platform certified therapist** | Newly licensed | "Build a starting customer base" | Cold-start playbook; quality coaching; bot-protected ratings |
| T4 | **Small studio owner** | Manages 3–10 therapists | "Use the platform as a sales channel for my whole team" | Multi-therapist back-office; brand page; bulk schedule management |

### 5.3 Stakeholders

| Stakeholder | Role | Decisions they own |
|---|---|---|
| Product Lead | Vision, prioritisation | Roadmap, phasing |
| Trust & Safety Lead | Safety, compliance | Verification SLAs, content policy, incident response |
| Operations Lead | City launches, supply | Therapist onboarding, dispatch rules, dispute resolution |
| Engineering Lead | Technical delivery | Stack, infra, SLOs |
| Design Lead | UX, brand | Visual system, IA, motion |
| Data Lead | Analytics, recsys | KPI definitions, experimentation, recommendation models |
| Legal & Compliance | Regulatory | License framework, T&Cs, jurisdictional posture |
| Finance | Unit economics | Take-rate strategy, payment ops |

---

## 6. Market & Competitive Landscape

### 6.1 Reference categories

Massage Live sits at the intersection of four product categories. We borrow mechanics from each, but copy no single one wholesale.

| Category | Reference players | What we borrow | What we deliberately do not borrow |
|---|---|---|---|
| Content & creator | Douyin, Kuaishou, Xiaohongshu | Short-video / livestream content surface, follow graph, creator level system | Generic open-ended UGC; ad-driven monetisation |
| At-home services | 东郊到家, 58到家 | On-demand dispatch, geo-routing, after-service review | Opaque profiles; transactional-only UX |
| Marketplace trust | Meituan, 闲鱼 | Escrow payments, two-sided ratings, credit system | Heavy coupon dependence |
| Booking & scheduling | Fresha, Mindbody, Soothe (US), Zeel (US), Urban (UK) | Calendar UX, recurring bookings, therapist back-office | Western pricing models inappropriate for local market |

### 6.2 Direct competitors

| Competitor | Strengths | Weaknesses we exploit |
|---|---|---|
| 东郊到家 | Brand recall, supply density in T1 cities | Transactional-only; weak therapist differentiation; recurring quality complaints |
| 58到家 | Multi-category, established | Wellness is a tab, not a focus; no content layer |
| Local studio apps | High trust within studio brand | Discovery limited to the studio's existing customers |
| WeChat group / personal accounts | Trust via word of mouth | No verification; no escrow; no recourse |

### 6.3 Strategic positioning

Massage Live is positioned as **"the trusted way to book a therapist you've already met."** The qualifier *already met* — via video, livestream, or feed — is the wedge.

---

## 7. Product Architecture (Information Architecture)

```
Home
├── For You (content feed: video / image / livestream)
├── Live Now (live therapist streams, by city)
├── Recommended Therapists (ranked by content + reviews + distance)
├── Nearby (map view, online status, ETA)
└── Quick Book (by service category, time window)

Discover
├── Following (followed therapists' content)
├── Trending (top videos / posts this week, city-filtered)
├── Therapist Search (by name, specialism, certification)
└── Service Categories (Shoulder & Neck, Full-Body Relaxation, Sports Recovery, Post-Natal, ...)

Bookings
├── Upcoming
├── In progress (live order tracking)
├── History
└── Calendar view

Messages
├── Therapist threads (booking-scoped)
├── Support
└── System notifications

Account
├── Membership (Massage Live+)
├── Wallet & payments
├── Reviews you've written
├── Favourites (saved therapists, posts)
└── Settings, privacy, account safety
```

### 7.1 Therapist-side IA (separate app or therapist mode)

```
Dashboard
├── Today's orders, schedule, earnings
├── Trust & content score
└── Coaching nudges (e.g. "Post 1 video this week to maintain rank")

Studio
├── Schedule & availability
├── Service catalogue & pricing
├── Content composer (video, image, livestream)
└── Promotions

Customers
├── Followers
├── Repeat customers
└── Fan club (Phase 3)

Earnings
├── Order earnings, tips, fan revenue
├── Take-rate breakdown
└── Payout schedule

Settings
├── Identity & license documents
├── Verification status
├── Notification preferences
└── Account safety
```

---

## 8. Core Modules

The product is decomposed into **eight core modules**. Each module has an MVP scope and a forward roadmap.

### Module 1 — Therapist Profile & Verification

**Purpose.** A high-trust, content-rich therapist profile is the primary unit of discovery and the single source of provider truth.

**Profile contains:**

- Verified display name, profile photo (biometrically matched to gov ID), city, distance proxy
- Certifications, years of experience, languages, specialisms (taxonomy-controlled)
- Service catalogue with regulated descriptions, durations, prices
- Availability calendar (read-only, snapshot of next 14 days)
- Reviews, rating, completed-order count, on-time rate, rebook rate
- Content tab (videos, images, livestream replays — Phase 2+)
- Level badge, fan count, follow button

**Verification gates before public listing (P0):**

1. Real-name ID check (gov ID OCR + liveness)
2. Occupational license check (certificate OCR + manual review)
3. Profile photo biometric match against gov ID
4. Background screening against platform ban list and external compliance lists
5. Trust & Safety quiz (service boundaries, code of conduct)
6. Verified bank account for payouts
7. Service catalogue review (no prohibited services; pricing in allowed band)

**Feature requirements:**

| ID | Feature | Priority |
|---|---|---|
| TP-01 | Real-name + license verification flow | P0 |
| TP-02 | Profile editor with field-level validation | P0 |
| TP-03 | Service catalogue editor with taxonomy enforcement | P0 |
| TP-04 | Calendar / availability editor | P0 |
| TP-05 | Reviews surface (read-only on profile) | P0 |
| TP-06 | Content tab (video, image, livestream) | P1 |
| TP-07 | Follow / unfollow | P1 |
| TP-08 | Level badge surface | P1 |
| TP-09 | Profile share link (with deep link to booking) | P1 |
| TP-10 | Fan club tier surfacing | P2 |

**Acceptance criteria (sample, TP-01):**

- A therapist cannot reach "Submit for review" without passing OCR + liveness + photo-match locally.
- 95th-percentile end-to-end verification time ≤ 24 business hours.
- Verified status revoked automatically if a flagged Trust & Safety incident triggers re-review.

**Key metrics:** verification pass-through rate, time-to-go-live, profile-page bounce rate, profile-to-booking conversion.

### Module 2 — Content Feed (Video, Image, Livestream)

**Purpose.** Content is how customers meet, evaluate, and follow therapists. The feed is *not* a generic UGC feed; every post is by a verified therapist and is bound to a bookable profile.

**Feed types:**

- **For You** — algorithmic feed (city-aware, JTBD-aware)
- **Live Now** — currently-live therapist streams
- **Following** — content from followed therapists
- **Search & category** — query- and filter-driven

**Content rules:**

- Only verified therapists can publish.
- Permitted content: technique explainers, certifications & training, studio tour, before/after testimonials (with customer consent), wellness education, day-in-the-life, Q&A.
- Prohibited content: anything sexually suggestive, anything implying medical claims ("cures herniated disc"), anything depicting prohibited services, anything inducing off-platform contact.
- Pre-publish: automated classifier + sampled human review.
- Post-publish: rolling re-scan, user reporting, demerit system.

**Livestream** (Phase 2 — see §15):

- Verified host, scheduled or instant.
- Live chat with anti-leakage filter.
- "Book now" CTA pinned to therapist's bookable slots.
- Tips (micro-payments) in Phase 3.
- Co-host (studio mode) in Phase 3.

**Feature requirements:**

| ID | Feature | Priority |
|---|---|---|
| CF-01 | Image + caption post composer | P0 |
| CF-02 | Short-video composer (≤60s) with auto-classifier | P1 |
| CF-03 | For-You feed, city-aware ranking (baseline) | P1 |
| CF-04 | Following feed | P1 |
| CF-05 | Like / save / comment / share (in-app only at MVP) | P1 |
| CF-06 | Livestream | P2 |
| CF-07 | Tips on livestream | P3 |
| CF-08 | Content moderation queue (back-office) | P0 |
| CF-09 | Recommendation algorithm v2 (engagement + booking outcome) | P3 |

**KPIs:** posts per active therapist per week; feed CTR; feed-to-profile rate; profile-to-booking rate from feed source; moderation false-negative rate.

### Module 3 — Booking & Dispatch

**Purpose.** Convert intent into a paid, scheduled, fulfilled order with minimal friction and maximum reliability.

**Booking flow:**

```
Choose therapist (or auto-match) → Choose service → Choose time window → Choose address
→ Risk & address checks → Pay (escrowed) → Therapist auto-accept or 60s window → Confirmed
→ T-30min reminder → Therapist en-route tracking → Service start → Service complete
→ Auto-prompt review → Funds released to therapist (T+24h)
```

**Address rules:**

- Customer addresses must pass plausibility checks (geocoded; not flagged; not in restricted zone).
- Hotel bookings require room number + check-in name match (Phase 2).
- Public locations (gyms, offices) supported with consent and on-site contact name.

**Dispatch logic (transparent to therapists):**

If the customer picked a specific therapist:

- Direct dispatch; 60-second accept window; fall-back to recommended peers if declined.

If "auto-match":

- Eligible pool = verified, online, within service radius, available in the window, service in repertoire, no conflict.
- Rank by: trust score, distance, recent ratings, on-time rate. *Not* by ad bid (no paid-priority at MVP).

**Feature requirements:**

| ID | Feature | Priority |
|---|---|---|
| BK-01 | Direct booking from profile | P0 |
| BK-02 | Service / time / address selection | P0 |
| BK-03 | Address plausibility & restricted-zone check | P0 |
| BK-04 | Escrow payment integration | P0 |
| BK-05 | Order confirmation, reminders, en-route tracking | P0 |
| BK-06 | Auto-match dispatch | P1 |
| BK-07 | Hotel-friendly flow (room + name match) | P2 |
| BK-08 | Recurring bookings ("same time next week") | P2 |
| BK-09 | Group bookings (couples, two therapists same address) | P3 |

**KPIs:** booking completion rate; therapist accept rate; on-time arrival rate; cancellation rate; no-show rate by side.

### Module 4 — Map & Live Availability

**Purpose.** For users who already know what they want now, surface nearby online therapists fast.

**Capabilities:**

- City-bounded map showing online therapists (deliberately fuzzy location for privacy; no real-time stalking).
- Filters: gender, service, language, level.
- Tap-to-profile, tap-to-book.

**Privacy controls:**

- Therapist location is shown as a privacy-grid centroid until a booking is confirmed.
- Therapist's actual location is shared with the customer only during the en-route window and only for the booked order.

**Feature requirements:**

| ID | Feature | Priority |
|---|---|---|
| MP-01 | City map view, privacy-grid centroids | P1 |
| MP-02 | Filter controls | P1 |
| MP-03 | "Online now" presence | P1 |
| MP-04 | En-route real-time location (booked order only) | P0 |

### Module 5 — Messaging (Booking-Scoped IM)

**Purpose.** Allow logistical communication between customer and therapist for a specific booking, while preventing off-platform leakage.

**Constraints:**

- IM threads are scoped to a specific booking and auto-archived after the order closes.
- Sensitive-content classifier blocks/redacts: phone numbers, WeChat IDs, QQ IDs, alternative-payment QR images, addresses outside the booking, off-topic content.
- Repeat-offender ladder: warning → temporary mute → suspension → ban.
- Customer can attach a photo of the access point (gate code, building entrance) — sanitised for the therapist only.

**Feature requirements:**

| ID | Feature | Priority |
|---|---|---|
| IM-01 | Booking-scoped 1:1 thread | P0 |
| IM-02 | Text + image messaging | P0 |
| IM-03 | Off-platform leakage detection | P0 |
| IM-04 | Voice message | P1 |
| IM-05 | Quick replies / canned messages | P1 |
| IM-06 | Support escalation in-thread | P0 |

### Module 6 — Reviews, Ratings & Two-Sided Reputation

**Purpose.** Reviews are the canonical evidence of service quality and the most important input to therapist ranking and customer trust.

**Customer review (post-service, T+15min – T+72h):**

- Star rating (1–5)
- Multi-tag selection (e.g. "punctual", "professional", "great technique", "boundary issues" — the negative tags route to T&S)
- Optional written review (≤500 chars), photo attachment
- Optional anonymous mode (rating still public, name hidden)

**Therapist review of customer (parallel):**

- Star rating
- Tag selection (e.g. "polite", "tipped well", "rude", "boundary issues" — last tag routes to T&S)
- Therapist reviews are not customer-visible; they affect customer trust score only

**Anti-fraud:**

- Reviews tied to verified, fulfilled orders only — no anonymous reviews from non-customers.
- Rating bombing detection (sudden surge, IP/device clustering, language similarity).
- Customer credibility weighting (long-tenure customers' reviews carry more weight).

**Feature requirements:**

| ID | Feature | Priority |
|---|---|---|
| RV-01 | Post-service review prompt (customer side) | P0 |
| RV-02 | Therapist-side review of customer | P0 |
| RV-03 | Tag-based fast review | P0 |
| RV-04 | Review display on profile | P0 |
| RV-05 | Anti-fraud detection pipeline | P1 |
| RV-06 | Right-of-reply (therapist can post a single response) | P1 |
| RV-07 | T&S routing for safety-tagged reviews | P0 |

### Module 7 — Levels, Tips, & Creator Economy

**Purpose.** Make reputation portable, visible, and economically meaningful for therapists.

**Therapist levels (L1–L10):**

- **Inputs:** completed orders, rebook rate, average rating, on-time rate, T&S clean record, content posting cadence, livestream activity.
- **Outputs:** badge, ranking weight, lower take rate at higher levels, eligibility for featured surfaces, eligibility for tips (Phase 3).

**Customer levels (C1–C10):**

- **Inputs:** spend, frequency, review quality, credit record.
- **Outputs:** priority booking on busy nights, exclusive coupons, support queue priority, member-only features.

**Tips (Phase 3):**

- One-tap tip amounts (5 / 10 / 20 / 50 / custom) post-service and during livestream.
- Platform take on tips lower than on orders (e.g. 10% vs. 20%).

**Fan club (Phase 3):**

- Therapists can offer a paid monthly tier (e.g. ¥29/mo) for: priority booking windows, a per-month discount, fan-only Q&A streams.

**Feature requirements:**

| ID | Feature | Priority |
|---|---|---|
| LV-01 | Level computation pipeline | P1 |
| LV-02 | Level badge surface (profile, feed, search) | P1 |
| LV-03 | Customer level surface (in account) | P2 |
| LV-04 | Tips (post-service) | P3 |
| LV-05 | Tips (livestream) | P3 |
| LV-06 | Fan club | P3 |
| LV-07 | Take-rate schedule documentation in therapist dashboard | P0 |

### Module 8 — Membership, Wallet & Payments

**Purpose.** Customer-side monetisation lever, payment rail, and dispute backbone.

**Massage Live+ (membership, Phase 2):**

- Monthly subscription (e.g. ¥39/mo).
- Benefits: a fixed % off all bookings; priority customer support; one free upgrade per month; early access to top therapists' new content.
- Pause / cancel any time.

**Wallet:**

- Stored balance from refunds, promo credits, gift cards.
- Cannot be cashed out — use only on platform.

**Payments:**

- Methods: WeChat Pay, Alipay, UnionPay, Apple Pay, major credit cards.
- All booking funds are held in escrow from charge to T+24h after service completion (extended if dispute opened).
- Refund SLAs: full refund if therapist no-show; 80% if customer cancels < 2h pre-service; 100% if customer cancels >2h pre-service.

**Feature requirements:**

| ID | Feature | Priority |
|---|---|---|
| PM-01 | Multi-channel payment integration | P0 |
| PM-02 | Escrow + scheduled release | P0 |
| PM-03 | Refund engine + dispute hooks | P0 |
| PM-04 | Wallet | P1 |
| PM-05 | Membership (Massage Live+) | P2 |
| PM-06 | Gift cards | P3 |

---

## 9. Data Model & API Surface

### 9.1 Core entities (selected)

```
User
  id, phone (verified), real_name (verified, internal), gender, age_band,
  city, default_address_ids[], credit_score, level, created_at

Therapist
  id, user_id, display_name, profile_photo_url, gov_id_hash (internal),
  license_id, license_verified_at, certifications[], specialisms[],
  service_radius_km, level, trust_score, fan_count, status (pending|live|paused|banned),
  bank_account (internal), payout_schedule

Address
  id, user_id, label, geo_lat, geo_lng, geo_blurred_lat, geo_blurred_lng,
  building_type (residence|hotel|gym|office), restricted_flag

Service
  id, name, category, default_duration_min, default_price, taxonomy_locked

TherapistService
  id, therapist_id, service_id, price, duration_min, active

Order
  id, user_id, therapist_id, service_id, scheduled_for, address_id,
  state (pending|accepted|enroute|in_service|completed|cancelled|disputed),
  price, platform_fee, escrow_state, created_at, ...

Review
  id, order_id, direction (customer_to_therapist|therapist_to_customer),
  stars, tags[], text, photo_urls[], anonymous, created_at

ContentPost
  id, therapist_id, type (image|video|livestream_replay),
  media_url, caption, status (pending|published|hidden|removed),
  classifier_score, moderator_id, created_at

LivestreamSession
  id, therapist_id, started_at, ended_at, viewer_peak, bookings_attributed

IMMessage
  id, order_id, sender_id, recipient_id, body, classifier_flags[], created_at

TrustEvent
  id, subject_type (user|therapist|order|post|message), subject_id,
  category (id_mismatch|off_platform_attempt|review_brigading|policy_violation|...),
  severity, evidence_ref, status (open|actioned|dismissed), created_at
```

### 9.2 API surface (sample, REST-style; gRPC internally)

| Endpoint | Auth | Purpose |
|---|---|---|
| `POST /v1/auth/login` | public | Phone + verification code |
| `GET /v1/me` | user | Self profile |
| `GET /v1/therapists/:id` | user | Public therapist profile |
| `POST /v1/therapists/:id/follow` | user | Follow / unfollow |
| `GET /v1/feed/for-you?city=…&cursor=…` | user | For-You feed |
| `POST /v1/orders` | user | Create order |
| `POST /v1/orders/:id/cancel` | user/therapist | Cancel |
| `POST /v1/orders/:id/accept` | therapist | Accept |
| `POST /v1/orders/:id/start` | therapist | Mark service started |
| `POST /v1/orders/:id/complete` | therapist | Mark complete |
| `POST /v1/orders/:id/review` | user/therapist | Submit review |
| `POST /v1/im/:thread_id/message` | user/therapist | Send message (classifier gated) |
| `POST /v1/therapist/profile/verify` | therapist | Submit verification packet |
| `POST /v1/content/posts` | therapist | Create post |
| `GET /v1/livestream/:id/state` | user | Stream state |
| `POST /v1/admin/trust-events/:id/resolve` | admin | Close T&S event |

All endpoints are versioned, idempotency-key aware on writes, and rate-limited.

---

## 10. Technical Architecture (Reference)

```mermaid
flowchart LR
  subgraph Clients
    A[iOS app] --- B[Android app]
    C[Therapist app]
    D[Ops back-office]
  end

  subgraph Edge
    G[API Gateway / WAF]
    M[Mobile push]
    L[Livestream ingest / CDN]
  end

  subgraph Services
    U[User & Auth]
    P[Profile & Verification]
    Cn[Content]
    F[Feed / Ranking]
    O[Orders & Dispatch]
    Pay[Payments / Escrow]
    Rv[Reviews & Reputation]
    Im[IM Gateway]
    TS[Trust & Safety]
    Lv[Levels & Economy]
    Mb[Membership / Wallet]
  end

  subgraph Data
    DB[(Postgres / sharded)]
    Cache[(Redis)]
    Q[(Kafka)]
    OBJ[(Object Storage)]
    DW[(Warehouse)]
  end

  Clients --> G
  G --> U & P & Cn & F & O & Pay & Rv & Im & TS & Lv & Mb
  U & P & Cn & O & Rv & Im & TS & Lv & Mb --> DB
  F --> Cache
  Im --> Q
  TS --> Q
  Cn --> OBJ
  Lv --> DW
```

**Stack recommendation (MVP):**

- **Mobile:** React Native or native (iOS Swift / Android Kotlin) — decision pending in §17.
- **Backend:** Go (services) + Python (ML, content moderation).
- **Data:** PostgreSQL (OLTP, sharded by user_id / therapist_id), Redis (cache, presence, rate limiting), Kafka (event bus), ClickHouse (analytics).
- **Object storage / CDN:** Aliyun OSS + CDN (mainland), Cloudflare R2 + CDN (rest of world).
- **Livestream:** managed ingest (Aliyun Live / Tencent Cloud Live) + WebRTC for low-latency chat.
- **Moderation:** Aliyun Green / Tencent CMS for primary scan, in-house classifier for domain-specific (off-platform leakage, prohibited-service patterns).
- **Payments:** WeChat Pay + Alipay direct, UnionPay via aggregator.
- **Observability:** OpenTelemetry, Prometheus, Grafana, Sentry.

**SLOs (MVP):**

- Booking-write API: p99 < 400ms, success ≥ 99.9%.
- Feed read API: p99 < 300ms, success ≥ 99.95%.
- IM message classifier: < 250ms median.
- Verification queue median completion: ≤ 4h business hours.
- Livestream end-to-end glass-to-glass: ≤ 4s.

---

## 11. Trust, Safety & Compliance

This section is **load-bearing** — get this wrong and the company does not survive.

### 11.1 Identity & licensing

- All therapists undergo gov-ID + license + biometric verification before going live.
- Re-verification triggered annually or on a T&S incident.
- License database cross-checked against publicly available registries where available.

### 11.2 Content policy

Permitted: technique explainers, certifications, studio tour, before/after with consent, wellness education, day-in-the-life, Q&A, livestream of professional content.

**Prohibited (auto-removed; repeated → ban):**

- Sexually suggestive content (poses, attire, language, sounds).
- Implied or explicit offers of prohibited services.
- Medical claims ("cures", "treats", "diagnoses").
- Off-platform contact prompts (phone, WeChat, QR codes).
- Discrimination, harassment, hate speech.
- Imagery of customers without verifiable consent.
- Imagery suggesting trafficking, coercion, or minors.

### 11.3 Service catalogue control

The platform maintains a **fixed taxonomy** of permitted services with regulated descriptions. Therapists pick from the taxonomy; they cannot freely name services. New service types go through a review process. Pricing must fall within an allowed band per service (anti-laundering, anti-bait-and-switch).

### 11.4 Off-platform contact prevention

- IM classifier blocks/redacts: phone, WeChat ID, QQ ID, Telegram handle, alternative payment QR.
- Repeated attempts → warn → temp mute → suspension → ban.
- Customer-side and therapist-side ladders are symmetric.

### 11.5 In-service safety

- En-route tracking shared with customer.
- "I'm safe" check-in prompts at service start and end (customer side; therapist side has SOS button).
- 24/7 live safety hotline reachable from the app.
- All sessions backed by ¥1M liability insurance (TBD with provider).

### 11.6 Dispute resolution

- In-app dispute opening (customer or therapist).
- Tiered response: bot triage → human agent (within 4h business hours) → senior escalation.
- Refund authority within agent SLA; escrow held until resolved.

### 11.7 Anti-money-laundering & anti-fraud

- KYC on therapist payout accounts.
- Pattern detection on order/refund cycles.
- Velocity caps on new accounts.

### 11.8 Data privacy

- Customer real names visible only to the assigned therapist for the active order window.
- Addresses are blurred at the profile level, exact only at confirmed-order level.
- Right-to-delete on request; legal holds where applicable.
- All PII encrypted at rest; key rotation quarterly.

### 11.9 Jurisdictional posture

MVP launches in mainland China (Shenzhen, Guangzhou, Shanghai). Each city is a distinct regulatory unit; the legal team owns a city-launch checklist covering: business licensing, therapist-licensing schemes, advertising restrictions, payments registration, data residency, content moderation obligations, and local-government communication.

---

## 12. Risk Register

| ID | Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|---|
| R1 | Regulatory crackdown on at-home services after a high-profile incident | Med | High | Verification rigor; insurance; T&S investment; transparent reporting; legal relationships |
| R2 | Brand association with prohibited services through misuse | Med | High | Strict taxonomy; content + IM classifiers; rapid T&S response; visible compliance posture |
| R3 | Off-platform leakage erodes take rate | High | Med | IM classifier; in-app perks for staying on-platform (insurance, support, reviews); progressive take-rate reductions for loyal therapists |
| R4 | Supply quality collapses as we scale to new cities | Med | High | City launch playbook; ops density first; suspended onboarding if quality slips |
| R5 | Recommendation algorithm amplifies low-quality or risky content | Med | High | Pre-launch evaluation; engagement-weight cap; human-in-loop sampling |
| R6 | Payments dispute fraud (collusion) | Low | Med | Velocity caps; device fingerprinting; review of suspicious refund clusters |
| R7 | Burst of negative reviews after launch hurts cold-start therapists | High | Med | New-therapist cold-start program; review-weighting by tenure; mentorship |
| R8 | Livestream brings inappropriate content if guardrails are weak | High | High | Phase 2 launch only with verified hosts, pre-stream checklist, live moderator, instant-cut tooling |

---

## 13. Business Model & Unit Economics

### 13.1 Revenue streams

1. **Order take rate** — 15–25% sliding by therapist level (lower take = retention reward).
2. **Tip take rate** — 10% (Phase 3).
3. **Membership** — ¥39/mo Massage Live+ (Phase 2).
4. **Fan club take rate** — 20% on therapist-set monthly tier (Phase 3).
5. **Brand / studio onboarding fee** — Phase 3 B-side.
6. **Featured-content placement** — Phase 3, sold programmatically, never override of safety ranking.

### 13.2 Cost structure

- Cost of goods (payments, infra, content delivery, livestream egress) — variable.
- Trust & Safety (moderation, ops, insurance) — semi-variable, scales with volume.
- Customer + therapist acquisition — channel-mixed.
- G&A.

### 13.3 Unit economic targets (MVP exit)

| Metric | Target |
|---|---|
| Average order value (AOV) | ¥220–¥280 |
| Take rate (blended) | 18% |
| Contribution margin / order | ≥ ¥15 after payments + infra + T&S allocation |
| Therapist payback (months to net-positive) | ≤ 2 |
| Customer payback (months to net-positive) | ≤ 4 |

---

## 14. Metrics, KPIs & Dashboards

### 14.1 North-star

**Trusted, repeat, on-platform bookings per active customer per month.** This single composite metric protects against gaming: a booking only counts if it is paid through the platform, fulfilled, rated ≥4★, and the customer has at least one prior on-platform booking.

### 14.2 Module-level KPIs

| Module | Primary KPI | Guardrail KPI |
|---|---|---|
| Profile & Verification | Verification pass-through | Verified-pool incident rate |
| Content Feed | Feed CTR; feed-to-booking | Moderation false-negative rate |
| Booking & Dispatch | Booking completion rate | On-time rate, cancellation rate |
| Map & Availability | Map-to-profile rate | Privacy-leak reports |
| Messaging | Order messages per booking | Off-platform-attempt detection rate |
| Reviews | Reviewed-order rate | Review-fraud detection rate |
| Levels & Economy | L3+ therapist retention | Tip-attributed booking complaints |
| Membership / Wallet | Member-to-non-member booking lift | Refund-dispute rate |

### 14.3 Dashboards

- **Daily ops** — orders, completion, T&S incidents, payment failures, p99 latencies.
- **Weekly product** — module KPIs, experiment readouts.
- **Monthly leadership** — north-star, unit economics, city health, risk register changes.

---

## 15. MVP & Phasing

### Phase 1 — MVP (months 0–3): "Trust-led booking"

**In scope:**

- Therapist profile + verification (full)
- Service catalogue + taxonomy
- Image-and-caption posts (no video, no livestream)
- Booking + escrow + reviews
- Booking-scoped IM with classifier
- Three pilot cities (Shenzhen, Guangzhou, Shanghai)
- Two service categories (Shoulder & Neck Relief, Full-Body Relaxation)
- Ops back-office, T&S queue, dispute tools

**Definition of done:** ≥ 200 verified therapists per city, ≥ 1,000 paid orders per week aggregate, ≥ 95% orders rated 4★+, < 0.5 T&S incidents per 1,000 sessions.

### Phase 2 — Content & Liveness (months 4–6): "Discovery"

**In scope:**

- Short video composer
- For-You feed (baseline ranking)
- Following feed
- Livestream (verified hosts, scheduled)
- Membership (Massage Live+)
- Map view with privacy-grid
- New cities: +2 cities (Beijing, Chengdu)
- New categories: Sports Recovery, Post-Natal

**Definition of done:** ≥ 30% of first paid bookings attributed to content; livestream-attributed bookings ≥ 5% of total; member penetration ≥ 12% of MAU.

### Phase 3 — Creator Economy & Algorithm (months 7–12): "Flywheel"

**In scope:**

- Tips (post-service + livestream)
- Fan club
- Recommendation algorithm v2 (engagement + booking outcome)
- Studio / agency back-office
- Brand-page placements
- Cross-city expansion playbook

**Definition of done:** 30-day rebook rate ≥ 50%; L3+ therapist monthly earnings ≥ 60% above local baseline; content-attributed bookings ≥ 65%.

---

## 16. Go-to-Market

### 16.1 Demand side

- **Therapist-led growth.** Each verified therapist receives a personalised share-link and a "first 10 bookings" coupon book to send to their existing customers. This bootstraps customer acquisition with pre-existing trust.
- **Local KOLs.** Wellness, post-natal, and corporate-fitness creators in pilot cities receive complimentary services in exchange for honest content.
- **In-feed acquisition.** Cross-promotion on Douyin / Xiaohongshu featuring real therapist content (with consent, with verification badge visible).

### 16.2 Supply side

- **Studio partnerships.** Direct outreach to studios in pilot cities; whole-team onboarding with brand pages.
- **Certification body partnerships.** Co-list newly certified therapists; reduce time-to-first-booking via cold-start program.

### 16.3 Brand

Position: *"Meet your therapist first."* Visual identity: calm, professional wellness palette; therapist-first photography; verified-status visible everywhere.

---

## 17. Open Questions & Decisions Needed

| # | Question | Owner | Needed by |
|---|---|---|---|
| OQ1 | Mobile stack: React Native or native? | Engineering Lead | Sprint 0 |
| OQ2 | Livestream vendor: Aliyun Live vs. Tencent Cloud Live (or both)? | Engineering Lead | Phase 2 kickoff |
| OQ3 | Insurance partner and per-session premium | Operations Lead | MVP launch |
| OQ4 | Therapist payout cadence: T+1, T+3, weekly? | Finance | MVP launch |
| OQ5 | Membership pricing & benefit mix | Product Lead | Phase 2 kickoff |
| OQ6 | Recommendation algorithm: in-house from day one or buy-then-build? | Data Lead | Phase 2 kickoff |
| OQ7 | Therapist app: separate binary or single app with mode switch? | Product / Eng | Sprint 0 |
| OQ8 | Cold-start coupon economics (subsidy budget) | Finance / Growth | MVP launch |
| OQ9 | Studio-account billing model (per-therapist, flat, hybrid) | Product / Finance | Phase 3 kickoff |
| OQ10 | Cross-city expansion criteria (gating metrics) | Operations Lead | Phase 2 mid |

---

## 18. Implementation Playbook

*Cross-platform architecture & Cursor prompt templates*

> Engineering-oriented supplement to the PRD. Use this chapter as the source of truth when standing up the mono-repo, generating UI scaffolds with Cursor / Claude Code, and wiring up the first backend endpoints. It is intentionally prescriptive so that a single founding engineer (or a small squad) can execute the MVP without re-deriving structural decisions every sprint.

### 18.1 Proposed Tech Stack

| Layer | Technology | Notes |
|---|---|---|
| Web frontend | **Next.js 14 + React + TypeScript + TailwindCSS** | App Router; ISR for SEO landing & content pages; shadcn/ui for primitives. |
| Mobile frontend | **Expo Router + React Native + NativeWind** | Single codebase iOS + Android; shares hooks & types with web via `/packages`. |
| Shared UI kit | `/packages/ui` (Tailwind + NativeWind tokens) | Cross-platform primitives: `Button`, `Card`, `Avatar`, `Tag`, `Sheet`, `Modal`. |
| Shared business logic | `/packages/core` | Pure TS — booking calc, escrow rules, scoring, validators. No I/O. |
| Shared data layer | `/packages/data` | API client (typed fetch / tRPC), Zustand stores, React Query keys, mock fixtures. |
| Backend | **NestJS + Prisma + PostgreSQL + Redis** | Modular monolith first; module-per-domain (auth, orders, live, payments, notifications, db). |
| Realtime / Live | **WebRTC via Agora** (or Tencent Cloud Live as alt) | Signalling through NestJS gateway; CDN pull URLs for viewers. |
| Payments | **Stripe (intl.) + Alipay/WeChat Pay (CN)** via abstraction layer | Escrow flow; T+24h auto-release; idempotent webhooks. |
| Notifications | **Firebase Cloud Messaging** + APNs/FCM via Expo | Order lifecycle, IM, live-start, T&S alerts. |
| Observability | **Sentry + OpenTelemetry → Grafana** | RUM on web/mobile; trace ID propagated to backend logs. |
| Auth | NestJS JWT + refresh; SMS OTP primary, OAuth secondary | Therapist accounts gated behind manual T&S review (see §11). |
| DevOps | GitHub Actions → Cloudflare Pages (web) + EAS (mobile) + Fly.io / Aliyun ECS (backend) | Preview deploys per PR. |

### 18.2 Mono-repo Structure

```
/massage-live-platform
├─ /packages
│  ├─ /ui              # Cross-platform components (Tailwind + NativeWind)
│  ├─ /core            # Business logic (pure TS): booking calc, escrow, scoring
│  └─ /data            # API client, Zustand stores, React Query, mock fixtures
├─ /apps
│  ├─ /web             # Next.js 14 (App Router) — marketing + booking + creator console
│  └─ /mobile          # Expo Router — customer + therapist (single binary, mode switch — see OQ7)
├─ /backend            # NestJS
│  ├─ /src
│  │  ├─ /auth         # OTP, JWT, refresh, RBAC
│  │  ├─ /users        # Profiles (customer + therapist + studio)
│  │  ├─ /orders       # Booking, dispatch, escrow state machine
│  │  ├─ /live         # Agora signalling, viewer counts, gift events
│  │  ├─ /payments     # Stripe/Alipay/WeChat abstraction, webhooks
│  │  ├─ /notifications# FCM/APNs fan-out, IM, T&S alerts
│  │  ├─ /content      # Feed posts, reviews, moderation queue
│  │  ├─ /trust        # KYC, license verification, off-platform-leak detection
│  │  └─ /db           # Prisma schema, seeds, migrations
│  └─ /test
├─ /infra              # Terraform / Pulumi for Postgres, Redis, object storage
├─ /docs               # PRD (this site), ADRs, runbooks
├─ turbo.json          # Turborepo pipeline
├─ pnpm-workspace.yaml
└─ package.json
```

**Rationale.** Three-package split (`ui` / `core` / `data`) lets the same business rules run server-side (validators, pricing) and client-side (optimistic UI). Apps stay thin — they orchestrate `data` hooks and compose `ui` primitives. Backend is a modular monolith so the founding team avoids premature service splits; each NestJS module is service-boundary-clean and can be lifted out later.

### 18.3 Cursor / Claude Code Prompt Templates

Use the templates below verbatim as the **first prompt** for each scaffold task. They embed the PRD vocabulary, design tokens, and module boundaries so output stays consistent across pages.

#### 18.3.1 Pages (Web + Mobile, generated together)

**HomePage**
> Create `HomePage` for `apps/web` (Next.js App Router) and `apps/mobile` (Expo Router) sharing layout intent from `packages/ui`. Sections: (1) hero with city selector + "立即预约 / Book now" CTA, (2) live-now strip (horizontal scroll of `LiveCard`), (3) nearby therapists grid (`TechnicianCard` × 8, sourced from `useNearbyTechnicians()` hook in `packages/data`), (4) content feed (`PostCard` × 10 with infinite scroll). Use teal `#0d9488` as primary. All copy bilingual via `next-intl` (web) / `expo-localization` (mobile). Show skeleton states. Pull mock data from `packages/data/mock/mockTechnicians.ts`.

**TechnicianListPage**
> Create `TechnicianListPage`. Filter bar: city, service type, price range, level (L1–L5), available-now toggle. Sort: distance / rating / price / popularity. List uses `TechnicianCard`. Map toggle (web: Mapbox GL; mobile: react-native-maps) showing privacy-grid pins, not exact locations. Empty state + load-more. Hook: `useTechnicianSearch(filters)` from `packages/data`.

**TechnicianDetailPage**
> Create `TechnicianDetailPage`. Above-fold: cover, avatar, name, level badge, verified ribbon, "立即预约" sticky CTA. Tabs: 介绍 / Services & prices / Reviews (sortable by §8 spec) / Posts. Show certifications (license type + verifier + date), trust score (composite — do not break out sub-scores), insurance badge. CTA opens `BookingSheet` (see component below). Source: `useTechnician(id)`.

**OrderPage**
> Create `OrderPage` (booking flow). Steps: (1) service & duration, (2) date/time slot (from `useTherapistAvailability`), (3) address (with privacy-grid resolution + door access note), (4) coupon & payment method, (5) confirm. Show price breakdown (service + travel + platform fee) per §13. On confirm → POST `/orders`, navigate to `OrderTrackingPage`. Tracking page polls `/orders/:id` and renders the state machine: requested → accepted → en_route → arrived → in_service → completed → reviewed.

**LivePage**
> Create `LivePage`. Video player (Agora SDK on mobile, hls.js on web fallback), bottom: chat (read-only for unverified viewers), gift rail (P2), follow + book-now CTA pinned to streamer card. Heat counter top-right. T&S overlay if stream gets flagged. Hook: `useLiveSession(streamId)`.

**ProfilePage**
> Create dual `ProfilePage`: customer mode (orders, coupons, addresses, membership, favorites) vs. therapist mode (today's schedule, earnings, level progress, content queue, T&S inbox). Mode switch top-right (only visible if user has therapist role). All data via `useCurrentUser()` + role-specific hooks.

#### 18.3.2 Reusable Components (`packages/ui`)

> Generate cross-platform components in `packages/ui` — each must export the same prop interface for web (`.tsx` / Tailwind) and mobile (`.native.tsx` / NativeWind):
> - **`TechnicianCard`** — avatar, name, level badge, rating, distance, price-from, verified-ribbon, primary CTA.
> - **`LiveCard`** — cover thumbnail, streamer avatar, heat counter, "LIVE" badge, tap → `LivePage`.
> - **`BookingSheet`** — bottom sheet wrapping the 5-step `OrderPage` flow.
> - **`Button`** — variants: primary (teal), secondary (outline), ghost, destructive; sizes sm/md/lg; loading state; full-width prop.
> - **`Card`** — surface container with elevation tokens; header/body/footer slots.
> - **`Avatar`** — image + initials fallback; verified ring overlay.
> - **`Tag`** — neutral / success / warning / danger / info; rounded-full.
> - **`PriorityBadge`** — P0/P1/P2/P3 using the colors already used in this PRD site.

#### 18.3.3 State & Mock APIs (`packages/data`)

> In `packages/data`, scaffold:
> - **Zustand stores**: `useAuthStore`, `useBookingDraftStore`, `useLiveViewerStore`.
> - **React Query hooks** (one file per resource): `useNearbyTechnicians`, `useTechnician`, `useTechnicianSearch`, `useTherapistAvailability`, `useOrder`, `useLiveSession`, `useCurrentUser`, `useFeed`. Each hook reads from `apiClient` (typed fetch with auto-refresh).
> - **Mock fixtures** under `/mock`: `mockTechnicians.ts` (≥30 records covering all 5 customer personas), `mockOrders.ts` (one per order state), `mockLiveSessions.ts`, `mockPosts.ts`. Fixtures must satisfy the TS types in `packages/core/types`.
> - **MSW handlers** under `/mock/msw` so storybook & Playwright tests run without a backend.

#### 18.3.4 Backend Endpoints (`/backend`)

Use one prompt per NestJS module. Each module should produce: DTO + Zod schema + controller + service + Prisma model + e2e test.

> **Auth** — `POST /auth/otp/request`, `POST /auth/otp/verify` → JWT + refresh. Therapist signup creates a `pending_review` user; only T&S can flip to `active`.
>
> **Orders** — `POST /orders` (creates → state `requested`), `POST /orders/:id/accept` (therapist), `POST /orders/:id/transition` (en_route / arrived / in_service / completed), `GET /orders/:id`, `GET /orders?role=customer|therapist`. State machine enforced server-side; reject illegal transitions with 409.
>
> **Payments** — `POST /payments/intents` (returns Stripe / Alipay intent), `POST /payments/webhooks/stripe`, `POST /payments/webhooks/alipay`. Webhook handlers are idempotent (use payment-intent ID as dedupe key). On successful capture → mark order `paid`, schedule T+24h escrow release job.
>
> **Live** — `POST /live/sessions` (therapist starts stream → returns Agora token), `POST /live/sessions/:id/heartbeat`, `POST /live/sessions/:id/end`, `GET /live/sessions?status=live`, WS gateway `/live/:id` for chat & gift events. Rate-limit gifts per viewer per minute.
>
> **Notifications** — `POST /notifications/devices` (register FCM/APNs token), internal `notify(userId, template, data)` service used by other modules. Templates: `order.accepted`, `order.en_route`, `order.completed`, `live.started_by_followed`, `ts.alert`.
>
> **Trust** — `POST /trust/kyc` (therapist uploads ID + license; queued for ops review), `POST /trust/reports` (any user can report content/user), `POST /trust/leak-detection` (called by IM module on message send).

#### 18.3.5 Recurring Tasks — Polish, Debug, Translate

> **UI polish prompt** — "Refine `<Component>` for visual consistency with the rest of the app. Use teal `#0d9488` for primary actions, amber `#d97706` for therapist-side accents. Spacing: 4/8/12/16/24/32. Border-radius: 8 (cards) / 12 (sheets) / 999 (badges). Add focus rings for accessibility. Do not introduce new colors."
>
> **Bug-fix prompt** — "Given the error in `<file>:<line>`, identify the root cause and propose the minimum change. Do not refactor surrounding code."
>
> **Localization prompt** — "Extract all hard-coded strings in `<file>` into the `i18n` dictionary. Add both `en` and `zh` translations. Use namespace `<module>.<screen>.<key>`."

### 18.4 Mock Data Conventions

| File | Shape | Min count | Must cover |
|---|---|---|---|
| `mockTechnicians.ts` | `Technician[]` | 30 | All 5 customer personas (C1–C5); each level L1–L5; at least one per pilot city. |
| `mockOrders.ts` | `Order[]` | 12 | Every state in the order state machine; one disputed order; one with tip. |
| `mockLiveSessions.ts` | `LiveSession[]` | 8 | Live / scheduled / ended; one with a T&S flag. |
| `mockPosts.ts` | `Post[]` | 20 | All 4 content categories; mix of text-only / image / short-video. |
| `mockReviews.ts` | `Review[]` | 50 | Star distribution biased toward 5 but with realistic long tail; one moderated review. |

All fixtures live in `packages/data/mock/` and are tree-shakable. Production code must never import from `mock/`; enforce with an ESLint rule (`no-restricted-imports`).

### 18.5 Agile Development Sequence (8 Sprints to MVP)

| Sprint | Focus | Definition of Done |
|---|---|---|
| **S0 — Foundations** | Repo, CI, env, design tokens, auth scaffolds | `pnpm dev` boots web + mobile + backend; OTP login works end-to-end with mock SMS. |
| **S1 — Therapist & Customer Profiles** | `TechnicianListPage`, `TechnicianDetailPage`, KYC upload | Customer can browse 30 mock therapists; therapist can submit KYC; ops can approve in admin. |
| **S2 — Booking Flow** | `OrderPage`, dispatch logic, escrow stub | Customer can book → therapist sees in queue → both see state transitions. Payment is mocked. |
| **S3 — Payments** | Stripe + Alipay integration, webhooks, escrow release job | Real test-mode payment; T+24h release runs as scheduled job; refunds flow works. |
| **S4 — Content Feed** | Feed surface, post composer, moderation queue | Therapist can post; customer sees feed; ops can hide a post within 60s. |
| **S5 — Live (P1 scope)** | Agora integration, viewer chat, follow + book-now from live | One therapist can stream; viewers can watch and book mid-stream. |
| **S6 — Trust & Safety** | Off-platform leak detection, dispute flow, T&S inbox | Sending a phone number in IM triggers a warning; dispute can be filed, escalated, resolved. |
| **S7 — Hardening & Launch Prep** | Observability, load test, legal review, GTM assets | All P0 features pass acceptance criteria; LCP <2.5s; error rate <0.5%; legal sign-off. |

**Working rhythm.** One vertical slice per sprint, demoed Friday. Cursor / Claude Code generates the first pass of each page or endpoint using the templates in §18.3; engineer reviews, fixes, and commits. Never merge AI output without running the e2e tests for that module.

---

## 19. Appendix

### 19.1 Glossary

- **AOV** — Average order value.
- **Cold-start program** — Set of incentives (placement, coupons, mentorship) that help a new therapist reach their first 10 reviews.
- **Escrow** — Funds held by the platform between charge and T+24h post-service.
- **Live therapist** — A therapist who has passed verification and is visible in customer-facing surfaces.
- **Off-platform contact** — Any attempt to move communication or payment outside the app (phone, WeChat, QR codes, alternative payment).
- **Privacy-grid** — Coarsened geographic cell used to display therapist locations without revealing exact address.
- **Take rate** — Percentage of order value retained by the platform.
- **Therapist trust score** — Composite of rating, on-time, rebook, T&S record; input to ranking.
- **Trust & Safety (T&S) event** — Any logged signal that may warrant moderation, ranging from automated classifier hits to customer reports.

### 19.2 References

- Internal: 2026-04 customer survey (n=312); 2026-05 therapist interviews (n=84); Ops T&S incident review 2025-Q4.
- External: regulator guidance (city-specific, see Legal repository); peer-app teardowns.

### 19.3 Change log

| Version | Date | Author | Change |
|---|---|---|---|
| 0.1 | 2026-05-22 | PM | First outline shared with founders |
| 0.5 | 2026-06-02 | PM | Modules expanded; T&S section added |
| 1.0 | 2026-06-10 | PM | Draft for internal review |
| 1.1 | 2026-06-10 | PM | Added §18 Implementation Playbook (tech stack, mono-repo, Cursor prompt templates, 8-sprint plan) |
