RetainIQ has two frontend applications, both built in Lovable and connected to the same Supabase database. They serve opposite ends of the same system.


App 1 — Lumière Skincare Store

Purpose: A realistic D2C skincare e-commerce store that acts as the event source for the RetainIQ system. In a real deployment this would be a Shopify store. In the demo it allows a visitor to simulate customer behaviour and watch the AI system respond in real time.

What it does on load:

Fetches all 10 products from Supabase products table. Fetches all 30 customers from Supabase customers table. Populates the customer switcher dropdown with name and lifecycle stage badge.

Customer Switcher:

The primary demo control. Selecting a customer updates the context banner showing name, lifecycle stage, churn score, total orders, and days since last order pulled live from Supabase.

Buy Now flow:

Refund flow:

Identical to Buy Now but posts event: refunded. Triggers refund_save intervention. Returns amber toast.

Session Activity Feed:

Local-state log of all actions taken in the current session. Pulls intervention_type and new_churn_score from webhook response.