Note
CustomerIQ is a production-grade full-stack machine learning platform built to solve customer stagnation. By transitioning from a one-size-fits-all marketing approach to smart, data-driven customer personas, the platform identifies distinct user segments, predicts individual churn risks, calculates lifetime value (CLV), and displays real-time actionable business metrics through a highly responsive React dashboard.
Experience the platform live across our fully deployed cloud architecture:
- 📊 Main React Dashboard: https://customeriq-intern.vercel.app
- 🧠 Streamlit ML Studio: Streamlit Community Cloud (Dashboard for Data Scientists)
- ⚙️ Backend API Docs: Swagger UI
graph TD
Client[📱 React SPA Dashboard<br>Hosted on Vercel] --> |REST API| FastAPI[🚀 FastAPI Backend<br>Hosted on Render]
FastAPI --> |Async SQLAlchemy| Postgres[(🐘 Neon PostgreSQL<br>Serverless DB)]
FastAPI --> |Cache & Rate Limiting| Redis[(⚡ Upstash Redis<br>Serverless Cache)]
Streamlit[📈 Streamlit ML Workspace<br>Hosted on Streamlit Cloud] --> Postgres
style Client fill:#000,stroke:#fff,stroke-width:2px,color:#fff
style FastAPI fill:#46E3B7,stroke:#333,stroke-width:2px,color:#000
style Postgres fill:#00E599,stroke:#333,stroke-width:2px,color:#000
style Redis fill:#00E88A,stroke:#333,stroke-width:2px,color:#000
style Streamlit fill:#FF4B4B,stroke:#333,stroke-width:2px,color:#fff
- 📊 Interactive Dashboard: High-level business metrics, revenue charts, and real-time data tables.
- 👥 Dynamic Customer Profiles: 8-metric radar charts, direct cohort categories, and tailored marketing directives.
- 🏷️ Intelligent Segmentation: Unsupervised ML clustering (K-Means/GMM) auto-labels customers into actionable personas (e.g., Premium Loyalists, At-Risk Churners).
- 📈 Advanced Analytics: Cohort retention grids, geographical heatmaps, and 3D RFM scatter plots.
- 🧪 Data Science Studio: Built-in Streamlit workspace for deep Exploratory Data Analysis (EDA) and hyperparameter tuning.
- 📥 Data Ingestion: Drag-and-drop CSV parser with automatic header mapping and validation.
- 📑 Business Reporting: Generate instant downloadable PDF and CSV reports.
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React 18, Vite, Zustand, TailwindCSS | Blazing fast, highly responsive UI and state management |
| Backend | FastAPI, Python 3.11 | High-performance asynchronous REST API |
| Database | PostgreSQL (Neon), SQLAlchemy | Robust relational data storage with async ORM |
| Caching | Redis (Upstash) | Sub-millisecond API query caching (TTL 300s) |
| Machine Learning | scikit-learn, Pandas | Customer clustering, PCA, and anomaly detection |
| Analytics App | Streamlit | Dedicated Data Scientist playground / EDA dashboard |
git clone https://github.com/Yogendra1823/CustomerIQ.git
cd CustomerIQ
cp .env.example .env(Fill in your local .env with your Neon database string and API keys).
cd backend
python -m venv venv
source venv/bin/activate # Or .\venv\Scripts\activate on Windows
pip install -r requirements.txt
alembic upgrade head
python scripts/seed_data.py
uvicorn app.main:app --reloadcd frontend
npm install
npm run devcd streamlit_app
pip install -r requirements.txt
streamlit run app.py- Preprocessing: Missing values imputed via KNN, outliers winsorized at 1%/99% percentiles, standard scaling applied.
- Dimensionality Reduction: Principal Component Analysis (PCA) retaining 95% of variance.
- Segmentation: Dynamic Elbow curve selection. K-Means/Gaussian Mixture Models fit to group customers.
- Persona Assignment: Clusters are mapped to business logic: Premium Loyalists, Growth Potential, Dormant Champions, New Explorers, At-Risk Churners, or Bargain Hunters.
- Churn Risk Estimation: Isolation Forest detects anomalies based on purchase frequency, recency, return rates, and cart abandonments.
- Successfully isolated 5 distinct customer segments with an average Silhouette score of
0.63. - Identified that the top segment (Premium Loyalists) accounts for 45% of total revenue.
- Developed a predictive reactivation strategy targeting Dormant Champions, projecting a potential 23% revenue lift.
Yogendra Medarametla
Built during an internship at Thiranex for the role of Data Analytics.
MIT License - Copyright (c) 2026 Yogendra Medarametla