# vishnuu461-lab/vantara-intelligence-platform architecture

> Architecture diagram of the GitHub repository vishnuu461-lab/vantara-intelligence-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vishnuu461-lab/vantara-intelligence-platform
- Repository: https://github.com/vishnuu461-lab/vantara-intelligence-platform

## Overview

Vantara is a customer-intelligence platform: users browse customer records and business summaries, then inspect behavior, churn, lifetime value, segments, and combined insights; they can also bulk-import customers. The browser pages call a Flask API, whose route handlers read and update SQLAlchemy customer and purchase data and dispatch analysis to domain services. The README documents capabilities beyond the sampled implementation, including dashboard analytics, segmentation, and CSV cleaning. Several frontend API modules and backend route/service implementations were not excerpted, so those links reflect the source index or README rather than inspected call bodies.

Main entry points: [`routes/prediction_routes.py`](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/routes/prediction_routes.py) (Analysis routes), [`frontend/src/App.jsx`](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/App.jsx) (Page router), [`frontend/src/api/customerApi.js`](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/api/customerApi.js) (Customer API client), [`app.py`](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/app.py) (Flask application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app_ui["Page router<br/>[App.jsx]"]
  node_customer_pages["Customer pages<br/>[Customers.jsx]"]
  node_detail_page["Customer detail<br/>[CustomerDetail.jsx]"]
  node_dashboard_page["Dashboard page<br/>[Dashboard.jsx]"]
  node_behavior_page["Behavior page<br/>[BehaviorPage.jsx]"]
  node_churn_page["Churn page<br/>[ChurnPage.jsx]"]
  node_clv_page["CLV page<br/>[CLVPage.jsx]"]
  node_segments_page["Segments page<br/>[SegmentsPage.jsx]"]
  node_insights_page["Insights page<br/>[InsightsPage.jsx]"]
  node_upload_page["Upload page<br/>[UploadPage.jsx]"]
  node_customer_api["Customer API client<br/>[customerApi.js]"]
  node_dashboard_api["Dashboard API client<br/>[dashboardApi.js]"]
  node_prediction_api["Prediction API client<br/>[predictionApi.js]"]
  node_http_client["HTTP client<br/>[axios.js]"]
end

subgraph group_api["API layer"]
  node_flask_app["Flask application<br/>[app.py]"]
  node_customer_routes["Customer routes<br/>[customer_routes.py]"]
  node_dashboard_routes["Dashboard route"]
  node_prediction_routes["Analysis routes"]
  node_upload_routes["Upload route<br/>[upload_routes.py]"]
end

subgraph group_domain["Customer intelligence"]
  node_analytics["Behavior analytics"]
  node_churn["Churn prediction<br/>[churn_service.py]"]
  node_clv["Lifetime value<br/>[clv_service.py]"]
  node_segmentation["Segmentation"]
  node_insights["Unified insights"]
  node_features["Feature engineering"]
  node_anomaly["Anomaly detection<br/>[anomaly_service.py]"]
  node_next_purchase["Next purchase"]
  node_recommendation["Recommendations"]
  node_xai["Explainability<br/>[xai_service.py]"]
  node_cleaning["CSV cleaning<br/>[data_cleaning.py]"]
end

subgraph group_data["Customer data"]
  node_customer_model[("Customer records<br/>[customer.py]")]
  node_purchase_model[("Purchase records<br/>[purchase.py]")]
  node_db_extension["ORM extension<br/>[extensions.py]"]
end

node_user(("Business user"))

node_user -->|"uses"| node_app_ui
node_app_ui -->|"routes to"| node_customer_pages
node_app_ui -->|"routes to"| node_detail_page
node_app_ui -->|"routes to"| node_dashboard_page
node_app_ui -->|"routes to"| node_behavior_page
node_app_ui -->|"routes to"| node_churn_page
node_app_ui -->|"routes to"| node_clv_page
node_app_ui -->|"routes to"| node_segments_page
node_app_ui -->|"routes to"| node_insights_page
node_app_ui -->|"routes to"| node_upload_page
node_detail_page -->|"requests data"| node_customer_api
node_behavior_page -->|"requests data"| node_customer_api
node_behavior_page -->|"requests analysis"| node_prediction_api
node_insights_page -->|"requests insights"| node_customer_api
node_upload_page -->|"sends upload"| node_http_client
node_customer_api -->|"uses"| node_http_client
node_customer_pages -.->|"requests records"| node_customer_api
node_dashboard_page -.->|"requests metrics"| node_dashboard_api
node_churn_page -.->|"requests prediction"| node_customer_api
node_clv_page -.->|"requests prediction"| node_customer_api
node_segments_page -.->|"requests segments"| node_customer_api
node_dashboard_api -.->|"uses"| node_http_client
node_prediction_api -.->|"uses"| node_http_client
node_http_client -.->|"sends HTTP"| node_flask_app
node_flask_app -->|"registers"| node_customer_routes
node_flask_app -->|"registers"| node_dashboard_routes
node_flask_app -->|"registers"| node_prediction_routes
node_flask_app -->|"registers"| node_upload_routes
node_customer_routes -->|"reads and writes"| node_customer_model
node_customer_routes -->|"reads"| node_purchase_model
node_dashboard_routes -->|"queries"| node_customer_model
node_dashboard_routes -->|"queries"| node_purchase_model
node_prediction_routes -->|"dispatches"| node_analytics
node_prediction_routes -->|"dispatches"| node_churn
node_prediction_routes -->|"dispatches"| node_clv
node_prediction_routes -->|"dispatches"| node_segmentation
node_prediction_routes -->|"dispatches"| node_insights
node_prediction_routes -->|"dispatches"| node_features
node_prediction_routes -->|"dispatches"| node_anomaly
node_prediction_routes -->|"dispatches"| node_next_purchase
node_prediction_routes -->|"dispatches"| node_recommendation
node_prediction_routes -->|"dispatches"| node_xai
node_upload_routes -->|"cleans input"| node_cleaning
node_upload_routes -->|"stores customers"| node_customer_model
node_insights -->|"calls"| node_analytics
node_insights -->|"calls"| node_churn
node_insights -->|"calls"| node_clv
node_insights -->|"calls"| node_segmentation

click node_app_ui "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/App.jsx"
click node_customer_pages "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/Customers.jsx"
click node_detail_page "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/CustomerDetail.jsx"
click node_dashboard_page "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/Dashboard.jsx"
click node_behavior_page "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/BehaviorPage.jsx"
click node_churn_page "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/ChurnPage.jsx"
click node_clv_page "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/CLVPage.jsx"
click node_segments_page "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/SegmentsPage.jsx"
click node_insights_page "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/InsightsPage.jsx"
click node_upload_page "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/UploadPage.jsx"
click node_customer_api "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/api/customerApi.js"
click node_dashboard_api "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/api/dashboardApi.js"
click node_prediction_api "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/api/predictionApi.js"
click node_http_client "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/api/axios.js"
click node_flask_app "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/app.py"
click node_customer_routes "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/routes/customer_routes.py"
click node_dashboard_routes "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/routes/dashboard_routes.py"
click node_prediction_routes "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/routes/prediction_routes.py"
click node_upload_routes "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/routes/upload_routes.py"
click node_analytics "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/analytics_service.py"
click node_churn "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/churn_service.py"
click node_clv "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/clv_service.py"
click node_segmentation "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/segmentation_service.py"
click node_insights "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/insights_service.py"
click node_features "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/feature_engineering.py"
click node_anomaly "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/anomaly_service.py"
click node_next_purchase "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/next_purchase_service.py"
click node_recommendation "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/recommendation_service.py"
click node_xai "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/xai_service.py"
click node_cleaning "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/utils/data_cleaning.py"
click node_customer_model "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/models/customer.py"
click node_purchase_model "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/models/purchase.py"
click node_db_extension "https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/extensions.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app_ui,node_customer_pages,node_detail_page,node_dashboard_page,node_behavior_page,node_churn_page,node_clv_page,node_segments_page,node_insights_page,node_upload_page,node_customer_api,node_dashboard_api,node_prediction_api,node_http_client,node_user toneBlue
class node_flask_app,node_customer_routes,node_dashboard_routes,node_prediction_routes,node_upload_routes toneAmber
class node_analytics,node_churn,node_clv,node_segmentation,node_insights,node_features,node_anomaly,node_next_purchase,node_recommendation,node_xai,node_cleaning toneMint
class node_customer_model,node_purchase_model,node_db_extension toneRose
```

## Components

### Web experience

- [Page router](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Customer pages](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/Customers.jsx): `frontend/src/pages/Customers.jsx`
- [Customer detail](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/CustomerDetail.jsx): `frontend/src/pages/CustomerDetail.jsx`
- [Dashboard page](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Behavior page](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/BehaviorPage.jsx): `frontend/src/pages/BehaviorPage.jsx`
- [Churn page](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/ChurnPage.jsx): `frontend/src/pages/ChurnPage.jsx`
- [CLV page](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/CLVPage.jsx): `frontend/src/pages/CLVPage.jsx`
- [Segments page](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/SegmentsPage.jsx): `frontend/src/pages/SegmentsPage.jsx`
- [Insights page](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/InsightsPage.jsx): `frontend/src/pages/InsightsPage.jsx`
- [Upload page](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/pages/UploadPage.jsx): `frontend/src/pages/UploadPage.jsx`
- [Customer API client](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/api/customerApi.js): `frontend/src/api/customerApi.js`
- [Dashboard API client](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/api/dashboardApi.js): `frontend/src/api/dashboardApi.js`
- [Prediction API client](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/api/predictionApi.js): `frontend/src/api/predictionApi.js`
- [HTTP client](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/frontend/src/api/axios.js): `frontend/src/api/axios.js`

### API layer

- [Flask application](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/app.py): `app.py`
- [Customer routes](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/routes/customer_routes.py): `routes/customer_routes.py`
- [Dashboard route](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/routes/dashboard_routes.py): `routes/dashboard_routes.py`
- [Analysis routes](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/routes/prediction_routes.py): `routes/prediction_routes.py`
- [Upload route](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/routes/upload_routes.py): `routes/upload_routes.py`

### Customer intelligence

- [Behavior analytics](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/analytics_service.py): `services/analytics_service.py`
- [Churn prediction](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/churn_service.py): `services/churn_service.py`
- [Lifetime value](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/clv_service.py): `services/clv_service.py`
- [Segmentation](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/segmentation_service.py): `services/segmentation_service.py`
- [Unified insights](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/insights_service.py): `services/insights_service.py`
- [Feature engineering](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/feature_engineering.py): `services/feature_engineering.py`
- [Anomaly detection](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/anomaly_service.py): `services/anomaly_service.py`
- [Next purchase](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/next_purchase_service.py): `services/next_purchase_service.py`
- [Recommendations](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/recommendation_service.py): `services/recommendation_service.py`
- [Explainability](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/services/xai_service.py): `services/xai_service.py`
- [CSV cleaning](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/utils/data_cleaning.py): `utils/data_cleaning.py`

### Customer data

- [Customer records](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/models/customer.py): `models/customer.py`
- [Purchase records](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/models/purchase.py): `models/purchase.py`
- [ORM extension](https://github.com/vishnuu461-lab/vantara-intelligence-platform/blob/main/extensions.py): `extensions.py`

### Other components

- **Business user**

## Connections

- Business user → Page router: uses (evidence: `frontend/src/App.jsx`)
- Page router → Customer pages: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Customer detail: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Dashboard page: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Behavior page: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Churn page: routes to (evidence: `frontend/src/App.jsx`)
- Page router → CLV page: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Segments page: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Insights page: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Upload page: routes to (evidence: `frontend/src/App.jsx`)
- Customer detail → Customer API client: requests data (evidence: `frontend/src/pages/CustomerDetail.jsx`)
- Behavior page → Customer API client: requests data (evidence: `frontend/src/pages/BehaviorPage.jsx`)
- Behavior page → Prediction API client: requests analysis (evidence: `frontend/src/pages/BehaviorPage.jsx`)
- Insights page → Customer API client: requests insights (evidence: `frontend/src/pages/InsightsPage.jsx`)
- Upload page → HTTP client: sends upload (evidence: `frontend/src/pages/UploadPage.jsx`)
- Customer API client → HTTP client: uses (evidence: `frontend/src/api/customerApi.js`)
- Customer pages → Customer API client: requests records
- Dashboard page → Dashboard API client: requests metrics
- Churn page → Customer API client: requests prediction
- CLV page → Customer API client: requests prediction (evidence: `frontend/src/pages/CLVPage.jsx`)
- Segments page → Customer API client: requests segments
- Dashboard API client → HTTP client: uses
- Prediction API client → HTTP client: uses
- HTTP client → Flask application: sends HTTP
- Flask application → Customer routes: registers (evidence: `app.py`)
- Flask application → Dashboard route: registers (evidence: `app.py`)
- Flask application → Analysis routes: registers (evidence: `app.py`)
- Flask application → Upload route: registers (evidence: `app.py`)
- Customer routes → Customer records: reads and writes (evidence: `routes/customer_routes.py`)
- Customer routes → Purchase records: reads (evidence: `routes/customer_routes.py`)
- Dashboard route → Customer records: queries (evidence: `routes/dashboard_routes.py`)
- Dashboard route → Purchase records: queries (evidence: `routes/dashboard_routes.py`)
- Analysis routes → Behavior analytics: dispatches (evidence: `routes/prediction_routes.py`)
- Analysis routes → Churn prediction: dispatches (evidence: `routes/prediction_routes.py`)
- Analysis routes → Lifetime value: dispatches (evidence: `routes/prediction_routes.py`)
- Analysis routes → Segmentation: dispatches (evidence: `routes/prediction_routes.py`)
- Analysis routes → Unified insights: dispatches (evidence: `routes/prediction_routes.py`)
- Analysis routes → Feature engineering: dispatches (evidence: `routes/prediction_routes.py`)
- Analysis routes → Anomaly detection: dispatches (evidence: `routes/prediction_routes.py`)
- Analysis routes → Next purchase: dispatches (evidence: `routes/prediction_routes.py`)
- Analysis routes → Recommendations: dispatches (evidence: `routes/prediction_routes.py`)
- Analysis routes → Explainability: dispatches (evidence: `routes/prediction_routes.py`)
- Upload route → CSV cleaning: cleans input (evidence: `routes/upload_routes.py`)
- Upload route → Customer records: stores customers (evidence: `routes/upload_routes.py`)
- Unified insights → Behavior analytics: calls (evidence: `services/insights_service.py`)
- Unified insights → Churn prediction: calls (evidence: `services/insights_service.py`)
- Unified insights → Lifetime value: calls (evidence: `services/insights_service.py`)
- Unified insights → Segmentation: calls (evidence: `services/insights_service.py`)
