DTC E-commerce · Series A 2024 Live

MERN Storefront Rebuild + AI Merchandising

Rebuilt a legacy PHP storefront on Next.js + MongoDB for a DTC e-commerce brand at 50K MAU. Added embeddings-based product discovery driving 3.4× conversion lift.

3.4×
Conversion lift
180ms
TTFB (was 2.1s)
12wk
Idea → live
Stack Next.jsNode.jsMongoDBOpenAI EmbeddingsRedisVercel

The Problem

A DTC brand at 50K MAU was running a 6-year-old PHP storefront that had been patched so many times it was held together with duct tape. TTFB of 2.1 seconds, a checkout flow that dropped 38% of users at step 3, and a search system that returned irrelevant results for anything beyond exact product names.

The founders didn’t just want a port — they wanted AI-powered product discovery. But they also couldn’t afford a 6-month rewrite.

I delivered both in 12 weeks.

Architecture

Frontend — Next.js 14 (App Router)

  • Server Components for product pages (SEO + speed)
  • Client Components only for cart, search, and interactive UI
  • Incremental Static Regeneration for collection pages (30s revalidation)
  • Vercel Edge Network for global CDN

Backend — Node.js + Express API

  • Clean REST API separating concerns from the frontend
  • MongoDB with proper indexing (the old PHP app had none)
  • Redis for session data and cart persistence
  • Stripe for payments (migrated from legacy Braintree)

AI Merchandising — Embeddings-based Discovery

The search and product recommendation system uses OpenAI text-embedding-3-small:

  1. All 4,200 products embedded at ingest (title + description + tags)
  2. User search queries embedded at runtime
  3. Cosine similarity search against product embeddings
  4. Results ranked by semantic relevance × inventory × margin score

This replaced the old exact-match keyword search with semantic understanding. “Casual weekend wear” now returns relevant products even if those exact words don’t appear in any product description.

The Migration Strategy

I ran the new and old systems in parallel for 6 weeks with a feature flag controlling which experience each user sees. This let us:

  • A/B test conversion rates before full cutover
  • Migrate order history and customer data incrementally
  • Roll back instantly if anything broke

Results

  • TTFB: 2.1s → 180ms (92% reduction)
  • Conversion rate: 3.4× lift on semantic search vs. keyword search (A/B tested)
  • Cart abandonment at step 3: 38% → 14%
  • Search-to-purchase rate: 2.1% → 7.8%
  • Timeline: 12 weeks from kickoff to production cutover

What I’d Do Differently

I underestimated the data migration complexity. Product variant data in the old DB was a nested string blob — parsing it took a full week I hadn’t scoped. Always audit the source data schema before estimating a migration.

← Previous Operations Automation Suite Next → Internal Docs Co-Pilot

Want something
like this?

30 minutes, free, no deck. We'll figure out if I'm the right fit for your project.