Client Context

Bagisto is an open-source Laravel ecommerce platform. The work addressed a common production gap: storefront presentation flexibility, scalable catalog enrichment, and product detail pages that support real buying decisions—not only listing data.

The Challenge

Before

Storefront changes and promotional layouts typically required code changes, reviews, and deploys—even for small merchandising tweaks.

Better

Merchants needed many visual and UX variants, PDPs lacked structured trust and variant signal, and large catalogs were painful to enrich without a PIM.

  • Weak separation between content, merchandising config, and deploy cadence
  • Manual catalog enrichment that did not scale with SKU growth
  • PDPs under-structured for materials, sizing, variants, and social proof

The objective was API-first template configuration, optional PIM synchronization, and PDP patterns closer to modern conversion-focused ecommerce.

Solution Architecture

Headless-style configuration layer

Extended Bagisto’s GraphQL surface (Lighthouse) to expose rich, validated storefront template configuration stored as structured JSON—supporting palettes, density, hero and grid placement, and dynamic sections.

Dynamic storefront rendering

Built a React/Next.js registry that maps configuration to components with lazy loading, Suspense boundaries, and build-time validation to catch bad configs before production.

UnoPIM ↔ Bagisto sync

Implemented queue-based imports with batching, attribute mapping, merge rules (PIM wins on attributes, preserve local extensions), and per-product error isolation.

Key Implementation Decisions

  • JSON template config vs fully normalized tables

    Chose structured JSON for rapid iteration and fewer migrations; configs are read-heavy and validated on write.

  • GraphQL schema boundaries

    Fragments and depth limits to avoid over-fetching; nested inputs validated to match what the renderer expects.

  • Idempotent PIM identity

    External IDs as source of truth with versioning/locking strategy to reduce duplicate products and race conditions.

  • PDP information architecture

    Structured attributes, variant logic, and sizing/supporting content surfaced for scan-friendly trust and fewer returns.

Operational Impact

  • Merchandising and marketing can iterate template-level presentation without a full redeploy cycle for every tweak.
  • PIM-backed enrichment reduces time spent hand-editing large catalogs in the core alone.
  • Support and sales see clearer PDP structure—fewer ambiguous variant states and clearer proof points.

Results

  • 25+ configurable storefront templates driven from configuration, not forked codebases.
  • Stronger PDP structure for materials, variants, and supporting content.
  • Scalable catalog operations via UnoPIM integration with resilient batch processing.
  • Foundation for future A/B style experiments on layout blocks.

Technology Stack

Backend
PHP 8.1+, Laravel 10, GraphQL (Lighthouse), MySQL
Frontend
TypeScript, React 18, Next.js 14, Apollo Client
Integration
UnoPIM (REST sync layer)
Focus
Ecommerce extensibility, conversion-oriented UX