How 21mohit-dotcom/ecommerce-return-risk-analyzer works
Customer Return Risk Analyzer combines an ML risk-scoring API with a planned analytics dashboard and MongoDB-backed application. The visible ML workflow cleans order data, simulates repeat-customer histories, aggregates customer features, trains a model, then serves scores and recommendations. The README also names React/Recharts, FastAPI, and MongoDB, but the backend and frontend directories contain no implementation files in the supplied tree; their integration and data flow therefore remain unverified.
Main entry points: backend Application backend · predict.py Prediction API · frontend Analytics dashboard · return_risk_model.pkl Risk model
Components 12
ML workflow
- Order data
- Data cleaning
ml/src/preprocess.py - Customer simulation
ml/src/simulate_customers.py - Feature aggregation
ml/src/aggregate_features.py - Model training
ml/src/train.py - Risk model
ml/models/return_risk_model.pkl
Risk serving
- Prediction API
ml/src/predict.py - Risk result
Application capabilities
- Analytics dashboard
frontend - Application backend
backend
Persistence
- MongoDB
Other components
- Dashboard user
Connections 7
- Model training → Risk model: saves model
ml/src/train.py - Prediction API → Risk model: loads model
ml/src/predict.py - Prediction API → Risk result: returns score
ml/src/predict.py - Dashboard user → Analytics dashboard: views insights
README.md - Analytics dashboard → Application backend: uses services
README.md - Application backend → MongoDB: stores data
README.md - Application backend → Prediction API: requests predictions