A production-style analytics platform for investigating e-commerce browsing, conversion, revenue, customer behaviour, data quality, and purchase propensity. It combines a polished React dashboard with a Flask analytics API backed by SQLite.
- Executive dashboard with revenue, customer, order, conversion, bounce, session, cart, purchase and rating metrics
- Responsive analysis workspace with dark/light themes, command palette (
Ctrl/Cmd + K), notifications, animated cards, and mobile navigation - CSV upload, searchable dataset preview, pagination, schema and quality statistics
- EDA descriptive statistics, distribution charts, correlation heatmap, purchase funnel, and insight engine
- K-Means segments, PCA projection, Random Forest prediction metrics, feature importance, and confusion matrix
- Filter-aware CSV, Excel and executive PDF exports
- A deterministic 1,500-row sample dataset automatically seeded into SQLite on first API request
frontend/ React + Vite + TypeScript UI and Recharts visualizations
backend/ Flask APIs, SQLite schema, seeded data, EDA and ML routines
backend/data/ Reserved for externally sourced CSV data snapshots
Prerequisites: Node.js 20+ and Python 3.10+.
npm run install:all
npm run serverIn a second terminal:
npm run devOpen http://localhost:5173. The frontend proxies /api calls to Flask on port 5000.
The seeded data includes customer ID, age, gender, location, device, session duration, pages viewed, category, cart value, purchase amount/status, payment method, coupon flag, returning flag, bounce, date, discount, rating, traffic source, and review.
For upload, CSV headers should include at least customer_id, purchase_amount, and purchase_status; retaining the full seeded schema enables every analytic view.
- Build the frontend with
npm run build; deployfrontend/distto any static host. - Run Flask behind Gunicorn or Waitress, setting the static host's API proxy target to Flask.
- Mount a persistent volume for
backend/commerce.dbwhen deployed in a container or PaaS.
pip install gunicorn
gunicorn --bind 0.0.0.0:5000 backend.app:appMIT. Built as an analytics portfolio and deployment-ready starter.