Skip to content
PRSINDIA

Kesari & Co.

A headless D2C replatform that took LCP from 4.9s to 1.6s

Shopify to headless Next.js, a promotion engine marketers can author, real-time inventory with a reservation ledger, and an ONDC adapter kept deliberately off the D2C critical path.

Client
Kesari & Co.
Industry
D2C Retail & Beauty
Location
Mumbai, India
Duration
16 weeks

0s

Largest Contentful Paint on mid-tier Android, down from 4.9s

0% lift

Higher mobile conversion rate, same traffic mix

0% smaller

Less JavaScript shipped before first paint

0

Oversells across four flash drops post-launch

01

The challenge

Kesari & Co. sells ayurvedic skincare direct to consumers — 2,300 SKUs once you multiply shade by size, ₹40 crore of annual GMV, and 74% of their traffic arriving on a mid-range Android phone over a patchy 4G connection. They had outgrown their Shopify theme in every direction at once.

The storefront was the bottleneck

Largest Contentful Paint on a Redmi-class device over throttled 4G was 4.9 seconds. Core Web Vitals were failing on every template that mattered. The cause was not mysterious: fourteen Shopify apps were each injecting their own script bundle, and the storefront was shipping ~900 KB of JavaScript before a single product image appeared. Every app had been added to solve a real problem, and collectively they were the problem.

Three constraints an off-the-shelf theme could not satisfy

  • Their promotion logic had outgrown the platform. Build-your-own-routine bundles with tiered discounts, subscribe-and-save, and a loyalty tier multiplier — expressed as rules the marketing team could author themselves. The theme-level discount tooling they were using could not express it, so they were running promotions by manually creating and destroying variants. In one Diwali campaign this produced a bundle that could be bought for less than the cost of one of its components.
  • Inventory truth lived somewhere else. Stock synced from their 3PL's warehouse system on a six-hour cron. During a flash drop, six hours is an eternity: they oversold a hero SKU by 400 units on one launch and spent three weeks apologising.
  • ONDC was coming. They wanted to list on the Open Network for Digital Commerce without bolting a second, divergent catalogue onto the side of the business — and without letting network traffic anywhere near the funnel that pays the bills.

The brief they arrived with was "rebuild our store". The brief we agreed on was narrower and more useful: get the storefront off the platform's rendering path, get promotions into a rules engine, get inventory to real time, and make ONDC an adapter rather than a fork.

02

What we built

Headless — but we kept Shopify

The loudest decision on this project was the one we refused. We did not migrate them onto a bespoke commerce core. Shopify's checkout is PCI-audited, battle-tested against fraud, and handles Indian payment methods and tax edge cases that would have quietly consumed six months of our time and produced a worse result. Owning the checkout would have won us control we did not need and handed us a liability we did not want.

So: Shopify stays as the commerce backbone — catalogue of record, checkout, payments, orders. Everything the customer sees before the checkout is a Next.js storefront talking to the Storefront API, statically generated with on-demand revalidation triggered by product and inventory webhooks. Product pages are served from the edge as HTML; a catalogue that changes weekly has no business being assembled per request.

Cutting 900 KB down to 180 KB

We removed the fourteen apps. Three of them mattered — reviews, subscriptions, analytics — and we reimplemented those as first-party integrations rendered server-side. The rest were replaced by things the platform already does. First-load JS went from ~900 KB to 180 KB. Images moved to a responsive AVIF/WebP pipeline with correct sizing per breakpoint, because on a 4G Android phone the image pipeline is the performance strategy.

A promotion engine the marketing team can actually use

Bundle and tier rules are authored in a Laravel admin — a small, versioned rules DSL with a preview mode that shows the resulting price before publishing. Rules compile down to Shopify Functions that execute inside the checkout, so the discount the customer sees in the cart is computed by the same code that computes the discount they pay. Two sources of pricing truth is how you end up selling a bundle below cost.

Real-time inventory and a reservation ledger

The six-hour cron is gone: the warehouse system now pushes stock deltas by webhook. On top of that sits a reservation ledger in Redis — adding to cart during a flash drop takes a time-boxed hold against available stock, and the hold expires if checkout is abandoned. This is the difference between "we think we have stock" and "we have reserved your unit".

ONDC as an adapter, off the critical path

The Beckn protocol endpoints (search / select / init / confirm / status) live in a separate Laravel service that maps network calls onto the same Shopify catalogue and order APIs. Deliberately separate: the network's traffic patterns are outside the client's control, and a burst of network search calls must never be able to degrade the D2C funnel. One catalogue, two front doors, independent blast radii.

03

The outcome

We cut over in two stages — collection and product pages first, running on 20% of traffic behind a split for eleven days, then the rest. There was no big-bang weekend.

Speed turned directly into revenue

  • LCP on a mid-tier Android over throttled 4G: 4.9s → 1.6s. All Core Web Vitals green, on mobile, on the templates that actually carry traffic — not just on the homepage that everyone benchmarks.
  • Mobile conversion rate rose 34% over the eight weeks following full cutover, measured against the same traffic mix. Nothing else changed in that window: no new creative, no new discount structure, no new acquisition channel. This is the cleanest read we have ever had on the value of a fast storefront.
  • 80% less JavaScript shipped before first paint. The number that mattered more internally: their marketing team can no longer accidentally add 60 KB of blocking script by installing an app, because there are no apps.
  • Zero oversells across four subsequent flash drops, including one that moved 3,100 units in nine minutes. The reservation ledger held.

What changed for the business

Promotions that used to take a developer and two days now take a marketer and twenty minutes, and the preview mode has caught three pricing mistakes before they reached a customer — including one that would have repeated the Diwali below-cost bundle almost exactly.

They went live on ONDC four months later. That was a two-week piece of work, not a replatform, because the adapter was already sitting there speaking to the same catalogue. That is the entire argument for building it as an adapter, and it is worth more than any performance number on this page.

Under the hood

How it's built.

Technology

  • Next.js
  • React
  • TypeScript
  • Shopify Storefront API
  • Shopify Functions
  • Laravel
  • Redis
  • MySQL 8
  • Beckn / ONDC Protocol
  • Cloudflare
  • Vercel
  • AVIF / WebP pipeline

Services used

  • Ecommerce Development
  • Web Development
  • Performance Engineering
  • API Integration
  • UI/UX Design

Every agency we spoke to wanted to rebuild our checkout. PRS was the only one that told us not to — and then explained, in detail, why. They talked us out of the most expensive thing on the table.

Ananya Bhatt Founder & CEO, Kesari & Co.

Same problem?

Let's build something that ships.