Key Takeaways
- Beyond Google SEO: Success on the Open Network for Digital Commerce (ONDC) requires a shift from traditional SEO to "protocol-level discoverability," optimizing for discovery within the beckn protocol used by Buyer Apps.
- Next.js 15 as the Core: Next.js 15 is the ideal framework due to its server-side rendering (SSR) and Partial Prerendering (PPR) for maximum performance and crawlability, a non-negotiable for ONDC gateways.
- Composable Architecture is Key: A microservices-based architecture featuring a dedicated ONDC Gateway Adapter, Catalog Service, and Inventory Service, fed by a headless ERP, provides the scalability and flexibility needed for complex B2B operations.
- Structured Data is the New Keyword: ONDC discovery relies heavily on rich, structured data. Your platform must generate detailed, ONDC-compliant schemas for every product, including B2B-specific attributes like HSN codes, GST details, and minimum order quantities.
- The Goal is Pipeline, Not Just Traffic: The architecture must be designed not just for visibility but to facilitate complex B2B transactions, handling real-time inventory, customer-specific pricing, and seamless integration with backend systems.
The Paradigm Shift: From Search Engines to Federated Commerce Discovery
For years, B2B digital strategy has revolved around a single center of gravity: Google. The primary objective of any B2B portal was to rank for high-intent, long-tail keywords. While this remains important, the advent of the Open Network for Digital Commerce (ONDC) represents a fundamental architectural and strategic shift. ONDC is not another marketplace; it's a decentralized network protocol designed to unbundle and democratize digital commerce.
For enterprises, this means your products must be discoverable not just by users on a search engine, but by machines—Buyer Apps and ONDC Gateways—across a federated network. This is the concept of protocol-level discoverability. Your platform's ability to respond to network search queries (/on_search requests) with speed, accuracy, and richly structured data will directly determine your commercial success in this new ecosystem.
This is no longer just a marketing challenge; it is a core architectural problem. Building a successful B2B presence on ONDC requires an application architecture designed from the ground up for performance, scalability, and semantic accuracy. This blueprint outlines how to build such a B2B Product Discovery Platform using Next.js 15, the definitive framework for this new era of digital commerce.
Choosing the right frontend framework is a critical decision that impacts performance, SEO, and developer velocity. For the unique demands of an ONDC platform, Next.js 15 emerges as the clear leader. Its architecture is intrinsically aligned with the requirements of a high-performance, discoverable B2B engine.
Unmatched Performance with SSR and Partial Prerendering (PPR)
ONDC gateways and Buyer App backends have low-latency expectations. A slow response to a search query can mean your products are simply not displayed. This makes client-side rendering (CSR), common in traditional SPAs, a non-starter. Next.js 15's server-side rendering (SSR) ensures that a fully-rendered HTML page is delivered on the first request. This is crucial for:
- Protocol Crawlability: ONDC network participants receive complete product information instantly, without needing to execute JavaScript.
- User Experience: For buyers who land directly on your product pages, the perceived performance is significantly better, reducing bounce rates.
Next.js 15's new Partial Prerendering (PPR) feature offers the best of both worlds: a static, instantly-served shell for the majority of the page, with dynamic "holes" streamed in. For a B2B product page, this means the product description and specifications can be static, while real-time inventory and customer-specific pricing are streamed in dynamically, providing an optimal blend of speed and real-time data accuracy.
SEO-Native Architecture
Next.js was built with SEO in mind. The App Router provides a clear, file-based routing system that maps directly to your site structure. More importantly, the built-in Metadata API allows for granular, dynamic control over <title>, <meta description>, and crucially, JSON-LD structured data on a per-page basis. This is the technical foundation for implementing the ONDC-specific schemas required for protocol-level discovery.
Incremental Static Regeneration (ISR) for Dynamic Catalogs
B2B catalogs can contain tens of thousands of SKUs. While product specifications might not change frequently, pricing and availability can. Building every page on every request (pure SSR) can be computationally expensive. ISR allows you to pre-render product pages at build time and then automatically regenerate them in the background after a specified time-to-live (TTL) or on-demand when data changes. This strategy provides the performance of a static site with the data freshness required for a dynamic B2B catalog, significantly reducing server load and improving TTFB.
Server Actions for Secure & Performant Backend Operations
Next.js Server Actions allow you to run server-side code directly from client components, eliminating the need to manually create and manage dedicated API endpoints for many operations. For a B2B platform, this can simplify interactions like:
- Checking real-time stock from an Inventory microservice.
- Adding a complex product configuration to a cart.
- Submitting a request for a quote (RFQ).
This co-location of logic improves developer experience and can reduce the overall architectural complexity.
Architectural Blueprint: A Composable B2B Discovery Engine
A monolithic approach is ill-suited for the dynamic and scalable needs of an ONDC platform. We advocate for a composable, microservices-based architecture where each component has a single responsibility. This ensures resilience, independent scalability, and easier maintenance.

The Next.js 15 Frontend Layer
This is the user-facing and protocol-facing component. It's responsible for rendering product pages, handling user interactions, and exposing ONDC-compliant data.
- App Router Structure: Use the App Router for clean segmentation.
/products/[category]/[slug]: Dynamic routes for product detail pages (PDPs), rendered using SSR or ISR.
/categories/[slug]: Server-rendered product listing pages (PLPs) with faceted search.
/about, /contact: Static pages for marketing and corporate information.
- React Server Components (RSCs): Leverage RSCs to fetch data directly from your backend microservices on the server, keeping your client-side bundle lean and fast. This is the modern way to build data-driven components in Next.js.
The ONDC Gateway Adapter Service
This is the most critical piece of middleware in the ONDC context. It's a dedicated service that acts as the translator between the ONDC network and your internal systems.
- Responsibilities:
- Ingesting ONDC search requests (
/search).
- Translating these requests into queries for your internal Catalog and Search services.
- Aggregating product, pricing, and inventory data.
- Formatting the response into the precise ONDC schema (
/on_search).
- Managing the entire ONDC transaction lifecycle (
/select, /init, /confirm, etc.).
- Technology Choice: Build this with a high-performance, type-safe language like Kotlin (using Ktor) or TypeScript (using NestJS). Asynchronous, non-blocking I/O is essential to handle high-concurrency network requests.
Core Microservices: Decoupling for Scale
- Catalog Service: The single source of truth for all product information—descriptions, specifications, images, and B2B-specific attributes. It exposes a clean internal API for the Next.js frontend and the ONDC Adapter.
- Inventory Service: Provides atomic, real-time stock levels across multiple warehouses or locations. This service must be highly available and consistent to prevent overselling.
- Pricing Service: Manages the complexity of B2B pricing. It handles logic for volume-based discounts, contract pricing, tiered pricing, and GST calculations.
- Search & Indexing Service: To power both internal site search and rapidly respond to ONDC queries, use a dedicated search engine like Elasticsearch or Meilisearch. This service indexes data from the Catalog Service and provides sub-second query responses.
Headless ERP/PIM as the Single Source of Truth
Your microservices architecture must be fed by clean, reliable data. A headless ERP (like ERPNext) or Product Information Management (PIM) system should serve as the master data source. This decoupling ensures that your operational backend can evolve independently from your customer-facing discovery platform.
Mastering Protocol-Level SEO for ONDC Discoverability
Simply being on the ONDC network is not enough. You must be discoverable. This requires a technical SEO strategy that prioritizes structured data and protocol compliance over traditional keyword optimization.
The Beckn Protocol & Structured Data
ONDC is built on the beckn protocol. Discoverability is determined by how well your /on_search responses are structured according to the specifications defined by your domain (e.g., the B2B retail domain). Your product data must be semantically rich and unambiguous.
This involves going far beyond standard schema.org properties. For a B2B product, your structured data must include:
hsn_code or sac_code
gst_per (applicable GST percentage)
min_order_quantity and max_order_quantity
fulfillment_details (serviceable areas, lead time)
- Technical specifications as key-value pairs

Dynamic Metadata Generation at the Edge
Next.js 15's generateMetadata function is the perfect tool for this. You can define this async function in your page.js file for product details. It can fetch product data and dynamically construct the complex JSON-LD schema required by ONDC, ensuring every product page is perfectly optimized for both Google and the ONDC network.
// app/products/[...slug]/page.js
export async function generateMetadata({ params }) {
const product = await getProductData(params.slug);
const ondcSchema = {
'@context': 'https://schema.org',
'@type': 'Product',
name: product.name,
description: product.description,
sku: product.sku,
// ... other standard properties
'custom:hsn_code': product.hsnCode,
'custom:min_order_quantity': product.minOrderQty,
};
return {
title: product.name,
description: product.metaDescription,
other: {
'json-ld': JSON.stringify(ondcSchema),
},
};
}
Beyond Keywords: Focusing on Attributes and Fulfillment Signals
B2B procurement is attribute-driven. Buyers search for specific part numbers, compliance standards, material grades, or delivery times. Your architecture must index every relevant attribute and make it available to the ONDC Gateway Adapter. Fulfillment signals—such as your warehouse locations and delivery TAT—are equally critical and can be the deciding factor for a buyer.
Deploying such a comprehensive platform should be an iterative process.
Phase 1: Core Catalog and ONDC Compliance
Focus on building the foundational components: the Next.js frontend with SSR/ISR for product pages, the Catalog Service, and a baseline ONDC Gateway Adapter that correctly handles /search and /on_search. The goal of this phase is to get your catalog visible and correctly indexed by ONDC network participants.
Phase 2: Advanced Search and Transactional Capabilities
Integrate the Elasticsearch service to enable advanced, faceted search on your own site. Enhance the ONDC Gateway Adapter to manage the full transactional lifecycle (/select through /on_confirm), integrating with the Pricing and Inventory services in real time.
Monitoring and Optimization
Your observability stack is critical.
- Performance: Use Vercel Analytics or integrate OpenTelemetry to monitor Core Web Vitals (LCP, INP, CLS) and, most importantly, server response times (TTFB).
- ONDC Interactions: Create a custom dashboard to monitor the volume, latency, and error rates of all ONDC API calls. This is your primary lens into your platform's health on the network.
- KPIs: Track ONDC Search Impression Rate, Click-Through Rate (from Buyer App to your product page), and ultimately, the conversion rate through the ONDC transaction flow.

Frequently Asked Questions (FAQ)
Q1: How does this architecture handle real-time inventory for thousands of SKUs?
The Inventory Service is designed for this specific purpose. It uses an in-memory database like Redis for fast lookups and a durable database (like PostgreSQL) for persistence. The Next.js frontend can use Partial Prerendering (PPR) or client-side fetching for the inventory component, ensuring the main page loads instantly while the stock level is fetched in real time without blocking rendering.
Q2: Can we integrate this Next.js 15 front-end with our existing legacy ERP system?
Yes. This is the primary benefit of the headless, microservices-based approach. We would build an "anti-corruption layer" service that communicates with your legacy ERP's API (or database, if necessary) and exposes a clean, modern API for the rest of our microservices to consume. This isolates the new platform from the complexities of the legacy system.
Q3: What's the difference between discoverability on Google vs. discoverability on ONDC?
Google's discovery is based on crawling and indexing publicly accessible web pages, relying on content quality, keywords, and backlinks. ONDC's discovery is API-driven and protocol-based. It's about your system's ability to respond to structured queries from other machines on the network with perfectly formatted, attribute-rich data in real time. While a good Google presence helps, ONDC success is a separate technical challenge.
Q4: How do we ensure our ONDC product data is secure and compliant with the DPDP Act?
The architecture is designed with security in mind. The ONDC Gateway Adapter acts as a secure gateway, preventing direct access to your internal services. All PII (Personally Identifiable Information) from buyers is handled strictly within the transactional context and is subject to the consent framework required by the DPDP Act. We implement robust logging, encryption-in-transit (TLS 1.3), and access control measures at every layer of the stack.
Ready to build your strategic advantage on ONDC?
The shift to a federated commerce network is a once-in-a-generation opportunity. Architecting your B2B platform correctly from the start is the key to capturing market share and building a resilient, future-proof digital presence.
At Induji Technologies, we specialize in designing and building high-performance, enterprise-grade applications using modern stacks like Next.js 15 and Kotlin. Our expertise in both complex backend engineering and the emerging ONDC protocol makes us the ideal partner to build your B2B product discovery engine.
Contact us today for a comprehensive architectural consultation and to request a quote.