Skip to content

Latest commit

Β 

History

103 Commits

Folders and files

Repository files navigation

πŸš€ Ecommerce Product Analytics SaaS Dashboard

Transform raw ecommerce transactions into actionable business intelligence.

A modern analytics platform built with Next.js, TypeScript, Tailwind CSS and a CSV-powered analytics engine.

Next.js React TypeScript TailwindCSS License Vercel


Overview

The Intelligent E-Commerce Analytics Dashboard is a production-style SaaS analytics platform that transforms raw ecommerce transaction data into actionable business intelligence through interactive visualizations and analytics APIs.

Built using modern full-stack technologies, it combines a lightweight analytics API with an elegant dashboard interface to provide real-time insights into:

  • Revenue performance
  • Product trends
  • Customer behavior
  • Geographic sales distribution
  • Operational KPIs
  • AI-generated business recommendations

The repository also includes the complete analytics pipeline used to clean, transform, and analyze the underlying dataset, making it both a production-style SaaS application and a comprehensive data analytics project.


Live Demo

🌐 Live Dashboard

Vercel

Experience the fully interactive production deployment built with Next.js and TypeScript.

Previous Streamlit Prototype

Streamlit Prototype

Original proof-of-concept version before migration to the modern SaaS architecture.


Features

Business Analytics

Revenue Intelligence

  • Monthly revenue tracking
  • Dynamic trend visualization
  • Growth indicators
  • KPI monitoring

Product Analytics

  • Top-performing products
  • Revenue contribution analysis
  • Product search
  • Dynamic filtering

Customer Intelligence

  • Customer segmentation
  • Total customer metrics
  • Geographic distribution
  • Recent order tracking

Country Analytics

  • Country-wise revenue
  • Sales contribution charts
  • Regional business insights

AI Insights Engine

Automatically generates observations such as:

  • Highest revenue markets
  • Best-selling products
  • Revenue concentration
  • Customer growth patterns
  • Business recommendations

Modern SaaS Experience

  • Responsive layout
  • Dark / Light mode
  • Glassmorphism UI
  • Animated interactions
  • Collapsible sidebar
  • Mobile navigation drawer
  • Notification center
  • Profile menu
  • CSV export functionality

Smart Filtering

Users can dynamically filter the entire dashboard using:

  • Product Search
  • Country Filter
  • Timeline Filter
  • 7D / 30D / Full Revenue Views

All charts and KPIs update automatically.


Architecture

                        CSV Dataset
                              β”‚
                              β–Ό
                  Next.js API Route
                    (/api/analytics)
                              β”‚
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β–Ό              β–Ό              β–Ό
        Revenue Logic   Product Logic   Customer Logic
               β”‚              β”‚              β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β–Ό
                   Analytics JSON API
                              β”‚
                              β–Ό
                  React Dashboard UI
                              β”‚
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β–Ό              β–Ό              β–Ό
          Charts         KPI Cards      AI Insights

Technology Stack

Frontend

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind CSS
  • shadcn/ui
  • Recharts
  • Lucide React

Backend

  • Next.js API Routes
  • Node.js
  • PapaParse
  • CSV Processing
  • File System API

Data Analytics

  • Python
  • Pandas
  • NumPy
  • SQL
  • Jupyter Notebook
  • Matplotlib
  • Seaborn

Project Structure

ecommerce-saas-dashboard/
β”‚
β”œβ”€β”€ app/                           # Next.js App Router
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   └── analytics/
β”‚   β”‚       └── route.ts           # Analytics API
β”‚   β”œβ”€β”€ globals.css
β”‚   β”œβ”€β”€ layout.tsx
β”‚   └── page.tsx                   # Main SaaS Dashboard
β”‚
β”œβ”€β”€ components/
β”‚   └── ui/                        # Reusable UI components
β”‚       β”œβ”€β”€ button.tsx
β”‚       β”œβ”€β”€ card.tsx
β”‚       β”œβ”€β”€ table.tsx
β”‚       └── tabs.tsx
β”‚
β”œβ”€β”€ dashboard/                     # Legacy Streamlit prototype
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ pages/
β”‚   └── styles/
β”‚
β”œβ”€β”€ data/
β”‚   └── processed/
β”‚       └── cleaned_online_retail.csv
β”‚
β”œβ”€β”€ notebooks/                     # Data analysis notebooks
β”‚   β”œβ”€β”€ 01_data_inspection.ipynb
β”‚   β”œβ”€β”€ 02_rfm_segmentation.ipynb
β”‚   β”œβ”€β”€ 03_cohort_analysis.ipynb
β”‚   β”œβ”€β”€ 04_CLV.ipynb
β”‚   β”œβ”€β”€ 05_product_analysis.ipynb
β”‚   └── 06_churn_analysis.ipynb
β”‚
β”œβ”€β”€ outputs/
β”‚   β”œβ”€β”€ figures/                   # Generated visualizations
β”‚   └── reports/
β”‚       └── insights.md
β”‚
β”œβ”€β”€ sql/
β”‚   └── analysis_queries.sql
β”‚
β”œβ”€β”€ src/
β”‚   └── utils.py
β”‚
β”œβ”€β”€ public/
β”œβ”€β”€ package.json
β”œβ”€β”€ next.config.ts
β”œβ”€β”€ eslint.config.mjs
β”œβ”€β”€ tsconfig.json
└── README.md

Repository Organization

This repository consists of two connected layers.

1. Analytics Engine

Responsible for:

  • Data cleaning
  • Revenue aggregation
  • RFM segmentation
  • CLV analysis
  • Cohort analysis
  • Customer churn exploration
  • SQL analytics

Built using:

  • Python
  • Pandas
  • NumPy
  • SQL
  • Jupyter Notebook

2. SaaS Dashboard

Provides an interactive analytics experience with:

  • KPI monitoring
  • Revenue visualization
  • Product & customer analytics
  • Geographic insights
  • Intelligent business insights engine

Built using:

  • Next.js
  • TypeScript
  • Tailwind CSS
  • shadcn/ui
  • Recharts

API

Endpoint

GET /api/analytics

The analytics API processes the cleaned ecommerce dataset and dynamically generates dashboard-ready JSON.

Response

{
  "revenue": "...",
  "orders": "...",
  "customers": "...",
  "topProducts": [],
  "topCountries": [],
  "recentOrders": [],
  "aiInsights": []
}

Dataset

Source: Online Retail Dataset (UCI Machine Learning Repository)

Core Fields

Field Description
Invoice Transaction ID
Customer ID Unique Customer
Description Product Name
Quantity Units Purchased
Revenue Transaction Revenue
Country Customer Country
YearMonth Aggregated Month

Local Development

Clone Repository

git clone https://github.com/garv999/ecommerce-product-analytics.git

Install Dependencies

npm install

Start Development Server

npm run dev

Visit:

http://localhost:3000

Deployment

The application is optimized for deployment on Vercel.

npm run build

Production build is fully optimized and deployment-ready.


Engineering Highlights

  • API-first architecture
  • CSV-driven analytics pipeline
  • Responsive SaaS interface
  • Persistent theme management
  • Dynamic client-side filtering
  • Reusable component system
  • Production-ready Next.js structure

Author

Garv Agarwal

Computer Science (Data Science) undergraduate passionate about building AI products, analytics platforms, and modern SaaS applications.


License

This project is available under the MIT License.


Turning data into business decisions.

Built with Next.js β€’ TypeScript β€’ Tailwind CSS β€’ Recharts β€’ Data Analytics