17
Items Completed
22
Items Pending
Overall Launch Progress44%

✅ Completed

AreaDetail
Headless architectureNext.js → WooCommerce REST API wired up
Shared authenticationNextAuth session cookie on .train5d.com domain
Auth redirect stubs/auth/login and /auth/register redirect to main auth
WP admin accessCustom login URL at shop.train5d.com/login — no plugin needed
WP login brandingMatches Next.js auth form (Poppins, pill inputs, logo)
Maintenance page503 page live — admins bypass automatically
Stripe integrationCheckout flow with Stripe Elements
Product pages/product/[slug].tsx — PDP with variants
Category pages/shop/[category].tsx
CartClient-side cart with WooCommerce sync
Order confirmationPost-purchase page
Account dashboard/account/index.tsx
Order history/account/orders.tsx
Shipping ratesCustom REST endpoint in mu-plugin → WooCommerce calculator
Image migrationR2 migration script (migrate-images-to-r2.py)
KlaviyoPlugin installed on WP backend
Redis cachePlugin installed on WP backend
SEORank Math installed on WP backend

🔴 Pending — Pre-Launch

AreaItem
AuthConvert /auth/login to redirect stub (like training/blog)
AuthConvert /auth/register to redirect stub
Product FeedsCollect API credentials — see credentials checklist
Product FeedsBuild Node.js sync script → Meta/Facebook catalog
Product FeedsBuild Node.js sync script → Pinterest catalog
Product FeedsBuild Node.js sync script → Google Merchant Center
Product FeedsSet up nightly cron / PM2 scheduled jobs
Storefront UIHomepage hero / featured products section
Storefront UISearch / filter on category pages
Storefront UIProduct image gallery (multiple images, zoom)
Storefront UIReviews / ratings display
Storefront UIUpsells / related products on PDP
Storefront UIWishlist / save for later
CheckoutGuest checkout flow
CheckoutCoupon / discount code field
CheckoutAddress autocomplete
CheckoutOrder tracking page
AccountProfile edit (name, email, password)
AccountSaved addresses
AccountReorder from order history
EmailKlaviyo order confirmation flow
EmailAbandoned cart + win-back sequences
OpsProduction deployment pipeline & domain cutover plan
Check items off as you complete them. State is saved in your browser.

🔐 Auth

📡 Product Feed Sync

🛍 Storefront UI

💳 Checkout & Payments

👤 Account

📧 Email (Klaviyo)

🚀 Operations

Request Flow

Customer Browser
  
Next.js Frontend (dev.shop.train5d.com · PM2: shop-frontend · id:57)
                                      
WooCommerce REST API   Stripe         NextAuth
shop.train5d.com/wp-json/wc/v3  Payments  Shared .train5d.com cookie

WooCommerce runs on production server 64.225.9.200 as a data/order backend only. The Next.js app is the customer-facing frontend. Users log in once at dev.train5d.com/auth/login — session cookie works across all subdomains.

WooCommerce Backend (Production)

ComponentDetail
Server64.225.9.200 — DigitalOcean Droplet
Path/var/www/shop.train5d.com/public_html/
Custom login URLshop.train5d.com/login — handled in mu-plugin (no plugin)
Maintenance mode503 for non-admins via t5d-maintenance.php
Shipping ratesCustom REST endpoint /wp-json/train5d/v1/shipping-rates
PluginsWooCommerce, Klaviyo, Redis Cache, Rank Math

Next.js App (/app)

PathPurpose
pages/index.tsxHomepage / storefront
pages/shop/[category].tsxCategory listing page
pages/product/[slug].tsxProduct detail page with variants
pages/cart.tsxShopping cart
pages/checkout.tsxStripe checkout
pages/order-confirmation.tsxPost-purchase page
pages/account/index.tsxAccount dashboard
pages/account/orders.tsxOrder history
pages/auth/login.tsxLogin (redirects to dev.train5d.com)
pages/auth/register.tsxRegister (redirects to dev.train5d.com)
pages/admin/login.tsxWP admin redirect
pages/api/API routes: auth, checkout, promos
middleware.tsAuth guard for /account and /admin
ecosystem.config.cjsPM2 process config

WooCommerce Backend (/public_html)

PathPurpose
wp-content/mu-plugins/train5d-headless.phpCustom login URL slug, shipping REST endpoint, branded login CSS/JS
wp-content/mu-plugins/t5d-maintenance.phpMaintenance mode (503) with admin bypass
wp-content/plugins/woocommerce/WooCommerce core
wp-content/plugins/klaviyo/Email marketing integration
wp-content/plugins/redis-cache/Object cache
wp-content/plugins/seo-by-rank-math/SEO

Root Level

FilePurpose
product-feed-credentials.mdAPI credentials checklist for Google / Meta / Pinterest feeds
migrate-images-to-r2.pyScript to migrate WP media to Cloudflare R2
launch-plan.htmlThis file
README.mdPlain text version of this plan

⚡ Development Commands

cd /var/www/dev.shop.train5d.com/app

npm run dev        # Dev server
npm run build      # Production build

pm2 restart shop-frontend   # Restart (PM2 id: 57)
pm2 logs shop-frontend
pm2 status

🖥 Production WP Server (SSH)

ssh root@64.225.9.200
cd /var/www/shop.train5d.com/public_html

# WP CLI
wp plugin list --allow-root
wp option get siteurl --allow-root

# mu-plugins (always active, no activation needed)
ls wp-content/mu-plugins/

# Edit custom mu-plugin
nano wp-content/mu-plugins/train5d-headless.php

🔌 WooCommerce REST API

Base URL:  https://shop.train5d.com/wp-json/wc/v3
Products:  GET /products
Orders:    GET /orders
Shipping:  POST /wp-json/train5d/v1/shipping-rates  (custom)

Credentials in app/.env.local as WC_CONSUMER_KEY and WC_CONSUMER_SECRET.

🗂 Key Config Files

FilePurpose
app/.env.localAll secrets — NextAuth, WooCommerce, Stripe
app/next.config.jsNext.js config, image domains
app/middleware.tsAuth protection for /account and /admin
app/ecosystem.config.cjsPM2 process config
mu-plugins/train5d-headless.phpCustom login URL + shipping REST endpoint + login branding
mu-plugins/t5d-maintenance.phpMaintenance mode

Frontend

FrameworkNext.js 15 (React)
LanguageTypeScript
StylingSCSS
AuthNextAuth.js — shared .train5d.com cookie
PaymentsStripe + @stripe/react-stripe-js
StorageAWS S3 / Cloudflare R2
StateReact hooks + context
IconsLucide React

Backend (WooCommerce)

CommerceWordPress + WooCommerce
ServerNginx + PHP-FPM
HostDigitalOcean (64.225.9.200)
CacheRedis
EmailKlaviyo
SEORank Math

DevOps

Process ManagerPM2 (id: 57, shop-frontend)
Web ServerNginx (reverse proxy)
SSLLet's Encrypt
Nodev20.x