hitengautami007@gmail.com
All projects

PCNation B2B

Next-Generation Automation-First E-Commerce Architecture

Headless B2B commerce / MedusaJS + Next.js · Live
Visit live site ↗
PCNation B2B storefront
MedusaJS + Next.js / B2BCaptured from the live website
Platform
MedusaJS v2 + Next.js
Role
Developer & Team Lead
Type
B2B
Duration
Ongoing Development

01 / The idea

Next-Generation Automation-First E-Commerce Architecture

PCNation's next-generation platform is being built as a fully headless, automation-first e-commerce solution using MedusaJS v2 for the backend and Next.js for the frontend. This B2B platform separates frontend and backend for unmatched scalability, with an automated product data pipeline processing 50M+ product records and 700M+ attribute values — with zero manual product creation inside the platform.

A fully headless, automation-first B2B commerce platform that eliminates manual product management entirely, delivers AI-powered discovery, and provides enterprise-grade B2B workflows — all at 50M+ product record scale.

50M+Product RecordsHandled by automated pipeline
700M+Attribute ValuesManaged and processed
ZeroManual Product CreationFully automated
10+Custom B2B ModulesQuotes, approvals, ETA & more
Near Real-TimeCMS UpdatesWebhook → Elasticsearch → Frontend
HeadlessArchitectureFully decoupled frontend/backend

02 / In motion

A walk through the storefront

Discovery, product and checkout — recorded in the working website.

1080p screen recording / Live websitePhone-view recording / Live website

03 / The experience

One platform Five perspectives

Inside the experience01 — 05
Arrival
01 / Arrival01 / ArrivalCaptured from the websitePhone view, live site
Footer & service
02 / Footer & service02 / Mobile menuCaptured from the websitePhone view, live site
Discovery
03 / Discovery03 / DiscoveryCaptured from the websitePhone view, live site
Product
04 / Product04 / ProductCaptured from the websitePhone view, live site
Cart & checkout
05 / Cart & checkout05 / Footer & serviceCaptured from the websitePhone view, live site

04 / Engineering decisions

Making room for scale

01

Automated Product Import & Data Orchestration

At the core of the platform is a fully automated product data pipeline powered by Etilize. The custom automation extracts product data from the Etilize database, transforms and maps it into Akeneo PIM product attributes, indexes enriched data into Elasticsearch, and instantly delivers it to the Medusa headless frontend.

  • 50M+ product records stored in Etilize, 700M+ attribute values processed
  • Etilize → Akeneo PIM → Elasticsearch → Medusa frontend pipeline
  • Zero manual product creation or maintenance inside Medusa's admin or database
  • Product associations (related, cross-sell, up-sell) and multi-dimension images automated
  • Product brochures, documentation, and Akeneo attribute mappings all handled
  • Cron-driven automation runs daily with email-based reporting
02

Headless CMS with Payload

For content management, Payload CMS provides clients with a simple, flexible interface to create and manage CMS pages independently. The CMS workflow is 100% automated — content changes trigger webhooks, CMS data is instantly indexed into Elasticsearch, and the Medusa frontend fetches content directly from Elasticsearch. CMS data is never stored inside Medusa's backend.

  • Content changes trigger webhooks instantly
  • CMS data indexed into Elasticsearch for near-instant delivery
  • Complete separation of content and commerce logic
  • Faster performance and cleaner architecture
03

AI-Driven Smart Layered Navigation

Given the massive volume of product data and hundreds of attribute values per product, displaying all possible filters would overwhelm customers. A custom intelligent workflow powered by OpenAI APIs dynamically analyzes product data and category context to determine which attributes are most relevant, which filters add real value, and how to prioritize filter options per category.

  • OpenAI APIs analyze product data to surface the most relevant filters per category
  • Dynamic filter prioritization based on category context and product data
  • Faster and more intuitive product discovery
  • Reduced cognitive overload for customers
  • Scalable filtering logic that adapts automatically as the catalog grows
04

Customer-Specific Special Pricing Engine

A live pricing engine integrated with the ERP system delivers real-time per-SKU pricing across all storefront surfaces. Special prices are per-customer and per-SKU, with automatic expiry logic and guest/user fallback handling.

  • Real-time per-SKU pricing across PLP, PDP, cart, wishlist
  • Special prices come from ERP for specific customer ID + product SKU
  • Only for logged-in customers — guests see standard retail pricing
  • Automatic expiry — falls back to sale/retail price when expired
  • Cart lines updated to special price if valid price found on checkout
05

Full-Featured Favorites / Wishlist System

A complete favorites/wishlist system with add-to-cart, bulk add-all-to-cart, shared wishlist via email token, and seamless integration with special pricing. Fully authenticated and synchronized across the storefront.

  • Add to Favorites from any product page or product card
  • Full management: view, remove, add to cart, add all to cart, share
  • Share favorites via email — recipients get a read-only shared view with standard prices
  • Special pricing integration: favorites show the customer's active special price
  • ADD ALL TO CART iterates all favorites, calculates effective price, adds to cart
  • Auth-gated: unauthenticated users redirected to login when accessing favorites
06

Custom B2B Modules

The platform includes a comprehensive suite of B2B-specific modules built on Medusa v2, covering the full enterprise purchasing workflow.

  • Quotes module: create, submit, approve/reject quotes with pricing
  • Approvals workflow: multi-level order approval based on company rules
  • Company accounts: company registration with employee hierarchy
  • Employee management: roles, permissions, spending limits
  • Warranty handling: product warranty tracking and claims
  • ETA tracking: delivery estimation per product
  • Tax-exempt workflows for qualified B2B buyers
07

Advanced Product Discovery with Elasticsearch

Built advanced product discovery using Elasticsearch-powered APIs with faceted filtering, category-aware search, related search suggestions, and Redis-backed caching for faster repeated queries.

  • Elasticsearch-powered category/search APIs
  • Faceted filtering with multi-select and category-aware behavior
  • Related-search suggestions for improved discovery
  • Redis-backed caching significantly reduces repeated query latency
08

Custom Newsletter Module

A fully custom newsletter system built as a dedicated Medusa v2 module, covering subscription management, transactional email, unsubscribe flow, admin tooling, and storefront integration — with no third-party newsletter service required.

  • Custom Medusa module (backend/src/modules/newsletter/) owns a dedicated newsletter_subscriber table with id (prefix: nws), email, subscribed_at, and status (active / unsubscribed)
  • Store API — POST /store/newsletter accepts an email, returns 409 on duplicate active subscriptions, and automatically reactivates previously unsubscribed addresses
  • Confirmation email sent asynchronously via sendNewsletterConfirmationEmail() on every new or reactivated subscription, with subscriber ID embedded for unsubscribe linking
  • Unsubscribe flow — GET /store/newsletter/unsubscribe?id= marks the subscriber as unsubscribed; paired with a dedicated frontend page at /newsletter/unsubscribe
  • Admin API — GET /admin/newsletter supports listing, searching, sorting, and pagination; enriches each record with a subscriber_no and customer_type (Registered vs Guest) by cross-referencing the Medusa customer table
  • NewsletterForm component in the site footer (storefront/src/modules/layout/templates/payload-footer/newsletter-form.tsx) calls a server action and displays a modal with success, duplicate, or error feedback
  • Register integration — the customer registration page includes a newsletter opt-in checkbox, capturing signups at account creation time

05 / The stack

Built with

MedusaJS v2Next.js 14ReactTypeScriptElasticsearchRedisOpenAI APIAkeneo PIMEtilize ERPPayload CMSWebhook automationNode.jsPostgreSQLTailwind CSS

06 / Experience it

Explore the live platform

Step into the storefront. Set your own pace.

Enter the store ↗