
Customer Decay Analyzer is an AI-powered churn prevention platform that predicts customer attrition 30-90 days in advance by detecting micro-behavioral signals traditional analytics miss. The system combines Google Gemini API for behavioral analysis, Qdrant vector database for pattern matching, and Anthropic Claude Opus 4 for AI-enhanced communications. Technical Architecture The Flask backend runs on Railway, processing customer data through an ETL pipeline using Pandas and NumPy. Gemini AI analyzes interaction patterns, purchase history, support tickets, and engagement metrics to generate risk scores (0-100), sentiment analysis, and intervention recommendations. Qdrant stores vector embeddings of customer profiles, enabling similarity searches against historical churn patterns to identify early warning signals. The React/TypeScript frontend, built with Vite and shadcn/ui, features an Express proxy with automatic fallback to mock data—ensuring demos remain functional offline. TanStack Query manages data fetching with intelligent caching. Dual-AI Intelligence Gemini provides behavioral risk assessment and vector embeddings. When generating retention emails, the frontend sends Gemini’s analysis to Claude Opus 4, which transforms technical insights into empathetic, personalized communications with context-aware strategies and retention offers. Core Features The dashboard includes AI-generated retention emails, intervention tracking via localStorage, interactive 90-day risk timeline charts (Recharts), real-time browser alerts for high-risk customers, executive insights summaries, and CSV export. Professional loading states and micro-animations deliver premium UX. Business Impact By providing 30-90 day early warnings and learning from historical patterns, the platform transforms reactive service into proactive relationship management—reducing churn 40-50% and increasing lifetime value 3-5x for SaaS companies, e-commerce platforms, and enterprise sales teams.
19 Nov 2025