Zaman TauhidTechnical Lead & Software Architect
Zaman Tauhid

ResumeGitHubLinkedIn

Technical Lead & Software Architect · Dhaka, Bangladesh

Architecture

Designing AI-Native Motion and Commerce Systems Without Platform Lock-In

Production architecture lessons from DiviTitan Motion, bitPlugins, Inventix, and wcbrain on separating authoring contracts, tenant ledgers, and live commerce authority.

Most software teams discover the same friction six months after shipping an AI feature: the hard part is not calling a model, it is deciding what owns the truth when the model is slow, wrong, upgraded, or turned off.

When AI logic bleeds directly into page builder markup, database mutations, or storefront pricing logic, every capability turns into platform lock-in. Users cannot turn off the enhancement without breaking their pages, operators cannot audit why an inventory number changed, and developers cannot swap a provider without rewriting the host plugin or application.

Building four distinct products across WordPress motion tooling, multi-tenant retail operations, and WooCommerce product discovery forced me to treat system boundaries as the primary design artifact.

Why platform-coupled AI fails in production

In CMS ecosystems like WordPress and WooCommerce, plugins share a single PHP process, a single database, and a single DOM with dozens of third-party extensions. Coupling AI or runtime intelligence directly to those surfaces creates three recurring failure modes:

  • Markup and builder lock-in: Wrapping user content inside proprietary shortcodes or custom container blocks means deactivating the plugin breaks the page layout.
  • Credential and runtime leakage: Asking merchants or site owners to paste provider keys inside WordPress admin options mixes commercial credentials with storefront code and invites runtime latency on every page view.
  • Authority drift: Letting an external search index, recommendation cache, or AI assistant answer with stale prices, invalid stock counts, or unvalidated cart actions creates discrepancies that erode trust immediately.

Avoiding these failures does not require avoiding AI. It requires putting a strict contract between the host platform and the capability you are adding.

DiviTitan Motion and bitPlugins: canonical motion contracts with zero runtime AI

Visual builders already have deeply nested layout trees, responsive breakpoints, and styling hierarchies. When we built DiviTitan Motion for Divi 5 alongside the Gutenberg and Elementor 4 motion products under bitPlugins, the core rule was that motion must enhance existing elements rather than forcing creators into proprietary wrapper blocks.

Instead of inventing a custom HTML structure or calling an AI service when a visitor loads a page, the system centers on a canonical GSAP timeline and trigger contract:

  1. Attach to native nodes: Motion settings attach to the module, block, or widget that already owns the content. Text fields, images, nested menus, and layout containers expose field-aware controls matching what that node can actually animate.
  2. Run AI strictly at authoring time: Assisted workflows such as AI Apply inspect the supported content context inside the builder and emit structured, editable motion assignments—timing, triggers, split behavior, pinning, or scrub parameters—alongside application history and explicit revert controls.
  3. Zero frontend AI requests: Once saved, the page stores pure, deterministic configuration. At runtime on the live site, the frontend loader reads the page's saved motion contract and activates only the GSAP components required by those nodes.

Because the contract is declarative and native to Divi 5, Gutenberg, and Elementor 4, there is zero proprietary block lock-in. If a creator edits a value manually after AI generation, the builder stays in sync. If motion is disabled on a node, the underlying layout and content remain intact.

Inventix: deterministic stock accountability across multi-tenant ledgers

Multi-location retail software has no tolerance for eventual consistency at the point of sale. While building Inventix, the central architectural constraint was guaranteeing that inventory adjustments, transfers, purchasing, and POS checkout remain strictly deterministic across tenants and store locations.

Rather than mixing tenant records behind application-level query filters alone, Inventix isolates tenant data inside dedicated PostgreSQL schemas and enforces explicit context initialization and teardown around every HTTP request and background job.

Two operational rules keep the ledger trustworthy:

  • Separate platform lifecycle from tenant workflows: Provisioning, schema migrations, billing state, and tenant management live in a dedicated management boundary, while the inventory and POS runtime serves day-to-day store operations without cross-tenant leakage.
  • Keep stock mutations single-path and transactional: A sale, return, purchase receipt, or inter-store transfer mutates stock balances and writes its movement audit record within the same database transaction. Reporting, dashboards, and background workers read committed ledger state rather than maintaining competing caches of available stock.

Even when intelligence or forecasting sits on top of retail data, it can only advise; it must never bypass the transactional ledger that accounts for physical units on the shelf.

wcbrain: keeping WooCommerce authoritative while offloading discovery

Commerce discovery sits at the intersection of both problems: search and recommendations benefit enormously from semantic retrieval and LLMs, yet WooCommerce stores cannot afford to lose live pricing, variation rules, stock status, or checkout integrity.

While architecting wcbrain (currently pre-launch), I split the system across three explicit boundaries:

  1. WooCommerce plugin (storefront and authority boundary): Lives inside WordPress, handles bounded catalog synchronization, preserves the merchant's theme product cards across classic loops and Product Collection blocks, and retains sole authority over live prices, inventory, carts, and checkout.
  2. Account and licensing control plane: Handles customer accounts, subscriptions, domain-bound production store licenses, plugin downloads, and entitlement state.
  3. Isolated hosted discovery plane: Performs catalog indexing, semantic retrieval, adaptive filtering, personalization, recommendations, insights aggregation, and grounded shopping conversation outside the WordPress PHP/MySQL server.

This split solves two practical headaches for WooCommerce merchants at once.

First, no AI provider keys live in WordPress. Merchants connect a licensed production store using a short-lived, single-use, domain-bound connection code generated from their account dashboard. Model orchestration, embedding updates, and provider failover remain isolated in the hosted service.

Second, discovery never overrides commerce truth. When the shopping assistant helps a customer compare items or prepare a cart addition, it stays grounded in supplied catalog facts and approved store knowledge, asks for explicit shopper confirmation before applying any cart change, and delegates final validation—price, tax, coupons, stock, and variation rules—back to live WooCommerce. And if the hosted discovery service is unreachable or slow, storefront search and archive loops degrade deliberately back to native WooCommerce behavior instead of blocking a sale.

Architecture comparison across the three systems

SystemHost & Authority BoundaryWhere AI / Compute RunsRuntime Contract & FallbackLock-In Avoidance
DiviTitan Motion / bitPluginsDivi 5, Gutenberg, and Elementor 4 own DOM & layout markupAuthoring time inside the editor only; zero runtime AI callsCanonical GSAP timeline & trigger JSON contract; loads only required GSAP modulesNo proprietary wrapper blocks; removing motion leaves native content intact
InventixTenant-isolated PostgreSQL ledger owns stock, sales, and POS truthTransactional server runtime; isolated schema context per request/jobSingle-path atomic ledger mutations with explicit movement audit trailManagement plane separated from tenant data plane; standard relational ledger
wcbrainWooCommerce owns live prices, stock, variations, carts, and checkoutIsolated hosted discovery plane; zero AI keys stored in WordPressDomain-bound connection code; theme loop preservation & native WooCommerce fallbackStandard WooCommerce catalog & templates remain untouched if disconnected

Contracts outlast models

Models, embedding dimensions, builder UI APIs, and frontend frameworks change far faster than business truth. A store's inventory ledger, a publisher's page markup, and a merchant's checkout rules are long-lived assets.

When you place an explicit, inspectable contract between the host platform and the intelligence layer—whether that is a GSAP motion schema, a transactional stock ledger, or a domain-bound commerce discovery boundary—you gain the freedom to upgrade models, swap providers, or disable features cleanly without holding the underlying product hostage.

Put the ideas into practice.

Work through your development process, architecture, or next engineering challenge with me.

Explore one-to-one mentorship