# kishorsama/bizconnect-ai architecture

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

- Interactive diagram: https://gitdiagram.com/kishorsama/bizconnect-ai
- Repository: https://github.com/kishorsama/bizconnect-ai

## Overview

BizConnect AI is a role-based vendor-management and commerce web application. Customers browse products and place orders; vendors manage products and stock; admins oversee the marketplace. The server handles application APIs and connects to MongoDB, while its ML service exposes prediction and analytics capabilities through Python. The README also describes payments, notifications, chatbot/voice interaction, and dashboards; several corresponding frontend modules are present, but their implementation details were not sampled. Edges reflect sampled calls or README-documented capabilities, not inferred module-to-module wiring.

Main entry points: [`server.js`](https://github.com/kishorsama/bizconnect-ai/blob/master/server.js) (Application API), [`public`](https://github.com/kishorsama/bizconnect-ai/tree/master/public) (Role-based pages), [`ml-models/run_ml_pipeline.py`](https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/run_ml_pipeline.py) (ML pipeline runner), [`public/js/auth.js`](https://github.com/kishorsama/bizconnect-ai/blob/master/public/js/auth.js) (Authentication UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_web_pages["Role-based pages"]
  node_auth["Authentication UI<br/>[auth.js]"]
  node_chatbot["Chatbot and voice<br/>[chatbot.js]"]
  node_vendor_ui["Vendor dashboard"]
  node_analytics_ui["Reports and dashboards<br/>[reports.js]"]
end

subgraph group_commerce["Commerce services"]
  node_api_server["Application API<br/>[server.js]"]
  node_catalog["Product and vendor management<br/>[server.js]"]
  node_orders["Cart and orders<br/>[server.js]"]
  node_payments["Payment tracking<br/>[server.js]"]
end

subgraph group_intelligence["ML and insights"]
  node_ml_service["ML service<br/>[ml_service.js]"]
  node_ml_cli["Prediction command interface"]
  node_predictor["Predictions and insights<br/>[ml_predictor.py]"]
  node_feature_engineering["Feature engineering"]
  node_training["Model training<br/>[model_trainer.py]"]
  node_pipeline["ML pipeline runner<br/>[run_ml_pipeline.py]"]
end

subgraph group_persistence["Persistence and integrations"]
  node_mongo[("MongoDB")]
  node_stripe["Stripe"]
  node_notifications["SMS and notifications"]
end

node_customer(("Customer"))
node_vendor(("Vendor"))
node_admin(("Admin"))

node_customer -->|"browses and orders"| node_web_pages
node_vendor -->|"manages business"| node_web_pages
node_admin -->|"oversees marketplace"| node_web_pages
node_web_pages -->|"uses role access"| node_auth
node_auth -->|"authenticates"| node_api_server
node_vendor_ui -->|"manages catalog"| node_api_server
node_analytics_ui -->|"requests analytics"| node_api_server
node_chatbot -.->|"requests assistance"| node_api_server
node_api_server -->|"serves catalog APIs"| node_catalog
node_api_server -->|"serves order APIs"| node_orders
node_api_server -->|"creates checkout"| node_payments
node_api_server -->|"calls ML service"| node_ml_service
node_ml_service -->|"runs predictions"| node_ml_cli
node_ml_cli -->|"dispatches commands"| node_predictor
node_pipeline -->|"runs feature stage"| node_feature_engineering
node_pipeline -->|"runs training stage"| node_training
node_api_server -->|"stores application data"| node_mongo
node_api_server -->|"creates payment sessions"| node_stripe
node_api_server -.->|"sends notifications"| node_notifications

click node_web_pages "https://github.com/kishorsama/bizconnect-ai/tree/master/public"
click node_auth "https://github.com/kishorsama/bizconnect-ai/blob/master/public/js/auth.js"
click node_chatbot "https://github.com/kishorsama/bizconnect-ai/blob/master/public/js/chatbot.js"
click node_vendor_ui "https://github.com/kishorsama/bizconnect-ai/blob/master/public/js/vendor-dashboard.js"
click node_analytics_ui "https://github.com/kishorsama/bizconnect-ai/blob/master/public/js/reports.js"
click node_api_server "https://github.com/kishorsama/bizconnect-ai/blob/master/server.js"
click node_catalog "https://github.com/kishorsama/bizconnect-ai/blob/master/server.js"
click node_orders "https://github.com/kishorsama/bizconnect-ai/blob/master/server.js"
click node_payments "https://github.com/kishorsama/bizconnect-ai/blob/master/server.js"
click node_ml_service "https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/ml_service.js"
click node_ml_cli "https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/ml_predictor_cli.py"
click node_predictor "https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/ml_predictor.py"
click node_feature_engineering "https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/feature_engineering.py"
click node_training "https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/model_trainer.py"
click node_pipeline "https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/run_ml_pipeline.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_web_pages,node_auth,node_chatbot,node_vendor_ui,node_analytics_ui toneBlue
class node_api_server,node_catalog,node_orders,node_payments toneAmber
class node_ml_service,node_ml_cli,node_predictor,node_feature_engineering,node_training,node_pipeline toneMint
class node_mongo,node_stripe,node_notifications toneRose
class node_customer,node_vendor,node_admin toneIndigo
```

## Components

### Web experience

- [Role-based pages](https://github.com/kishorsama/bizconnect-ai/tree/master/public): `public`
- [Authentication UI](https://github.com/kishorsama/bizconnect-ai/blob/master/public/js/auth.js): `public/js/auth.js`
- [Chatbot and voice](https://github.com/kishorsama/bizconnect-ai/blob/master/public/js/chatbot.js): `public/js/chatbot.js`
- [Vendor dashboard](https://github.com/kishorsama/bizconnect-ai/blob/master/public/js/vendor-dashboard.js): `public/js/vendor-dashboard.js`
- [Reports and dashboards](https://github.com/kishorsama/bizconnect-ai/blob/master/public/js/reports.js): `public/js/reports.js`

### Commerce services

- [Application API](https://github.com/kishorsama/bizconnect-ai/blob/master/server.js): `server.js`
- [Product and vendor management](https://github.com/kishorsama/bizconnect-ai/blob/master/server.js): `server.js`
- [Cart and orders](https://github.com/kishorsama/bizconnect-ai/blob/master/server.js): `server.js`
- [Payment tracking](https://github.com/kishorsama/bizconnect-ai/blob/master/server.js): `server.js`

### ML and insights

- [ML service](https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/ml_service.js): `ml-models/ml_service.js`
- [Prediction command interface](https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/ml_predictor_cli.py): `ml-models/ml_predictor_cli.py`
- [Predictions and insights](https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/ml_predictor.py): `ml-models/ml_predictor.py`
- [Feature engineering](https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/feature_engineering.py): `ml-models/feature_engineering.py`
- [Model training](https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/model_trainer.py): `ml-models/model_trainer.py`
- [ML pipeline runner](https://github.com/kishorsama/bizconnect-ai/blob/master/ml-models/run_ml_pipeline.py): `ml-models/run_ml_pipeline.py`

### Persistence and integrations

- **MongoDB**
- **Stripe**
- **SMS and notifications**

### Other components

- **Customer**
- **Vendor**
- **Admin**

## Connections

- Customer → Role-based pages: browses and orders (evidence: `README.md`)
- Vendor → Role-based pages: manages business (evidence: `README.md`)
- Admin → Role-based pages: oversees marketplace (evidence: `README.md`)
- Role-based pages → Authentication UI: uses role access (evidence: `README.md`)
- Authentication UI → Application API: authenticates (evidence: `README.md`)
- Vendor dashboard → Application API: manages catalog (evidence: `README.md`)
- Reports and dashboards → Application API: requests analytics (evidence: `README.md`)
- Chatbot and voice → Application API: requests assistance
- Application API → Product and vendor management: serves catalog APIs (evidence: `README.md`)
- Application API → Cart and orders: serves order APIs (evidence: `README.md`)
- Application API → Payment tracking: creates checkout (evidence: `server.js`)
- Application API → ML service: calls ML service (evidence: `server.js`)
- ML service → Prediction command interface: runs predictions (evidence: `ml-models/ml_service.js`)
- Prediction command interface → Predictions and insights: dispatches commands (evidence: `ml-models/ml_predictor_cli.py`)
- ML pipeline runner → Feature engineering: runs feature stage (evidence: `ml-models/run_ml_pipeline.py`)
- ML pipeline runner → Model training: runs training stage (evidence: `ml-models/run_ml_pipeline.py`)
- Application API → MongoDB: stores application data (evidence: `README.md`)
- Application API → Stripe: creates payment sessions (evidence: `server.js`)
- Application API → SMS and notifications: sends notifications
