Skip to content
All work

Case study · In-house

AI Stylist: shop a whole room

I turned Luxo's AI room visualiser into a standalone AI Stylist. Shoppers search the whole catalogue through Shopify's own storefront search and filters, keep their looks for the session, and send a generated room straight to the cart.

Role
Frontend Developer
Company
Luxo LivingNov 2023 – Present
Project
Apr 2026 – Present
Platforms
ShopifyGemini
  • Liquid
  • JavaScript
  • Shopify storefront search
  • Search & Discovery filters
  • sessionStorage
  • Customer Events / GA4
  • Gemini

Context

Luxo Living already had an AI room visualiser when I started on this. Teammates built Visualise in My Room in January 2026: a shopper uploads a photo of their room and Gemini renders furniture into it. In June 2026 a teammate added a room-preview modal with an AI assistant chat on top. In April I’d added the floating “See in your room” button on product pages.

It all started from a single product page. I wanted it to work as a stylist: open it from anywhere, find furniture across the whole range, and buy the room you’ve designed.

What I built

A standalone entry point

  • A floating AI Stylist launcher, a promo section and its own landing page.
  • Starter collections, so the stylist works without a product already chosen.
  • Theme settings that control how the launcher behaves.

Rather than building a separate product index, the stylist uses the store’s existing storefront search. I added an alternate search template that returns JSON instead of a page, so the modal can call /search like any other endpoint:

  • Products come back 12 at a time with paging, including price and availability.
  • The store’s Search & Discovery filters come back too (list, yes/no and price range), so the picker offers the same filters and sorting as the main search page.
  • Prefix matching on the last word means a half-typed word still finds products, and sold-out products sort last.

An illustration of the idea (written fresh for this page):

// Ask the storefront's own search for JSON by naming an alternate template.
async function searchProducts(query, filters = {}, page = 1) {
  const params = new URLSearchParams({ q: query, type: "product", view: "stylist-json", page });
  params.set("options[prefix]", "last"); // match the word still being typed
  params.set("options[unavailable_products]", "last"); // sold-out items go to the end
  for (const [name, value] of Object.entries(filters)) params.append(name, value); // filter.p.*, filter.v.*
  const res = await fetch(`/search?${params}`);
  return res.json(); // { products, filters, next_page }
}

Because it’s the same search shoppers already use, there’s no separate index to keep in sync. Results and filters change whenever the catalogue does.

Looks that last the session

  • The chosen products, the room photo, the chat and every generated preview are saved for the session, so a refresh or a detour to a product page doesn’t lose the shopper’s work.
  • Uploaded room photos are compressed in the browser (canvas, at most 1200px JPEG) so they fit in session storage.
  • A history bar lets the shopper flip between the looks they’ve generated.

From a look to the cart

  • Shop the look adds the products from a generated room to the cart in one step.
  • A cart summary appears after adding, and the cart drawer loads and opens when the shopper asks for it or leaves the stylist.
  • I added analytics events for searches, shop-the-look and how the cart was opened, sent to GA4 through the Customer Events pixel alongside the assistant’s existing events.

Staying out of the way

  • The launcher starts only when the page is idle, its stylesheet loads asynchronously except near the top of the page, and the preview badges wait for the chat script to load.
  • The Inside support-chat widget now loads on demand, with a fallback when chat is unavailable.
  • One floating button now holds both the AI Stylist and Recently Viewed. It closes on an outside tap, Esc or scroll, moves above the sticky add-to-cart and checkout bars, and hides while a drawer or modal is open.

Architecture & integrations

  • Storefront only. My work is Liquid templates and the stylist modal script. Image generation and the assistant chat go through the backend endpoints my teammates built.
  • Search: Shopify storefront search through an alternate JSON template, with Search & Discovery filters, sorting and paging.
  • State: session storage for products, the room photo, chat and preview history.
  • Analytics: new stylist events through the GA4 Customer Events pixel.

Outcome

The stylist opens from a floating button or its own landing page, not just from one product. It searches the whole range with the store’s own filters, keeps a shopper’s looks for the session, and turns a generated room into a cart in one step.