---
title: "Building a Magic Mirror: AI retail experiences with Remix"
description: "An AI-powered \"magic mirror\" hides a webcam and display behind glass."
url: "https://swe.quest/articles/building-a-magic-mirror-ai-retail-experiences-with-remix-ffcfc35324fc55fe"
canonical: "https://shopify.engineering/magic-mirror"
source: "Shopify Engineering"
published: "2026-03-19"
difficulty: "medium"
kind: "How-to"
reading_minutes: 9
tags: ["llms","react","realtime","computer-vision","product-engineering"]
---

# Building a Magic Mirror: AI retail experiences with Remix

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2026-03-19, 9 min read, How-to. Original: [https://shopify.engineering/magic-mirror](https://shopify.engineering/magic-mirror)

## Summary

An AI-powered "magic mirror" hides a webcam and display behind glass. It photographs a shopper and runs the image through a vision LLM to return a compliment and a product recommendation, first used for Rare Beauty blush shade matching. The system is a single Remix route: a server action builds a prompt from a persona, a plain-text product/inventory table and a JSON output schema, calls an OpenAI-compatible proxy in JSON mode with max\_tokens 300, and resolves the returned product ID with graceful fallback. Server-sent events on per-booth channels let a remote device trigger or reset the mirror, and a five-state client machine handles capture delay, timed auto-reset and fade transitions. Prompt lessons: hard character limits beat "be concise", curated compliment lists improve brand consistency, explicit exclusion lists are needed for safety, and inventory can softly steer recommendations.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [React](https://swe.quest/tags/react.md) (Web & mobile)
- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Product engineering](https://swe.quest/tags/product-engineering.md) (Engineering organization)

## Prerequisites

- React basics ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))
- Remix loaders and actions
- OpenAI API

## Keywords

Remix, OpenAI SDK, Server-sent events, Rare Beauty, Shopify Admin API

## Related posts

- [Leveraging multimodal LLMs for Shopify’s global catalogue: Recap of expo talk at ICLR 2025](https://swe.quest/articles/leveraging-multimodal-llms-for-shopify-s-global-catalogue-recap-of-expo-talk-at-5a595806db6311fb.md): Shopify Engineering · 2025-07-16 · Medium · 11 min read · LLMs, E-commerce, Model training, Inference & serving, Evaluation
  Shopify's Global Catalogue uses fine-tuned open-source vision LLMs (LLaVA 1.5 7B, then LLaMA 3.2 11B, now Qwen2VL 7B) to classify, extract attributes from, standardize and match billions of merchant product listings.
- [Implementing MCP Servers in Python: An AI Shopping Assistant with Gradio](https://swe.quest/articles/implementing-mcp-servers-in-python-an-ai-shopping-assistant-with-gradio-21ac8e123355c19a.md): Hugging Face · 2025-07-31 · Medium · 4 min read · AI agents, Python, LLMs
  Gradio's MCP integration turns Python functions into LLM tools: launching an app with mcp\_server=True exposes each endpoint as an MCP tool, with names, descriptions and input schemas generated from function docstrings, plus progress streaming and file upload handling.
- [Content Creation Copilot - AI-assisted product onboarding](https://swe.quest/articles/content-creation-copilot-ai-assisted-product-onboarding-e0913f2c35b53e3c.md): Zalando Engineering · 2024-09-17 · Medium · 7 min read · LLMs, Product engineering, E-commerce, System design
  Zalando built a copilot that pre-fills product attributes during content onboarding by sending product image URLs and generated prompts to OpenAI GPT models.
- [Run Gemma 3 with Docker Model Runner: Fully Local GenAI Developer Experience](https://swe.quest/articles/run-gemma-3-with-docker-model-runner-fully-local-genai-developer-experience-c005339b3915484f.md): Docker · 2025-04-09 · Medium · 7 min read · LLMs, Inference & serving, Containers, JavaScript
  Docker Model Runner (in Docker Desktop for macOS 4.40.0+) exposes an OpenAI-compatible API on localhost, so Gemma 3 can be pulled with \`docker model pull ai/gemma3\` and called through the standard OpenAI SDK by pointing baseURL at http://localhost:12434/engines/v1.
- [From Activity to Intent: Generating User Journeys with LLMs](https://swe.quest/articles/from-activity-to-intent-generating-user-journeys-with-llms-0ff3c950d1bbfa2d.md): Pinterest Engineering · 2026-10-09 · Medium · 15 min read · Recommendations & ranking, LLMs, Inference & serving, Model training, Evaluation
  Pinterest replaced a multi-stage keyword-clustering pipeline for inferring user "journeys" (long-horizon goals like a kitchen remodel) with a single fine-tuned 4B Qwen3 model.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
