Real-Time Sales Analytics ML Forecasting Dashboard
Machine Learning Projects

Real-Time Sales Analytics ML Forecasting Dashboard

SalesIQ is a real-time sales analytics and ML forecasting dashboard built with Python and Streamlit. It auto-seeds a SQLite database with over 5,000 sales records, 500 customers and 50 products, then turns that data into live business insights. Key features include a real-time KPI dashboard, revenue forecasting with Random Forest, Gradient Boosting and Ridge Regression, RFM plus KMeans customer segmentation, a cosine-similarity product recommendation engine, inventory and demand prediction, automated KPI alerts, and bcrypt-secured role-based login. Ideal for BCA, MCA, B.Tech and MBA IT final year students. Includes source code, report, synopsis and PPT.

₹999.00
Built with
PythonDjangoMachine LearningHTML/CSSMongoDB
You get
Source codeDatabaseProject reportPPTSetup guide
Delivery
Instant download after payment

The Real-Time Sales Analytics & ML Forecasting Dashboard (SalesIQ) is a complete, deployable Python web application built with Streamlit, not a notebook or a demo. On first launch it automatically creates a local SQLite database and seeds it with over 5,000 realistic sales records, 500 customers, 50 products across 8 categories, and two years of transaction history. It ships with a bcrypt-secured login system supporting Admin and Manager roles, a dark-themed dashboard, and six fully built feature modules powered by real machine learning models. The whole project runs offline on any laptop in about five minutes.

Key Features

  • The real-time KPI dashboard tracks revenue, order counts, unique customers, and average order value with period-over-period percentage change.
  • Sales forecasting predicts future daily revenue using three switchable models: Random Forest, Gradient Boosting, and Ridge Regression.
  • Feature engineering includes lag features at 7, 14, 21 and 28 days, rolling mean and standard deviation, and calendar features such as day of week and weekend flags.
  • Customer segmentation combines industry-standard RFM analysis with KMeans clustering to label customers as Champions, Loyal, At Risk, or Lost.
  • The product recommendation engine uses item-item collaborative filtering with cosine similarity on a customer-product purchase matrix.
  • Inventory monitoring tracks stock across all 50 products, flags low and out-of-stock items, and predicts demand for the next 7 to 30 days.
  • Automated KPI alerts monitor five thresholds including revenue drops, low stock, high return rate, and low conversion rate, with severity levels and one-click resolution.
  • Interactive Plotly charts provide hover, zoom, dual axes, donut charts, scatter plots, and confidence bands.
  • Role-based access control with bcrypt password hashing gives Admins a panel to manage users, view table row counts, and clear resolved alerts.

Technology Stack

ComponentTechnology
Web UIStreamlit 1.58
DatabaseSQLite (8 tables)
Machine Learningscikit-learn (Random Forest, Gradient Boosting, Ridge, KMeans, PCA)
Data Processingpandas, numpy
ChartsPlotly
Authenticationbcrypt password hashing
Data GenerationFaker
LanguagePython 3.9 to 3.13

System Requirements

  • Python 3.9 to 3.13 (3.10 or 3.11 recommended for the smoothest install).
  • Streamlit 1.58 for the dashboard and page routing.
  • pandas, numpy, and scikit-learn for data processing and machine learning.
  • Plotly for interactive charts and visualisations.
  • bcrypt for password hashing and Faker for synthetic data generation.
  • python-dateutil for date handling.
  • SQLite, which is bundled with Python, so no separate database server is needed.
  • Any modern browser and around 500 MB of free disk space.

Watch Project Demo

Watch the full project walkthrough and setup tutorial on our YouTube channel.

▶ Watch on YouTube – Decode It

More Details & Full Documentation

For complete project details, source code, and setup guide, visit the official project page.

🔗 View Full Project Details – UpdateGadh

Authentication Module

  • bcrypt hashed login system
  • Session state management
  • Role-based access control (Admin / Manager)

Admin Panel

  • View all registered users
  • Create new user accounts with hashed passwords
  • Check row counts for all 8 database tables
  • Delete resolved alerts

Dashboard Module

  • Live revenue, order count, unique customers, average order value
  • Period-over-period percentage change on every KPI
  • Daily revenue trend with 7-day moving average
  • Category-wise revenue donut chart and sales by channel
  • Top 10 products by revenue and dual-axis conversion rate chart

Forecasting Module

  • Revenue prediction with Random Forest, Gradient Boosting and Ridge Regression
  • Lag features (7, 14, 21, 28 days) and rolling mean / standard deviation
  • Calendar features: day of week, month, is_weekend
  • Forecast chart with confidence band and forecast table
  • Model accuracy metrics (MAE, RMSE, R2) and feature importance chart

Segmentation Module

  • RFM scoring (Recency, Frequency, Monetary) for 500 customers
  • KMeans clustering with automatic segment labels
  • PCA-based 2D cluster scatter plot
  • Revenue by segment chart and RFM score distribution histograms

Recommendation Module

  • Item-item collaborative filtering using cosine similarity
  • Customer-product purchase matrix
  • Top-N product recommendations per customer
  • Similar product lookup for any selected product

Inventory Module

  • Real-time stock levels across all 50 products
  • Low stock and out-of-stock automatic flagging
  • Demand forecast with a global Random Forest model (7 to 30 days)
  • Stock coverage days based on predicted demand

Alerts Module

  • Revenue drop above 20% versus previous day
  • Stock below 10 units and out-of-stock detection
  • Return rate above 15% and conversion rate below 2%
  • Severity levels (critical / warning) with timestamps
  • One-click alert resolution stored in the database
  1. Download and extract the ZIP file
  2. Open a terminal inside the project folder
  3. Create a virtual environment: python -m venv venv

Windows: venv\Scripts\activate

macOS / Linux: source venv/bin/activate

  1. Install libraries:

pip install --prefer-binary streamlit pandas numpy scikit-learn plotly faker bcrypt python-dateutil

  1. Run the app: streamlit run app.py
  2. Open the localhost URL shown in the terminal
  3. Login with the default credentials:

Admin - username: admin / password: admin123

Manager - username: manager / password: manager123

Stuck while running it? Chat with us on WhatsApp for free installation help.

SalesIQ is a Python-based business intelligence and machine learning application that helps businesses monitor sales performance, analyze customer behavior, forecast future revenue, and manage inventory. It provides an interactive dashboard with real-time KPIs, visual reports, and predictive analytics.

The project is developed using Python and Streamlit. It uses pandas and NumPy for data processing, scikit-learn for machine learning, SQLite for database management, Plotly for interactive visualizations, and bcrypt for secure user authentication.

The project includes several advanced features: Real-time sales KPI monitoring and analytics. Revenue forecasting using Random Forest, Gradient Boosting, and Ridge Regression. Customer segmentation using RFM analysis and KMeans clustering. Product recommendation using cosine similarity. Inventory monitoring and demand forecasting. Automated business KPI alerts. Admin and Manager role-based authentication.

No. The project runs locally on your computer without requiring an internet connection or an external database server. It automatically creates and populates an SQLite database with over 5,000 sales records, 500 customers, and 50 products when launched for the first time.

No reviews yet. Be the first to review this project.

Write a review

₹999.00

More Machine Learning Projects