How noruiz-04/churn-prediction-engine- works
This is a full-stack customer churn decision-intelligence platform. Analysts bring in customer data, which is profiled, transformed, validated, stored, and scored; the platform then supports churn and time-to-churn risk, uplift-based retention decisions, explanations, budget allocation, executive insights, and governance. The React dashboard exposes these capabilities through a FastAPI backend. The graph shows the ingestion and decision paths where source excerpts establish ownership; other README-described capabilities remain represented, but their internal links are omitted where implementation wiring was not shown.
Main entry points: pipeline.py Ingestion pipeline · decision_engine.py Decision engine · app.py FastAPI app · orchestrator.py Scoring orchestration
Components 26
Data ingestion
- File ingestion
backend/ingestion/service.py - Ingestion pipeline
backend/ingestion/pipeline.py - Schema profiling
backend/ingestion/profiling/schema_profiler.py - Schema mapping
backend/ingestion/mapping/schema_mapper.py - Feature engineering
backend/ingestion/processing/feature_engineering.py - Dataset registry
backend/ingestion/storage/dataset_registry.py
Scoring & intelligence
- Scoring orchestration
backend/scoring/orchestrator.py - Scoring insights
backend/scoring/insights_engine.py - Executive intelligence
backend/insights/executive_engine.py - Churn prediction
backend/services/predictor.py - Uplift modeling
backend/services/uplift_model.py - Time-to-churn
backend/services/survival_model.py - Scoring results
backend/storage/results_store.py
Retention decisions
- Decision engine
backend/services/decision_engine.py - Model explanations
backend/services/explainer.py - LLM explanations
backend/services/llm_explainer.py - Budget optimization
backend/optimizer/budget_optimizer.py
Dashboard & API
- Data upload
churn-dashboard/src/pages/DataSource.jsx - Dashboard routes
churn-dashboard/src/App.jsx - FastAPI app
backend/app.py - Ingestion endpoints
backend/api/ingestion_routers.py - Source connectors API
backend/api/data_sources.py - Uplift API
backend/routers/uplift_router.py - Model governance
backend/routers/governance.py - Executive reporting
backend/services/report_generator.py
Other components
- Analyst
Connections 27
- Analyst → Data upload: uploads data
README.md - Data upload → Ingestion endpoints: requests ingestion
- Dashboard routes → Data upload: routes to
churn-dashboard/src/App.jsx - FastAPI app → Ingestion endpoints: registers routes
backend/app.py - FastAPI app → Source connectors API: registers routes
backend/app.py - Ingestion endpoints → File ingestion: calls
backend/api/ingestion_routers.py - Source connectors API → Ingestion pipeline: invokes
backend/api/data_sources.py - File ingestion → Ingestion pipeline: runs
backend/ingestion/service.py - Ingestion pipeline → Schema profiling: profiles
backend/ingestion/pipeline.py - Ingestion pipeline → Schema mapping: maps schema
backend/ingestion/pipeline.py - Ingestion pipeline → Feature engineering: engineers features
backend/ingestion/pipeline.py - Ingestion pipeline → Dataset registry: stores dataset
backend/ingestion/pipeline.py - Ingestion pipeline → Scoring orchestration: starts scoring
backend/ingestion/pipeline.py - Scoring orchestration → Scoring insights: generates
backend/scoring/orchestrator.py - Scoring orchestration → Scoring results: stores results
backend/scoring/orchestrator.py - Executive intelligence → Decision engine: builds decisions
backend/insights/executive_engine.py - Decision engine → Churn prediction: predicts churn
backend/services/decision_engine.py - Decision engine → Uplift modeling: predicts uplift
backend/services/decision_engine.py - Decision engine → Time-to-churn: estimates timing
backend/services/decision_engine.py - Decision engine → Model explanations: explains drivers
backend/services/decision_engine.py - Decision engine → Budget optimization: computes value
backend/services/decision_engine.py - FastAPI app → Uplift API: registers routes
backend/app.py - Uplift API → Uplift modeling: trains and scores
backend/routers/uplift_router.py - Uplift API → LLM explanations: explains decisions
- FastAPI app → Model governance: registers routes
backend/app.py - FastAPI app → Executive reporting: registers report routes
backend/app.py - Executive intelligence → Analyst: returns insights
README.md