GMI Software
Core areas
Mobile Apps
iOS, Android, React Native
Headless & B2B commerce
Stores, sales platforms, ERP/PIM integrations
AI & Automation
Agents and LLM implementations
Complementary services
E-commerce mobile analyticsProduct Discovery & DesignBackend, API & IntegrationsMaintenance & AuditsDDT process
Don't know what to choose? Order a consultation
Our projects
Case studies and references
App Ideas Library
Use case examples
MobileCore Stack
React Native
E-commerceCore Stack
Service: commerce & B2BAdvanced commerceMedusaJS
Frontend & QA
Next.jsReactTypeScriptPlaywrightMaestro
Backend, DB & Cloud
Node.jsNestJSPostgreSQLDockerAWS
E-commerce Innovation
3D configurators (BabylonJS)AI agents & automationRAG & knowledge basesAI-native software companyView all AI services
View all technologies
About us
Our history and values
Careers
Join our team
Contact
Get in touch
Get in touch
Services
Core areas
Mobile Apps
iOS, Android, React Native
Headless & B2B commerce
Stores, sales platforms, ERP/PIM integrations
AI & Automation
Agents and LLM implementations
Complementary services
E-commerce mobile analyticsProduct Discovery & DesignBackend, API & IntegrationsMaintenance & AuditsDDT process
Don't know what to choose? Order a consultation
Projects
Our projects
Case studies and references
App Ideas Library
Use case examples
Technologies
MobileCore Stack
React Native
E-commerceCore Stack
Service: commerce & B2BAdvanced commerceMedusaJS
Frontend & QA
Next.jsReactTypeScriptPlaywrightMaestro
Backend, DB & Cloud
Node.jsNestJSPostgreSQLDockerAWS
E-commerce Innovation
3D configurators (BabylonJS)AI agents & automationRAG & knowledge basesAI-native software companyView all AI services
View all technologies
Company
About us
Our history and values
Careers
Join our team
Contact
Get in touch
Get in touch
Back to blog
Technology
Updated: July 10, 2026· Originally published: March 5, 2026
23 min read

Next.js commerce in production: how to design caching, PPR, MedusaJS and Core Web Vitals

Mikołaj Lehman, CEO & Founder
Mikołaj Lehman
CEO & Founder

TL;DR - Quick summary

  • Speed drives conversion: studies often cite ~20% conversion loss per extra second - Next.js targets sub-300 ms TTFB when tuned.
  • PPR: ship a static shell immediately, stream cart and recommendations behind React Suspense.
  • MedusaJS v2 + Next.js: headless without Shopify Plus-style ceilings.
  • Budget: GMI Software pairs DDT with a fixed-price guarantee for agreed headless commerce scopes.

The problem: burning Google Ads budget on a blank screen

Performance Max spends tens of thousands. Shoppers tap an ad and wait four seconds for a PDP while the browser downloads a heavy JS SPA or legacy Magento bundle. They bounce - budget evaporates.

GMI Software (16+ years, 120+ European deliveries) rarely saves the day with incremental tweaks. Next.js SSR ships rendered HTML in milliseconds.

SPA vs Next.js App Router - why SEO cares

Two storefront models:

  • Classic React SPA: empty HTML plus a large bundle - the phone downloads, parses, executes, then fetches prices. Outcome: slow on mid-tier devices and weaker SEO.
  • Next.js App Router: the server renders, pulls ERP / API data and returns lightweight HTML. Outcome: faster LCP and greener Core Web Vitals in Lighthouse.

Three production patterns for Next.js commerce (GMI stack)

Patterns that survive Black Friday on AWS ECS or Vercel:

These patterns assume headless commerce with Medusa as the API core - the same stack we run for B2B and high-traffic B2C.

1. Partial prerendering and streaming

We do not block the product shell on personalised rails. Next.js ships static structure (media, copy, CTA) while Suspense streams “bought together” and cart state.

2. ISR with tagged revalidation

Hundreds of thousands of SKUs cannot rebuild on every request. ISR caches PDPs. When ERP prices change we call revalidateTag so only the touched page rebuilds instead of hammering the database on every ad click.

3. Headless with MedusaJS v2

Next.js is the presentation layer. MedusaJS (Node.js) powers APIs for carts, Stripe and rules. The same backend later feeds React Native - roughly 30-40% savings versus a separate mobile backend.

Article graphic: Next.js commerce in production: caching, PPR, MedusaJS and Core Web Vitals
Article graphic: Next.js commerce in production: caching, PPR, MedusaJS and Core Web Vitals

Our MedusaJS development teams pair MedusaJS v2 with Next.js storefronts and shared APIs for React Native apps.

Proven resilience: the SFD example

We stress these ideas in production. SFD (100,000+ downloads, 4.9★, Mobile Trends Awards 2025 nomination) shows the React stack under promo spikes.

Slow shops lose carts. Our DDT sprint (about three weeks of analysis and architecture) ends with a Next.js quote and fixed-price guarantee for the agreed scope. After paid milestones, you own the repository rights.

If storefront performance burns paid media budget, start with a review of frontend, cache and integrations. Explore headless e-commerce delivery

Frequently asked questions

Is Next.js a good choice for production ecommerce?
Yes, if the architecture separates stable content, dynamic data, personalization and checkout. Next.js provides App Router, Server Components, streaming, Cache Components and RUM integration, but commerce still needs a good cache model, BFF and backend integration.
Do PPR and Cache Components replace ISR?
Not in a simple one-for-one way. In the newer App Router model the decision is more granular: some UI can live in the static shell/cache, some can stream behind Suspense, and data can be invalidated by tags. For commerce teams, domain freshness matters more than the name of one technique.
How should a Next.js store invalidate prices and stock?
Safest is domain-based tagging: product, price-list, inventory, category and promotion. ERP/PIM/WMS webhooks should invalidate only the data affected by the change. Checkout and buyer-specific price should not be cached like public product description.
Why pair Next.js with MedusaJS?
Next.js is strong for storefront rendering, UX and performance, while MedusaJS gives a modular commerce core for products, cart, pricing, promotions, checkout, orders and workflows. That avoids recreating commerce logic in React state and keeps code ownership.
How should ecommerce teams measure Core Web Vitals?
Measure field data, not only Lighthouse. The key metrics are LCP, INP and CLS at the 75th percentile of visits, across mobile and desktop. In commerce, segment by page type: PDP, PLP, search, cart, checkout, account and buyer type.
How long does a production Next.js commerce build take?
After DDT, a typical headless storefront with integrations usually takes 3-6 months, while complex B2B commerce with price lists, ERP/PIM/WMS, approval flow and mobile can take longer. Fixed price comes after discovery, once cache, checkout and integration risks are known.

Content updated: July 10, 2026

Share article:

Related articles

Technology

React Native vs native apps in 2026: a business decision, not a technology religion

The right choice does not depend on which framework has louder fans. It depends on product risk: time-to-market, maintenance cost, hardware access, performance, release operations and app-store quality. A practical decision model for CEOs, CTOs and Heads of Product.

Technology

NestJS microservices: when should ecommerce split order processing from a monolith?

A decision guide for CTOs and ecommerce leaders: when to keep the monolith, when to extract order management, and how to use NestJS, RabbitMQ/Redis, Strangler Fig and DDT without checkout risk.

Contact

Let's talk
about the project.

Have an app idea or need technological support? Write to us — we'll prepare a preliminary analysis and estimate within 48h. Projects that go through our DDT process (Discovery, Design & Technology) come with a price guarantee and a fixed-price agreement — a key differentiator for us.

Write to us[email protected]
Visit us
GD
gmi.software Sp. z o.o.ul. Jana Heweliusza 11 / 819
80-890 Gdansk, Poland
NIP: 5252816287KRS: 0000830003
gmi.
ServicesOur projectsBlogBrief assistantContact
LIFAINGI
Mobile Trends Awards 2025 nomination - SFD app
© 2026 gmi.software Sp. z o.o.
Privacy PolicyTerms