How rahulshamra/bizmind-ai- works
BizMind AI is a business-intelligence dashboard for customer risk segmentation, demand/revenue forecasting, analytics, and AI chat. Users enter through the dashboard’s routed pages: views load dashboard or prediction data, customers can browse risk segments or submit an individual prediction, and forecasts expose product-level demand and history. The sampled code confirms customer and demand API/model paths and frontend calls; chat, analytics services, and RAG internals are present in the tree but unsampled, so their internal links are omitted or shown as unverified.
Main entry points: App.jsx Page router · customer_routes.py Customer endpoints · Predictions.jsx Forecast view · demand_routes.py Demand endpoints
Components 26
Web dashboard
- Page router
frontend/src/App.jsx - Overview
frontend/src/pages/Dashboard.jsx - Customer view
frontend/src/pages/Customers.jsx - Forecast view
frontend/src/pages/Predictions.jsx - Analytics view
frontend/src/pages/Analytics.jsx - Chat view
frontend/src/pages/Chat.jsx - Risk chart
frontend/src/components/CustomerSegmentChart.jsx - Segment predictor
frontend/src/components/SegmentPredictor.jsx - API client
frontend/src/services/api.js - Mock responses
frontend/src/data/mockData.js
API application
- FastAPI app
backend/app/main.py - Customer endpoints
backend/app/api/routes/customer_routes.py - Demand endpoints
backend/app/api/routes/demand_routes.py
Prediction models
- Customer segmentation
backend/app/ml/customer_segmentation.py - Demand forecasting
backend/app/ml/demand_forecasting.py - Model loading
backend/app/ml/model_loader.py - 30-day prediction
backend/app/ml/next30_predection.py
AI assistance
- AI agent and chains
backend/app/ai/agent.py - Chat service
backend/app/services/chat_service.py - RAG retrieval
backend/app/rag/retriever.py - Embeddings
backend/app/rag/embeddings.py - Knowledge ingestion
backend/app/rag/ingestion.py
Data services
- Vector store
backend/app/rag/vector_store.py - Database setup
backend/app/database.py - Analytics service
backend/app/services/analytics_service.py
Other components
- Business user
Connections 30
- Business user → Page router: opens
- Page router → Overview: routes to
frontend/src/App.jsx - Page router → Customer view: routes to
frontend/src/App.jsx - Page router → Forecast view: routes to
frontend/src/App.jsx - Page router → Analytics view: routes to
frontend/src/App.jsx - Page router → Chat view: routes to
frontend/src/App.jsx - Customer view → Risk chart: renders
frontend/src/pages/Customers.jsx - Customer view → Segment predictor: renders
frontend/src/pages/Customers.jsx - Overview → API client: requests data
frontend/src/pages/Dashboard.jsx - Forecast view → API client: requests forecast
frontend/src/pages/Predictions.jsx - API client → Mock responses: uses fallback
frontend/src/services/api.js - Risk chart → Customer endpoints: fetches graph
frontend/src/components/CustomerSegmentChart.jsx - Segment predictor → Customer endpoints: submits prediction
frontend/src/components/SegmentPredictor.jsx - Forecast view → Demand endpoints: fetches forecasts
frontend/src/pages/Predictions.jsx - FastAPI app → Customer endpoints: registers routes
backend/app/main.py - FastAPI app → Demand endpoints: registers routes
backend/app/main.py - FastAPI app → Model loading: loads models
backend/app/main.py - Customer endpoints → Customer segmentation: calls predictions
backend/app/api/routes/customer_routes.py - Demand endpoints → Demand forecasting: calls forecasts
backend/app/api/routes/demand_routes.py - Customer endpoints → Model loading: reads loaded model
- Demand endpoints → Model loading: reads loaded model
- Chat view → AI agent and chains: uses chat
- AI agent and chains → Chat service: delegates
- Chat service → RAG retrieval: retrieves context
- RAG retrieval → Embeddings: embeds queries
- Knowledge ingestion → Embeddings: creates vectors
- Knowledge ingestion → Vector store: stores vectors
- RAG retrieval → Vector store: searches vectors
- Forecast view → 30-day prediction: offers 30-day forecast
- Analytics view → Analytics service: loads analytics