Download PDF · Cloudnix: Enterprise Ecommerce

Cloudnix Technical Report · CNX-TR-2026-03

Engineering Enterprise eCommerce Platforms

Ajmal Abubacker, Goraknath, Avinash KS, Upendranath Metikala and Avinash Nishant
Cloudnix Software Labs, Bengaluru, India
CNX-TR-2026-03 · Version 1.2 · November 2026
AbstractEnterprise commerce fails at its edges: search that slows as catalogues pass a million products, sale-day spikes that reach the database, payments marked paid on unverified callbacks, tax lines that do not reconcile, branches that cannot bill offline, unchecked marketplace edits and migrations that lose search rankings. This report describes how we engineer around each of these in a multi-tenant commerce core we have built and operated in production: request-level store resolution and scoping; catalogue and faceted search on a dedicated index with per-store caching; a single gateway contract with gateway-specific callback verification across ten gateways; an eleven-state order model; exact GST computation in the core; per-outlet inventory with pincode serviceability; an offline point-of-sale system using branch key ranges and ordered, watermarked synchronisation; field-level approval for marketplace sellers; integrations; peak readiness; security; a parallel-run migration method; and the operating model. We conclude with an anonymised case study, a roadmap and a 20-point checklist.
Keywords: eCommerce; multi-tenancy; catalogue search; caching; payment gateways; callback verification; order lifecycle; GST; omnichannel; offline point of sale; synchronisation; marketplace; migration

Contents
  1. Executive summary
  2. Where commerce platforms struggle
  3. Reference architecture
  4. Multi-tenancy and request routing
  5. Catalogue and search at scale
  6. Checkout and payment orchestration
  7. Order lifecycle
  8. Tax in the core
  9. Inventory, outlets and serviceability
  10. Offline point of sale
  11. Marketplace governance
  12. Integrations
  13. Performance and peak readiness
  14. Security
  15. Migration methodology
  16. Operations and service
  17. Case study: a multi-branch retailer, online and offline
  18. Implementation roadmap
  19. Checklist: 20 questions
  20. Glossary
  21. References

Executive summary

Enterprise commerce fails at its edges: a search that slows as the catalogue grows past a million products, a sale-day spike that reaches the database, a payment marked paid on an unverified callback, a tax line that does not reconcile, a branch that cannot bill when the internet drops, a marketplace seller whose edits go live unchecked, or a migration that loses years of search rankings. This report describes how we engineer around each of these, from a commerce core we have built and operated in production for many years: a multi-tenant platform serving brands, franchise outlets, wholesale stores and marketplaces on one codebase, an offline point-of-sale system for branches, and the integrations, operations and support model around them.

Principles.
  1. Resolve the store first. Every request is bound to one store before anything else runs; every query, file and cache entry is scoped to it.
  2. Keep the database out of the hot path. CDN, per-store page caches and a dedicated search index answer most traffic.
  3. Verify money before state. An order becomes paid only after the gateway's own proof is checked against the order.
  4. Model exceptions explicitly. Delays, rejections and returns are states, not notes.
  5. Compute tax in the core. Every line carries its code and rates; inclusive prices are back-calculated exactly.
  6. Let branches work alone. Offline billing with non-colliding keys and ordered synchronisation.
  7. Move businesses, not just data. Migrations run in parallel and switch over only when proven.

Where commerce platforms struggle

ProblemSymptomPattern (chapter)
Catalogue growthFacets and search slow down past a million productsDedicated search index, attribute facets (5)
Sale-day trafficDatabase saturates within minutesLayered caching and CDN (13)
Many brands on one platformData or settings leak between storesStore resolution and scoping (4)
Payment trustOrders marked paid on forged or replayed callbacksGateway contract and verification (6)
Tax reconciliationPaise-level mismatches, wrong IGST/CGST splitTax in the core (8)
Branch connectivityBilling stops when the line dropsOffline POS with key ranges (10)
Marketplace qualitySeller edits go live uncheckedField-level approval (11)
Re-platformingLost orders, broken URLs, lost rankingsParallel-run migration (15)

Reference architecture

CHANNELSweb stores · mobile apps · marketplace · point of sale · WhatsApp EXPERIENCEfaceted search · merchandising · checkout · order tracking COMMERCE COREcatalogue · pricing · inventory · orders · sellers · tax INTEGRATIONpayment gateways · couriers · messaging · product feeds · ERP and accounting PLATFORMstore resolution · CDN and caches · search index · jobs · backups · monitoring
The five layers of the commerce platform.

One codebase, many stores

All stores share one codebase and one release. A front controller dispatches views, form posts and modules; an administration area follows a per-entity pattern of controller, model and data access. The relational schema of the commerce core holds around fifty tables, every one of them carrying the store's identifier. Scheduled jobs handle feeds, sitemaps, cache housekeeping, backups and synchronisation.

Deployment options

OptionWhen
Shared cloud (data in India)Most brands; fastest to start
Dedicated cloudIsolation, custom capacity, regional hosting
On-premiseRegulatory or internal policy requirements

Multi-tenancy and request routing

A multi-brand platform is only as safe as its tenant boundary. Before any business logic runs, each request passes malicious-request blocking and a request-rate check, then the host name (without www) is looked up against a unique domain column to find the store.

# every request
block_malicious(request); check_request_rate(ip, user_agent)
store = lookup_store(host_without_www)            # unique domain → store id
if not store: render("can't find the shop"); stop
context = {
  templates:  "themes/" + store.theme,
  media:      "media/" + store.domain + "/",       # per-store files
  cache:      store.domain + "/cache/",            # per-store cache namespace
  cdn:        store.media_cdn, store.theme_cdn,
  currency:   store.currency, store.decimals,
  payments:   store.gateway_credentials,
  device:     mobile | tablet | desktop | app }

Pseudocode.

Scoping rules

Discipline matters. When scoping is written into each query rather than enforced by a framework, it must be checked in code review and covered by tests that try cross-store access.

Catalogue and search at scale

Catalogue model

ConceptModel
HierarchyType → category → sub-category
VariantsVariants and options (size, colour, cut, pack)
FacetsTags grouped by type, attached to products and carried into order lines
LimitsProduct limits per plan, enforced at upload
BulkCSV and spreadsheet uploads

Search

For small catalogues, tag filters on the database are enough. Past a few hundred thousand products, facet counting and relevance ranking belong in a dedicated search index (an Apache Solr core in our deployments [6]) synchronised from the catalogue through a change table. The index provides typo tolerance, relevance ranking and fast facet counts; the database remains the system of record.

Catalogue (DB) Change table Search index Store pages writes go to the database; a sync job applies changes to the index; pages read from the index and the cache
Catalogue to search index.

Caching

A file-based cache stores rendered widgets and pages per store, with a time-to-live, a per-store switch, an allow-list of modules, pattern-based invalidation and a housekeeping job. Widgets that depend on the shopper, such as recently viewed, buy again and recommendations, are never cached. Images are converted to WebP, with AVIF handled where supported [10], and served from a CDN with versioned static paths so a release invalidates nothing it does not need to [7].

Scale reference

The same core runs catalogues of more than ten million products for a single customer and serves more than a million shoppers on one platform.

Checkout and payment orchestration

Checkout moves through review, delivery details, payment, confirmation of payment and confirmation of order. Payment is delegated to gateways through a single contract: each gateway is a module that implements processing of the browser return and of the server-to-server notification. The store's configured gateway is loaded at checkout; a separate gateway can be set for international payments.

Verification by gateway

Gateway patternProof checked
Signed webhook with timestampSignature header and timestamp verified before processing
Checksum headersha256(payload + salt) with a key index, recomputed and compared
HMAC responseHMAC-SHA256 over the response with the merchant secret
Signature with order re-readAmount and gateway order id re-read from the order (status NEW, this store only) and checked against the signature
Reverse hashHash of the reply fields in reverse order with the salt

Ten gateways are supported behind this contract, with webhook handlers where the gateway offers them. Card data is entered only on the gateway's hosted page and never stored [1, 2].

Good practice

Order lifecycle

NEWPROCESSINGPROCUREPACKINGBILLINGSHIPPEDDELIVERED DELAYEDCANCELLEDREJECTEDRETURNED
Eleven order states. Payment has its own track: PENDING, PAID, FAILED, REFUNDED.

Seven transitions send the customer a message: processing, shipped, delayed, delivered, cancelled, rejected and returned. Item-level order management lets one line be procured or returned independently of the rest of the order.

Tax in the core

Every order line carries its HSN code, CGST, SGST and IGST rates and whether the price includes tax [4, 5]. For a tax-inclusive price P at rate r:

base = P − P ÷ (100 + r) × r          tax = P − base
intra-state:  CGST = SGST = tax ÷ 2        inter-state:  IGST = tax

Example exchange or schema.

ExampleValue
Price, inclusive, 18%₹1,180.00
Base₹1,000.00
Same stateCGST ₹90.00 + SGST ₹90.00
Another stateIGST ₹180.00

Invoices render in four layouts: A4 and thermal, each tax-inclusive or exclusive, generated as PDF. A tax report summarises liabilities for the accountant.

Inventory, outlets and serviceability

Inventory is keyed by product and outlet, holding stock level, net price and tax rate per outlet. In multi-outlet mode, each outlet (a supplier record) has service areas, and each order carries the outlet that fulfils it.

# routing an order in multi-outlet mode
area     = area_of(shopper.pincode)
outlets  = outlets_serving(area)                    # service areas by pincode
outlet   = first(o in outlets where stock(o, items) is sufficient)
order.outlet = outlet; invoice series and GSTIN of outlet
cod      = cod_allowed(shopper.pincode)             # maintained per pincode

Example exchange or schema.

Delivery charges come from courier zones and zone rates, with delivery slots and cash-on-delivery charges by area. The platform serves more than 19,000 pincodes.

Offline point of sale

Branches bill against a local database and synchronise with head office over HTTP when connected. Twenty-five tables take part, each implemented as a sync class.

Branch A · keys 1xxxxxxx Branch B · keys 2xxxxxxx Branch C · keys 3xxxxxxx Head officelock · daily tokenwatermark per table/direction Online store stock Conflict log
Offline point of sale: branch key ranges, ordered synchronisation, and a bridge to online stock.

Synchronisation protocol

  1. Acquire the server lock for the branch; compute the day's sync token from date, branch and organisation.
  2. For each table, in order: push inserts, push updates, pull inserts, pull updates, each since the watermark for that table and direction.
  3. Record conflicts in a conflict table for review; never overwrite silently.
  4. After pulling, move the local auto-increment past the highest server id.
  5. Release the lock.

Why key ranges

Two branches creating invoices offline would otherwise generate the same primary keys. Each branch is initialised with its own series (for example 1xxxxxxx, 2xxxxxxx), so records from different branches never collide and can be merged without renumbering.

Branch features include shifts with day-end settlement, indents and stock requests with automatic raising, inter-branch transfers, part payments, billing by weight and per-device licensing. A bridge job pushes branch stock to the online store's inventory.

Marketplace governance

Sellers onboard with tax identifiers, bank account and location, and serve defined areas. Every change a seller makes is captured as a pending approval rather than applied:

approval(table, key, field, previous_value, new_value, mode, approved)

Example exchange or schema.

The operator approves field by field; only then is the change written to the live record. Commission is configured by product type, category or sub-category; seller subscription plans carry a trial period and a product allowance. Settlement to sellers can run inside the platform or through the operator's accounting process.

Integrations

AreaIntegration
Product feedsGoogle Merchant Center through its Content API [8]: store set-up, nightly feed generation and push, status pull, clean-up
MessagingEmail via SMTP or managed email services; per-store SMS gateways; WhatsApp through the Business Platform Cloud API [9] or providers
CouriersAPI booking with an aggregator; zone and rate tables for other couriers
SystemsOpen API and webhooks with a key per connected system, for ERP, accounting and CRM

Performance and peak readiness

Sale-day traffic arrives within minutes. The platform answers most of it before the database: a CDN with versioned static paths and modern image formats, per-store page and widget caches, and a dedicated search index. The database serves what remains: carts, checkouts and order writes.

LayerServesInvalidation
CDNimages, scripts, styles, cached pagesversioned paths per release
Page and widget cachecategory, product and home widgetstime-to-live, pattern purge on change
Search indexsearch and facetschange-table sync
Databasecarts, checkout, orders—

Before a sale

Security

AreaControl
EdgeHTTPS everywhere; malicious-request blocking; request-rate limits logged by IP and user agent; bot checks on forms
IdentityOTP and social sign-in; per-staff logins; about 190 permissions; sessions regenerated on sign-in
ApplicationPrepared statements; store scoping; function-level permission checks; checkout steps enforced in sequence
PaymentsHosted gateway pages; callback verification; card data never stored [1]
Recovery tokensPassword-reset tokens encrypted and authenticated (AES-256 with HMAC-SHA256), expiring, invalidated on password change
OperationsKey-only server access; named logins; monthly access reviews; critical patches within 48 hours; daily log review
RecoveryDaily and weekly backups, a separate copy, monthly restore tests

We assess applications against the OWASP Application Security Verification Standard [11] when hardening.

Migration methodology

StepWorkExit criterion
1. Audit and planCatalogue, customers, orders, URLs, integrations, SEOSigned migration plan
2. Move and checkData moved and checked line by line; URL redirect mapCounts and samples match
3. Run in parallelOld and new live side by side; orders comparedA full business cycle without differences
4. Switch overDNS and redirects; team on handTraffic, orders and rankings stable

Sources include hosted platforms, open-source platforms and self-built systems.

Operations and service

Case study: a multi-branch retailer, online and offline

Anonymised. A retailer with an online store and several physical branches.

The challenge

Branches had unreliable internet but could not stop billing. Stock had to be consistent between branches and the online store, and head office needed one view of sales, transfers and shifts.

What was built

What it changed

Billing continues through outages; head office sees branch activity after each synchronisation; and online availability follows what is physically on the shelf.

Implementation roadmap

PhaseOutcome
1. DiscoveryStore network, catalogue, payments, tax and integration plan
2. PilotOne brand or region live; migration rehearsed
3. ScaleAll stores, outlets and channels; offline branches
4. OperateService levels, monthly reviews, peak readiness drills

Checklist: 20 questions

1Is every request bound to one store before any logic runs?
2Are cross-store access attempts covered by tests?
3Does search run on a dedicated index past a few hundred thousand products?
4Are personalised widgets excluded from caches?
5Are images served in modern formats from a CDN with versioned paths?
6Does every gateway sit behind one contract?
7Is every callback verified with the gateway's own method?
8Is the amount re-read from the order, not the browser?
9Do exceptions (delay, rejection, return) have their own states?
10Does every line carry HSN and GST rates?
11Are inclusive prices back-calculated exactly?
12Is stock held per outlet with service areas by pincode?
13Can branches bill offline without key collisions?
14Are sync conflicts logged rather than overwritten?
15Do seller changes wait for approval?
16Are integrations keyed per system and versioned?
17Is there a parallel run before migration cut-over?
18Are restores tested regularly?
19Is there a staging store and a sign-off before release?
20Who is on call on sale day?

Glossary

Store resolutionBinding a request to one store from its host name.
FacetA filter with counts, such as size or colour.
HSNHarmonised System of Nomenclature code for goods under GST.
CGST / SGST / IGSTCentral, State and Integrated GST.
Key rangeA block of identifiers reserved for one branch.
WatermarkThe last point synchronised, per table and direction.
Hosted payment pageThe gateway's page where card details are entered.

References

  1. PCI Security Standards Council. Payment Card Industry Data Security Standard, v4.0, 2022.
  2. Reserve Bank of India. Tokenisation: Card Transactions, circulars, 2021–2022.
  3. National Payments Corporation of India. Unified Payments Interface (UPI): Procedural Guidelines.
  4. Government of India. The Central Goods and Services Tax Act, 2017.
  5. GSTN. e-Invoice System: Invoice Registration Portal (IRP) Specifications.
  6. The Apache Software Foundation. Apache Solr Reference Guide.
  7. R. Fielding, M. Nottingham and J. Reschke. HTTP Caching. IETF RFC 9111, 2022.
  8. Google. Content API for Shopping, Merchant Center developer documentation.
  9. Meta. WhatsApp Business Platform: Cloud API, developer documentation.
  10. Google. WebP image format; Alliance for Open Media. AV1 Image File Format (AVIF), 2019.
  11. OWASP Foundation. Application Security Verification Standard, v4.0.
About this report. Prepared by the Cloudnix engineering team from systems we have designed, built and operated. Client and product names are withheld; illustrative values are marked as examples. Cloudnix Software Labs, Bengaluru, India · cloudnix.com. This report may be shared freely in its entirety.
Document control
ReportCNX-TR-2026-03Version1.2
IssuedNovember 2026StatusPublished
Filecloudnix-enterprise-ecommerce-v1.2.pdf