A modern retail demo site for capturing shopping journey events and cart-abandonment signals, then forwarding them through Azure Event Hubs using Entra ID authentication. In the current setup, those Event Hub details often come from a Microsoft Fabric Eventstream, which exposes the Event Hub-compatible namespace and event name the app needs.
This repository is a retail demo application plus supporting documentation for a real-time intelligence scenario. It shows how a storefront can capture shopping activity, send those events into a streaming pipeline, and connect that flow to downstream analytics and monitoring.
The code in this repo focuses on the application-facing parts of the solution:
- a multi-page storefront that simulates customer browsing and cart activity,
- an Express backend that receives those events and publishes them to an Event Hub-compatible endpoint,
- browser-side retry, offline queue, simulator, and push notification support, and
- documentation for the wider Fabric and Azure architecture around the app.
The repo is intentionally structured in layers:
- The website and backend API simulate the retail experience and publish user journey events.
- Azure and Fabric services handle ingestion, automation, analytics, and monitoring.
- The
docs/folder is the system-level documentation area for architecture, provisioning, validation, and component responsibilities.
The demo models a retail journey where a visitor browses products, adds items to a cart, starts checkout, and either completes or abandons the session. The goal is to capture those interactions as events early enough that the business can react while the customer journey is still relevant.
Those events are routed into a real-time platform so the solution can:
- detect relevant customer behavior,
- trigger downstream processing,
- store analytical data for investigation and reporting, and
- visualize the outcome in a real-time dashboard.
In practical terms, this repo supports demos and experiments around questions like:
- Which product interactions happened before a cart was abandoned?
- When should a downstream workflow or alert be triggered?
- How can those events be landed for analysis and shown on an operational dashboard?
At a high level, the solution has four layers:
- Customer experience layer: the website captures browsing, cart, checkout, and purchase events.
- Application integration layer: the backend API validates requests and publishes events using Entra ID and the Azure Event Hubs SDK.
- Real-time processing layer: Eventstream and related downstream components route, evaluate, and enrich the event flow.
- Analytics and monitoring layer: Eventhouse and the dashboard store, query, and visualize the resulting data.
Website -> Azure Web App API -> Eventstream -> Activator Alert -> User Data Function -> Eventhouse -> Real-Time Dashboard (coming soon)
This is the intended end-to-end architecture. The storefront and backend API are implemented in this repository today, while the broader Fabric and Azure components are documented in docs/ so the full system can be provisioned and explained consistently.
- Website and backend API for browsing, cart activity, event publishing, and notification handling
- Eventstream for real-time ingestion and routing
- User data function for downstream processing or enrichment
- Activator alert for detecting conditions and triggering actions
- Eventhouse for analytical storage and query scenarios
- Real-time dashboard for monitoring business activity and outcomes (coming soon)
If you are new to the repo, use this path:
- README.md for the project overview and system entry point.
- SETUP_GUIDE.md to run the app locally or prepare for deployment.
- docs/ for system-level documentation covering component responsibilities.
- Start the app and open
products.html. - Click the
Simulatorcontrol in the top bar. - Use one of the built-in actions:
Generate 5 EventsGenerate 20 EventsSimulate Full Journey
- Watch the simulator log in the panel and the backend logs in the terminal.
- Azure Event Hubs Documentation
- Microsoft Fabric Eventstream Documentation
- Microsoft Entra ID Documentation
- Azure SDK for JavaScript
- Web Push Documentation
MIT License - feel free to use this project for learning and development purposes.
