Skip to content

Repository files navigation

📊 MerchantPulse AI

Intelligent Merchant & Customer Analytics Platform for Digital Payments

Python SQLite Streamlit Power BI License


🎯 What is MerchantPulse AI?

MerchantPulse AI is an enterprise-grade analytics platform that simulates the internal data infrastructure of a digital payments company like PhonePe, Razorpay, or Google Pay.

It demonstrates the complete data lifecycle — from database design and synthetic data generation, through SQL analytics and machine learning, to interactive dashboards and a Streamlit web application.

This is not a college project. It's built to the standards expected at companies like PhonePe, ZS Associates, American Express, Deloitte, PwC, and Amazon.


🏗️ Architecture Overview

Source Systems → Data Ingestion → Storage → Processing → Analytics → ML Models → Dashboards
Layer Technology Purpose
Database SQLite (PostgreSQL-compatible) 12-table star schema with 2M+ transactions
Data Pipeline Python, Pandas, NumPy Cleaning, validation, feature engineering
SQL Analytics 50+ production queries Revenue, merchant, customer, fraud, geo analytics
Machine Learning XGBoost, LightGBM, Prophet, K-Means Churn, fraud, segmentation, forecasting
Dashboard Power BI 6-page executive BI dashboard
Web App Streamlit 6-page interactive analytics application

📐 Full Architecture Document →


📁 Project Structure

MerchantPulse-AI/
├── config/          # Central configuration & settings
├── database/        # Schema DDL & synthetic data generator
├── sql/             # 50+ business analytics queries
├── notebooks/       # Jupyter analysis notebooks (EDA, ML)
├── src/             # Production Python modules
│   ├── models/      # ML model implementations
│   └── utils/       # Database connector & helpers
├── streamlit_app/   # Interactive web application
├── powerbi/         # Power BI dashboard & screenshots
├── data/            # Raw → Processed → Features pipeline
├── models/          # Saved ML model artifacts
├── reports/         # Business insights & analysis
├── docs/            # Architecture, ERD, data dictionary
└── tests/           # Data quality & model tests

🚀 Quick Start

Prerequisites

  • Python 3.10+
  • Power BI Desktop (for .pbix dashboard)

Setup & Local Installation

# Clone the repository
git clone https://github.com/Harikas06/MerchantPulse-AI.git
cd MerchantPulse-AI

# Create virtual environment
python -m venv venv
venv\Scripts\activate  # Windows
# source venv/bin/activate  # macOS/Linux

# Install dependencies
pip install -r requirements.txt

# Launch Streamlit app
streamlit run streamlit_app/app.py

☁️ Streamlit Community Cloud Deployment

  1. Connect your GitHub account to share.streamlit.io.
  2. Select repository: Harikas06/MerchantPulse-AI (Branch: main).
  3. Set Main file path: streamlit_app/app.py.
  4. Click Deploy! — The application deploys zero-config ready out of the box.

📊 Key Features

1. Relational Database (Star Schema)

  • 12 tables — 6 dimension, 4 fact, 2 aggregate
  • 2M+ transactions across 5,000 merchants and 50,000 customers
  • Covers Jan 2023 – Jun 2025 (2.5 years)

2. SQL Analytics

  • 50+ business queries organized by: Revenue, Merchant, Customer, Fraud, Geographic, Operational
  • Uses CTEs, window functions, cohort analysis, funnel analysis

3. Machine Learning Models

Model Algorithm Business Use
Customer Churn XGBoost + LightGBM Identify at-risk customers for retention
Fraud Detection Isolation Forest Flag suspicious transactions
Segmentation K-Means + RFM Target marketing campaigns
Forecasting Prophet Revenue planning & projections

4. Power BI Dashboard

  • Executive Summary, Merchant Deep-Dive, Customer Insights
  • Geographic View, Fraud & Risk, Payment Mix

5. Streamlit Web App

  • Real-time KPIs with trend indicators
  • Interactive filters (date, city, category, payment method)
  • ML model playground for live predictions

📈 KPI Framework

Pillar Key Metrics
💰 Revenue GMV, Take Rate, ARPU, MoM Growth
🏪 Merchant Active Count, Activation Rate, Churn Rate, Health Score
👤 Customer MAU, CLV, Frequency, Cohort Retention
⚡ Operations Success Rate, Avg Ticket Size, Settlement Cycle
🛡️ Risk Fraud Rate, Detection Rate, Dispute Rate

🛠️ Tech Stack

Category Technologies
Language Python 3.10+, SQL
Database SQLite (PostgreSQL-compatible schema)
Data Pandas, NumPy, SciPy, Faker
Visualization Matplotlib, Seaborn, Plotly
ML Scikit-learn, XGBoost, LightGBM, Prophet, SHAP
Web App Streamlit
BI Power BI Desktop
Quality Great Expectations

📄 Documentation


📝 License

This project is licensed under the MIT License.


🤝 About

Built as a portfolio project demonstrating enterprise-level data analytics skills for roles at digital payment companies, consulting firms, and technology organizations.

Skills Demonstrated: Database Design · SQL Analytics · Python Data Engineering · EDA · Machine Learning · Power BI · Streamlit · Business Communication

About

Enterprise Digital Payments Analytics Platform with SQL Analytics, Machine Learning, Streamlit & Power BI Dashboards.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages