A modern, enterprise-grade real-time sales dashboard showcasing AI-powered analytics and Microsoft Fabric integration. See the Hornbach Real-Time Sales Dashboard in action! This demo showcases:
- ⚡ Real-time sales streaming with live POS data
- 🤖 AI agents responding automatically to inventory changes
- 📊 Interactive analytics with natural language queries
- ☁️ Microsoft Fabric integration and KQL execution
- 🚀 Complete Azure deployment workflow
Download the repository and open the video file locally, or we'll upload to a streaming platform soon
The Hornbach Live Sales Demo demonstrates how modern retail can leverage real-time data streaming to enable:
- Live Sales Streaming: Real-time POS data visualization instead of waiting for next-day reports
- Autonomous AI Agents: Intelligent reordering and customer service based on live data
- Interactive Analytics: Natural language queries against live sales data
- Microsoft Fabric Integration: Direct connection to Event House and OneLake for enterprise-grade data processing
- Live POS transaction simulation with authentic German home improvement store products
- Configurable streaming speed and data generation
- Visual indicators for new transactions and trends
- Persistent sales history with session continuity
- Reordering Agent: Monitors inventory levels and triggers automatic restocking recommendations
- Chat Agent: Natural language interface for querying sales data and generating insights
- Real-time Response: Agents react immediately to sales patterns and threshold breaches
- Real-time metrics: sales volume, revenue, top products, store performance
- Interactive charts powered by Recharts
- Executive-friendly KPI visualization
- Historical trend analysis
- Event House: Direct KQL queries for real-time data streaming
- OneLake: Batch CSV export for advanced analytics
- Dual Mode: Seamless switching between live Fabric data and local simulation
- Authentication: Secure bearer token support
- Node.js 18+ and npm
- Git
- Microsoft Fabric (optional - for live data integration)
- Clone the repository
git clone https://github.com/CindyU-beep/hornbach-real-time-s.git
cd hornbach-real-time-s- Install dependencies
npm install- Start development server
npm run devOpen http://localhost:5173 in your browser.
- Build for production
npm run build
npm run previewDeploy this application to Azure Container Apps for production use:
.\deployment\scripts\deploy-azure.ps1chmod +x deployment/scripts/deploy-azure.sh
./deployment/scripts/deploy-azure.sh📖 See deployment/docs/DEPLOYMENT.md for detailed deployment instructions
- ✅ Fully containerized application
- ✅ Auto-scaling (1-3 replicas)
- ✅ Secure HTTPS with automatic certificates
- ✅ Built-in monitoring and logging
- ✅ Production-ready configuration
| Command | Description |
|---|---|
npm run dev |
Start Vite development server |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run server |
Start backend server |
npm start |
Start both frontend and backend |
- React 19 with TypeScript
- Vite for fast development and building
- Tailwind CSS for styling with custom theme
- Radix UI for accessible UI components
- Lucide React for icons
- Sonner for toast notifications
- Local Storage: Configuration and sales data persistence via
useKV - Fabric Service: Abstracted service layer for Event House and OneLake
- Simulation Engine: Realistic sales data generation for demo purposes
hornbach-real-time-s/
├── src/ # Frontend React application
│ ├── components/ # React components
│ ├── features/ # Feature-based modules
│ ├── lib/ # Core libraries & services
│ ├── hooks/ # Custom React hooks
│ ├── services/ # Business logic & API calls
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── server/ # Backend Express API
│ ├── index.js # Server entry point
│ └── src/
│ ├── config/ # Server configuration
│ ├── middleware/ # Express middleware
│ ├── routes/ # API routes
│ ├── services/ # Backend services
│ └── utils/ # Server utilities
├── deployment/ # Deployment configuration
│ ├── docker/ # Container definitions
│ │ ├── Dockerfile # Multi-stage build
│ │ └── .dockerignore # Build exclusions
│ ├── scripts/ # Deployment automation
│ │ ├── deploy-azure.* # Initial deployment
│ │ └── update-container-app.* # Update scripts
│ └── docs/ # Deployment documentation
│ └── DEPLOYMENT.md # Complete guide
├── .env.example # Environment template
├── package.json # Dependencies & scripts
└── vite.config.ts # Vite configuration
-
Enable Fabric Integration
- Open the "Microsoft Fabric Integration" card in the app
- Toggle "Enable Fabric Integration" to ON
-
Configure Connection
- Event House Endpoint:
https://your-cluster.kusto.windows.net - Database:
HornbachPOS(or your database name) - Access Token: Your Fabric authentication token
- Event House Endpoint:
-
Test Connection
- Click "Test Connection" to verify setup
- Run sample KQL queries in the "KQL Testing" tab
-
OneLake Export (Optional)
- Configure OneLake account and container
- Export sales data as CSV for batch analytics
The app expects these Event House tables:
- SalesStream: Real-time sales transactions
- ProductMaster: Product catalog with inventory levels
- InventoryEvents: Stock level changes
For complete Fabric setup instructions, see the configuration UI in the application.
| Mode | Description | Indicator |
|---|---|---|
| Simulation | Generates realistic sales data locally | Badge: "Simulation" |
| Live Fabric | Queries real Event House data | Badge: "Live" |
-
Initial Setup (30 seconds)
- Show app in simulation mode
- Explain the traditional "next-day data" problem
-
Live Streaming Demo (2 minutes)
- Start sales stream
- Show real-time updates across all components
- Highlight immediate data visibility
-
AI Agent Showcase (2 minutes)
- Trigger reordering agent by low inventory
- Demonstrate chat agent with natural language queries
- Show autonomous decision-making
-
Fabric Integration (2 minutes)
- Switch to live Fabric data (if configured)
- Show KQL query execution
- Demonstrate OneLake export
-
Business Impact (1 minute)
- Compare real-time vs. next-day scenarios
- Highlight cost savings and efficiency gains
Try these natural language questions with the Chat Agent:
- "What are our top selling products today?"
- "Which stores have the highest revenue?"
- "Show me inventory levels for power tools"
- "What's the trend for paint sales this week?"
FabricService: Handles Event House queries and OneLake exportsSalesStream: Real-time sales feed with controlsReorderingAgent: AI-powered inventory managementChatAgent: Natural language data queries
Modify SAMPLE_KQL_QUERIES to add your own:
export const SAMPLE_KQL_QUERIES = {
customQuery: `
SalesStream
| where TimeGenerated > ago(1h)
| summarize Revenue = sum(TotalAmount) by StoreId
| order by Revenue desc
`
};The app uses a custom Tailwind configuration with:
- Professional color scheme: Deep blues with orange accents
- Inter font family: Clean, modern typography
- Responsive design: Mobile-first approach
- CSS custom properties: Defined in
theme.css
The app runs entirely client-side. Configuration is managed through the UI and stored locally.
- Use a backend API to proxy Fabric requests
- Never expose authentication tokens to the browser
- Implement proper token management and refresh logic
- Deployment Guide: Complete setup instructions for Azure Container Apps
- Component Documentation: Individual component READMEs and examples
Port already in use
npm run dev -- --port 3000Fabric connection fails
- Verify endpoint URL format:
https://cluster.kusto.windows.net - Check access token permissions
- Ensure database name matches exactly
- Use the in-app Fabric Integration panel for setup guidance
Blank page or styling issues
- Verify Tailwind content paths in
tailwind.config.js - Check browser console for JavaScript errors
- Ensure all dependencies are installed
Module resolution errors
- The
@alias maps tosrc/directory - Restart the dev server after configuration changes
This is a demo project for Microsoft Fabric integration showcases. For issues or improvements:
- Check existing issues
- Create detailed bug reports with reproduction steps
- Include environment details (Node version, OS, browser)
See LICENSE for details.
Built by the Microsoft Fabric team to demonstrate real-time data streaming capabilities in modern retail environments. This project showcases the transformation from traditional batch processing to live, actionable business intelligence.
Experience the future of retail analytics - where decisions happen in real-time, not tomorrow. 🚀