Component Migration Decision Tree

practitionerDirectory → holistic-health-marketplace — High-Value Component Assessment
Date: 2026-03-26 Source: PD (Next.js 16) → HHM (Next.js 14) 8 Components Assessed 6 Decisions Pending
Strategic Context

Two Projects, One Business Domain

Both projects serve holistic health practitioner discovery and booking — but at different stages. PD is a lean MVP with deep search/discovery UX. HHM is a comprehensive platform with 80+ models and enterprise features. This briefing identifies which PD components should strengthen HHM's core experience.

8
Components Assessed
4
Tier 1: Migrate Now
3
Tier 2: Next Sprint
1
Tier 3: Defer
6
Decisions Pending

Platform Comparison at a Glance

DimensionPD (practitionerDirectory)HHM (holistic-health-marketplace)
FrameworkNext.js 16, React 19Next.js 14, React 18
Models8 entities80+ models
Pages~10 routes70+ pages
AuthClerk (OAuth + webhooks)Auth.js (email/pw, Google, MFA)
PaymentsStripe Connect (initialized)Whop + Capital OS (live)
SearchSQL + faceted counts + geolocationDenormalized docs + cursor pagination
SMSFull lifecycle (cron→send→track→opt-out)Basic (credit system, no automation)
AINoneClaude (session notes, matching)
ComplianceNoneHIPAA (encryption, PHI logs, BAA)
DeployRailwayVercel
Side-by-Side

Where PD Exceeds HHM

Value Assessment Matrix

Feature Coverage Comparison

Component Inventory

8 Components Assessed

COMP-1: Hierarchical Faceted Search UI
Value: HIGHComplexity: MEDIUM

12-category specialty taxonomy (155+ subcategories) with expand/collapse, indeterminate checkboxes, contextual count badges, and disabled-when-zero UX. HHM has flat filters with no counts.

COMP-2: Geolocation Distance Search
Value: HIGHComplexity: LOW

Haversine formula with 3-tier color coding (near/moderate/far), "Near Me" quick filter, auto-request on profiles. HHM has zero geolocation.

COMP-3: Trust Badge System
Value: MED-HIGHComplexity: LOW

5 badge types (Verified, Background Check, Malpractice, HSA/FSA, Top Rated) with ARIA tooltips. HHM has a single credential tier label.

COMP-4: SMS Reminder Full Lifecycle
Value: MED-HIGHComplexity: MEDIUM

Cron-based batch sending, deduplication, Twilio webhook tracking, STOP/opt-out automation, delivery statistics. HHM has basic SMS with credit system but no automation.

COMP-5: Faceted Filter Count Engine
Value: MEDIUMComplexity: MEDIUM

Contextual counts per filter option, practitioner ID deduplication for multi-specialty, rating tier cascading. HHM has no filter counts.

COMP-6: Next.js 16 + React 19 Stack
Value: MEDIUMComplexity: HIGH

Framework upgrade brings async RSC APIs, React 19 concurrent rendering, Tailwind 4. But upgrading 70+ pages is a major undertaking.

COMP-7: Typesense Config
Value: MEDIUMComplexity: LOW

Typesense client with dual keys, HTTPS config, 2s timeout. Both projects need full-text search — PD is ready to activate.

COMP-8: Health Check Endpoint
Value: LOW-MEDComplexity: LOW

Multi-service health check with per-service latency reporting. HHM has a basic health route.

Tier 1: Migrate Immediately

High Value, Low Complexity — 1-2 Days

Tier 1 Migration Flow

COMP-2: Geolocation

Pure utility (geo.ts) + DistanceBadge component + useUserLocation hook. Zero external dependencies. Copy and adapt Tailwind classes.

COMP-3: Trust Badges

Self-contained component tree. Add 3 boolean fields to HHM Practitioner model (malpracticeInsured, backgroundCheckComplete, acceptsHsaFsa).

COMP-7: Typesense

Config + client init only. Aligns with HHM's Phase 1 roadmap (Algolia/Typesense). Real work is collection schema + sync — new dev regardless.

COMP-8: Health Check

Single route file. Adapt to HHM's stack: Neon PostgreSQL, Upstash KV, Vercel health gate.

Tier 2: Next Sprint

High Value, Medium Complexity — 3-5 Days

Tier 2 Migration Dependencies

COMP-1: Hierarchical Filters

Highest UX impact. Self-contained React components but need API response shape adaptation. Migrate with COMP-5 (faceted counts) for full effect.

COMP-5: Faceted Counts

Tightly coupled with search UI. Adapt count logic to HHM's ListingSearchDocument query pattern. Practitioner ID deduplication is the complex piece.

COMP-4: SMS Lifecycle

Map PD's sms_logs schema to HHM's SmsLog/SmsPreference. Convert cron pattern (PD: POST+Bearer → HHM: GET+Vercel cron).

Tier 3: Strategic Decision

Medium Value, High Complexity — 1-2 Weeks

COMP-6: Next.js 16 + React 19 Upgrade

Affects every page and component in HHM. Tailwind 3→4 migration, React 18→19 behavior changes. Should be a dedicated upgrade sprint, not part of feature migration. Defer until after Tiers 1-2 are stable.

Execution Plan

Migration Sequence

Three-Phase Migration Timeline

Migration Decision Tree

Decisions Needed

6 Decisions to Advance Migration

1. Migration Priority
Recommended: Tier 1 immediately, Tier 2 next sprint
Should we batch Tier 1+2 into a single sprint, or execute Tier 1 immediately (1-2 days) then schedule Tier 2 separately?
2. Typesense vs Algolia
Recommended: Typesense (PD config ready, self-hosted option)
PD prepared for Typesense; HHM roadmap mentions Algolia. Which search engine should be the target?
3. Trust Badge Field Management
Recommended: Admin-managed initially, add to onboarding later
Adding malpracticeInsured, backgroundCheckComplete, acceptsHsaFsa to HHM — should these be part of practitioner onboarding or admin-only?
4. SMS Schema Alignment
Recommended: Extend HHM's SmsLog with PD fields
PD's sms_logs vs HHM's SmsLog — merge schemas or keep PD's approach as-is?
5. Next.js 16 Timeline
Recommended: Defer to Q2 2026, after Tiers 1-2 stable
Is the framework upgrade on the roadmap? If so, when should it happen relative to component migration?
6. Geolocation Method
Recommended: Browser geolocation (PD approach) for accuracy
Should "Near Me" use browser geolocation (PD approach, precise) or IP-based geolocation (HHM has geo.ts for EU detection, less precise)?

Capture your decisions in the interactive form →