←All articles
Веб-разработка & E-Commerce2026-11-18 · 9 min

Desarrollo de E-Commerce y Marketplaces con Next.js 15, Kaspi QR, 1C ERP y Búsqueda IA en Kazajistán y el Mundo

Arquitectura de producción para e-commerce y marketplaces de alta carga en Next.js 15 por Alexander Murdasov (MurdaSoft, VibeCode World): Kaspi QR, sincronización 1C y búsqueda IA con pgvector.

The Modern E-Commerce Engineering Landscape in 2026

The digital commerce and B2B wholesale procurement ecosystem is undergoing a massive transformation. Companies across Kazakhstan (Almaty, Astana, Shymkent), Central Asia, and global markets are rapidly abandoning legacy monolithic architectures (Bitrix, WooCommerce, Magento). By 2026, legacy systems create crippling bottlenecks:

1

Severe Latency Bottlenecks: For catalogs ranging from 30,000 to 150,000 SKUs, traditional monolith page rendering takes 2.5 to 6 seconds, degrading mobile checkout conversion by over 60%.

2

Payment Friction: Regional customers demand instant 1-click checkout via Kaspi QR, while international buyers require Apple Pay, Google Pay, and Stripe Elements. Forcing manual 16-digit card entry leads to an immediate 70% cart abandonment rate.

3

Database Freezes during ERP Sync: Synchronizing inventory and wholesale price tiers directly against relational production databases causes 502/504 gateway timeouts during peak sales hours.

4

Loss of Organic AI Search Traffic: Search engines powered by LLMs (Google AI Overviews, Perplexity, ChatGPT Search) prioritize ultra-fast, server-rendered sites with strict Schema.org markup and sub-200ms TTFB.

Drawing from the hands-on engineering experience of Alexander Murdasov (founder of VibeCode World forum and MurdaSoft studio, ex-PM at Kcell B2B, NeuroKids.kz project valuation ~$6M), adopting a headless architecture on Next.js 15 App Router backed by decoupled background queues brings TTFB down to <180ms, isolates ERP synchronization, and boosts checkout conversion by 35–50%.

```

┌────────────────────────┐

│ Next.js 15 App Store │

│ (RSC, ISR, Edge CDN) │

└───────────┬────────────┘

│

┌────────────────────────┴────────────────────────┐

▼ ▼

[Local Checkout: Kazakhstan / CIS] [Global Checkout: USD / EUR]

Kaspi QR (Deeplink / QR) + Freedom Pay Stripe Elements / Apple Pay

│ │

└────────────────────────┬────────────────────────┘

▼

┌────────────────────────┐

│ Next.js Server Actions │

│ Transaction & Webhooks │

└────────────┬───────────┘

│

┌───────────────────────┴───────────────────────┐

▼ ▼

┌────────────────────────┐ ┌────────────────────────┐

│ PostgreSQL + pgvector │ │ Redis + BullMQ Queue │

│ Catalog, Prices, Orders│ │ Async ERP / 1C Gateway │

└────────────────────────┘ └────────────┬───────────┘

│

┌────────────▼───────────┐

│ 1C:Enterprise / ERP │

│ Multi-warehouse Stocks │

└────────────────────────┘

```


4 Core Architectural Pillars of Enterprise E-Commerce

1. Non-Blocking ERP Synchronization via BullMQ and Redis

Rather than executing heavy direct bulk updates on the primary operational database, MurdaSoft’s architecture buffers incoming inventory feeds using Redis Streams and BullMQ queues:

  • •Delta-Based Ingestion: Only modified prices, reserve states, and stock levels are synchronized.
  • •Priority Isolation: Inventory decrements run in High Priority workers, whereas heavy media processing runs in background Low Priority workers.
  • •Granular Cache Invalidation: When a product price changes, Next.js triggers revalidateTag(product-${id}), instantly updating the edge CDN node without rebuilding surrounding pages.

2. Instant Mobile Checkout via Kaspi QR & Multi-Currency Gateways

With mobile commerce driving 85–92% of transactions, checkout UX is tailored for instant conversion:

  • •On Mobile Devices: Tapping "Pay with Kaspi" triggers a native deep-link (kaspi://pay?token=...), immediately launching the banking application with pre-filled billing details.
  • •On Desktop: A dynamic vector SVG QR code is rendered with real-time status polling via Server-Sent Events (SSE). Once scanned and approved, the desktop checkout completes in <800ms.
  • •Idempotent Webhooks: All state mutations enforce unique idempotency tokens (sha256(orderId + amount + secret)), eliminating duplicate debits even during network reconnects.

3. Semantic AI Search Powered by PostgreSQL pgvector

Keyword-matching engines fail when customers input misspellings, colloquial terms, or mixed Kazakh-Russian queries.

  • •Catalog data is vectorized using modern embedding models (bge-m3 or text-embedding-3-small).
  • •Search strings are projected into a 1536-dimensional embedding space and matched via HNSW cosine distance:

SELECT id, title, price FROM products ORDER BY embedding <=> query_vector LIMIT 20;

  • •Catalog search accuracy jumps from 58% to 94%, drastically reducing drop-offs.

4. Incremental Static Regeneration (ISR) on 100,000+ SKUs

Pre-compiling tens of thousands of dynamic product pages during CI/CD builds is impractical.

  • •Next.js 15 leverages generateStaticParams() for the top 1,000 velocity SKUs, serving them instantly from Edge cache.
  • •The remaining 99,000+ SKUs are rendered on-demand during the initial crawler or user visit (On-Demand ISR in <250ms) and permanently cached thereafter.
  • •Result: Perfect Google PageSpeed scores (98–100 desktop, 92–96 mobile).

Production Code: Kaspi QR Checkout & Timing-Safe Webhook Verification

```typescript

// app/api/checkout/kaspi-qr/route.ts

import { NextResponse } from 'next/server';

import crypto from 'crypto';

import { db } from '@/lib/db';

import { orders } from '@/lib/schema';

import { eq } from 'drizzle-orm';

const KASPI_API_URL = process.env.KASPI_API_ENDPOINT || 'https://kaspi.kz/api/payments/create';

const KASPI_SECRET_KEY = process.env.KASPI_SECRET_KEY!;

const KASPI_MERCHANT_ID = process.env.KASPI_MERCHANT_ID!;

export async function POST(req: Request) {

try {

const { orderId, amountKzt, userPhone } = await req.json();

const [order] = await db.select().from(orders).where(eq(orders.id, orderId)).limit(1);

if (!order || order.status !== 'pending') {

return NextResponse.json({ error: 'Order not found or already settled' }, { status: 400 });

}

const payload = {

merchantId: KASPI_MERCHANT_ID,

orderId: String(orderId),

amount: Math.round(amountKzt),

currency: 'KZT',

phone: userPhone,

timestamp: Date.now(),

};

const signature = crypto

.createHmac('sha256', KASPI_SECRET_KEY)

.update(JSON.stringify(payload))

.digest('hex');

const res = await fetch(KASPI_API_URL, {

method: 'POST',

headers: {

'Content-Type': 'application/json',

'X-Signature': signature,

},

body: JSON.stringify(payload),

});

if (!res.ok) {

throw new Error(Kaspi API responded with status ${res.status});

}

const data = await res.json();

return NextResponse.json({

success: true,

qrSvg: data.qrCodeSvg,

deeplink: data.deeplink,

paymentId: data.paymentId,

});

} catch (err: any) {

console.error('[Kaspi QR Error]:', err.message);

return NextResponse.json({ error: 'Payment initialization failed' }, { status: 500 });

}

}

export async function verifyKaspiWebhook(rawBody: string, receivedSignature: string): Promise<boolean> {

const computedSignature = crypto

.createHmac('sha256', KASPI_SECRET_KEY)

.update(rawBody)

.digest('hex');

const trustedBuffer = Buffer.from(computedSignature, 'utf-8');

const receivedBuffer = Buffer.from(receivedSignature, 'utf-8');

if (trustedBuffer.length !== receivedBuffer.length) {

return false;

}

return crypto.timingSafeEqual(trustedBuffer, receivedBuffer);

}

```


Timelines, Investment Budget and ROI

Solution TierArchitecture & IntegrationsTimelineBudget (KZT)Budget (USD)Business Impact
Monobrand E-Commerce MVPNext.js 15, Kaspi QR, Freedom Pay, Telegram Order Alerts, Core SEO2–3 weeksfrom 450 000 ₸~$980+35% mobile checkout conversion, 15-day time-to-market
Enterprise Catalog + 1CNext.js 15, PostgreSQL + Redis, 2-way ERP sync, 100k+ SKUs, ISR4–6 weeksfrom 1 200 000 ₸~$2 6500% inventory mismatches, zero downtime during high-load syncing
B2B Wholesale MarketplaceMulti-tenancy, custom price tiering, e-invoicing, Kaspi + Stripe2–3 monthsfrom 2 800 000 ₸~$6 15070% reduction in manual sales rep overhead, export-ready
AI-Native MarketplaceSemantic AI search (pgvector), WhatsApp AI agent, automated replenishment2.5–3.5 mosfrom 3 600 000 ₸~$7 900+22% average order value, 80% customer inquiries resolved by AI

Step-by-Step Production Roadmap

1

ERP & Catalog Ingestion Audit: Mapping taxonomy hierarchies, warehouse price tiers, and evaluating current ERP throughput limits.

2

Schema & Index Modeling: Building strict PostgreSQL relational models via Drizzle ORM, configuring composite indexes and activating the pgvector extension.

3

Design System & Touch Ergonomics: Implementing responsive Tailwind CSS components strictly optimized for 44×44px mobile touch targets and dark/light modes.

4

Queue & Invalidation Layer: Deploying Redis instances and BullMQ workers to decouple heavy inventory ingestion from customer-facing queries.

5

Payment Gateway Integration: Implementing Kaspi QR with deep-linking, Freedom Pay credit card support, and Stripe for international currency settlement.

6

Agentic SEO & GEO Setup: Generating dynamic Schema.org product graphs and llms.txt manifests for citation in ChatGPT Search, Perplexity, and Google AI Overviews.

7

Stress Testing & Launch: Running high-concurrency synthetic load tests (50,000 simulated shoppers) followed by production deployment compliant with Kazakhstan Personal Data Protection laws.


Frequently Asked Questions (FAQ)

Why does Next.js 15 outperform monolithic platforms like Bitrix or WooCommerce?

Monolithic CMS architectures rely on synchronous, server-heavy PHP execution. When catalog sizes exceed 20,000 SKUs or during major seasonal marketing spikes, database CPU usage spikes to 100%, driving page load latencies to 3–6 seconds. Next.js 15 leverages React Server Components and Incremental Static Regeneration to serve static cached catalog snapshots in under 150ms from edge CDN locations, updating only live pricing and inventory independently.

How does Kaspi QR checkout function across desktop and mobile browsers?

On smartphones, clicking "Pay with Kaspi" triggers an OS-level deep-link (kaspi://pay), immediately transitioning the customer into their authenticated Kaspi.kz app with the invoice pre-populated. On desktop browsers, an SVG QR code is displayed with real-time SSE listener polling. The shopper scans it, confirms the payment, and the web store receives a verified HMAC webhook, confirming the order in under 0.8 seconds.

How does this architecture prevent database lockups during 100,000+ item 1C syncs?

By completely decoupling ingestion from user-facing database queries. 1C submits updates to an isolated buffer API endpoint which enqueues tasks into Redis. Dedicated BullMQ background workers process inventory updates in transactions of 500 items at a controlled pace. Customer browsing performance remains entirely unaffected.

How can I request an architecture audit or commission an e-commerce platform with MurdaSoft?

Explore our comprehensive engineering solutions and module breakdowns in the interactive MurdaSoft Vibe Map, view live case studies, and reach out directly to lead engineer Alexander Murdasov via Telegram @murdasoft or @Allexndr for a free architecture review and fixed-price quote.

Need a website or Telegram bot?

Free consultation - let's discuss your project.

Discuss project→