Embeddable AI sales assistant

One widget script. Many customer stores.

This repo now acts as a SaaS prototype: static demo storefronts load the same widget, pass a different store ID, and call a backend that keeps catalogue, inventory, settings, and recommendations separated by customer.

<script>
window.AIWidget = {
  storeId: "northpoint_tire",
  apiBaseUrl: "https://api.nortnt.com"
};
</script>
<script src="https://demo.nortnt.com/widget.js"></script>

What this proves

The demo separates storefront, widget, SaaS API, and customer data.

Static storefronts

Each demo page behaves like a different customer website, even though they live in this same Astro repo.

Shared widget

The browser downloads one `widget.js`, injects a chat bubble, reads `storeId`, and calls the SaaS API.

Store-aware backend

The backend chooses the right settings, catalogue, and recommendation logic from the incoming store ID.

Runtime flow

The widget runs in the visitor browser. The SaaS brain runs in your backend.

  1. Customer page loads `https://demo.nortnt.com/widget.js`.
  2. `widget.js` reads `window.AIWidget.storeId`.
  3. Visitor asks a product question in the injected chat panel.
  4. Browser sends the message to `https://api.nortnt.com/api/widget/chat`.
  5. Backend filters by `store_id` and returns a store-specific answer.