4.4 KiB
4.4 KiB
Website Route Parity Audit
Reference-tenant audit: This audit compares the HomAroma reference tenant's website and SPA routes. It is not a mandatory route set for every DBK Platform tenant.
Scope: read-only comparison of apps/spa/src/App.tsx against apps/website/src/app/**.
Route Matrix
| SPA route | Website route | Status | Notes |
|---|---|---|---|
/ |
/ |
upgraded-m1 | Server-rendered from the CMS page endpoint internally. |
/shop |
/shop |
upgraded-m1 | Server-renders product/category content, preserves coupon handoff, and consumes shop-layout CMS sections around the product grid. |
/category/:id |
/category/[id] |
upgraded-m1 | Server-renders category/product content with dynamic metadata and consumes category-layout CMS sections around the product grid. |
/products/:id |
/products/[id] |
upgraded-m1 | Server-renders product details and metadata, and consumes product-detail-layout CMS sections around the product content. |
/coupons |
/coupons |
upgraded-m1 | Uses internal links, consumes coupons-layout CMS sections, and exposes coupon API error state. |
/checkout |
/checkout |
partial-m1 | Client checkout creates pending orders through POST /orders, supports settings shipping fee, promotions, coupon validation, saved addresses, points, local order history, and checkout-layout CMS sections. Payment/slip upload remains deferred to /order/[id] follow-up. |
/order/:id |
/order/[id] |
partial-m1 | Server-renders order status, item summary, tracking number, and order-success-layout CMS sections. Payment/upload actions are intentionally deferred. |
/track |
/track |
upgraded-m1 | Replaces redirect with order tracking form, POST /orders/track, device order history, and track-order-layout CMS sections. |
/wishlist |
/wishlist |
upgraded-m1 | Client wishlist store now matches SPA storage key, supports add/remove from product cards, and consumes wishlist-layout CMS sections. |
/search |
/search |
upgraded-m1 | Server-renders search results, guards repeated query params, and consumes search-layout CMS sections around the search UI. |
/scent-guide |
/scent-guide |
upgraded-m1 | Server-renders article index, consumes scent-guide-layout CMS sections, and exposes article API error state. |
/article/:slug |
/article/[slug] |
exists-needs-upgrade | Exists with dynamic metadata and notFound; needs HTML sanitization review. |
/profile |
/profile |
partial-m1 | Client profile dashboard uses SPA-compatible auth storage, order history, address CRUD, contact settings, and profile-layout CMS sections. LIFF initialization for website remains a follow-up dependency. |
/:slug |
/[slug] |
upgraded-m1 | Server-renders published single-segment CMS pages with reserved route collision guard. |
* |
default Next behavior | missing | No custom not-found.tsx currently exists. |
Top Website-Only Risks
| Risk | Severity | Impact |
|---|---|---|
| Missing legacy classes/design tokens | High | M1 visual cleanup removed night-*, cyan-glow, and glass from website source classes; remaining visual risk is manual UI verification across breakpoints. |
| Hardcoded production URLs | Medium | Initial coupon page issue is fixed; continue checking remaining legacy pages during Phase 6. |
| Silent API fallbacks | High | M1 SEO routes now expose explicit error states in key product listing flows; remaining legacy pages still need review. |
| Client-only SEO weakness | High | M1 fixed /shop, /category/[id], /search, /track, /wishlist, /profile, /checkout, and read-only /order/[id]; remaining auth/payment flows are still later-phase work. |
| Client-side pricing trust | High | Checkout follows the SPA contract, but backend still trusts client-provided subtotal, discounts, points, shipping, and total. Server-side pricing validation should be owned by backend before production-grade payment rollout. |
| Image optimization debt | Low | M1 intentionally keeps <img> until image hosting/CDN policy is finalized; next/image should be revisited after images.remotePatterns can be configured safely. |
Recommended Order
- Stabilize website-local data helpers.
- Add website CMS renderer and upgrade
/. - Upgrade
/products/[id]. - Convert
/shopand/category/[id]to SSR shell plus client islands. - Add CMS custom
/:slugsupport with explicit collision rules. - Add missing commerce/client routes after SEO pages are stable.