How dgpatil98600/full-stack works
InventoryManagement is a web application for shop owners to manage products, billing, notifications, accounts, and sales analysis, with an inventory chatbot. The principal workflow is to sign in, navigate protected shop features, and use the client to request or update backend data stored in MongoDB. The chatbot classifies a question, may fetch shop data, and generates a response. The graph includes the documented-by-source feature areas, but several UI-to-API links and unsampled route behaviors cannot be verified from the excerpts and are omitted or marked unverified.
Main entry points: routes.jsx Page routes · server.js Backend server · Controller.js Chat orchestration · axios.js Authenticated API client
Components 34
Web client
- Web application
InventoryManagement/src/App.jsx - Page routes
InventoryManagement/src/routes.jsx - Authenticated API client
InventoryManagement/src/utils/axios.js
Identity
- Auth state
InventoryManagement/src/context/AuthContext.jsx - Protected pages
InventoryManagement/src/context/UserProtectedWrapper.jsx - Registration
InventoryManagement/src/component/Registration.jsx - User profile
InventoryManagement/src/component/Profile.jsx
Shop operations
- Inventory manager
InventoryManagement/src/component/inventorymanager.jsx - Inventory API
InventoryManagement/backend/routes/inventory.js - Bill generation
InventoryManagement/src/component/billgenerator.jsx - Bill history
InventoryManagement/src/component/YourBills.jsx - Billing API
InventoryManagement/backend/routes/bill.js - Notifications
InventoryManagement/src/component/Notifications.jsx - Notification API
InventoryManagement/backend/routes/notify.js - Backend server
InventoryManagement/backend/server.js
Analysis and assistance
- Product analysis
InventoryManagement/src/component/ProductAnalysis.jsx - Shop analysis
InventoryManagement/src/component/shopAnalysis.jsx - Shop analysis API
InventoryManagement/backend/routes/shopanalysis.js - Chat interface
InventoryManagement/src/component/chat.jsx - Chat endpoint
InventoryManagement/backend/chatbot/routes.js - Chat orchestration
InventoryManagement/backend/chatbot/Controller.js - Intent classifier
InventoryManagement/backend/chatbot/intent/IntentClassifier.js - Ollama service
InventoryManagement/backend/chatbot/llm/OllamaService.js - Chat response cache
InventoryManagement/backend/chatbot/memory/CacheMemory.js - RAG ingestion
InventoryManagement/backend/chatbot/rag/RagIngest.js - RAG retrieval
InventoryManagement/backend/chatbot/rag/RagRetrieve.js - Chroma client
InventoryManagement/backend/chatbot/rag/ChromaClient.js
Data stores
- Product records
InventoryManagement/backend/models/Product.js - Bill records
InventoryManagement/backend/models/Bill.js - Notification records
InventoryManagement/backend/models/Notification.js - User records
InventoryManagement/backend/models/User.js
Other components
- Shop owner
- Ollama service
- Chroma service
Connections 43
- Shop owner → Web application: uses
- Web application → Page routes: loads routes
InventoryManagement/src/App.jsx - Page routes → Protected pages: guards pages
InventoryManagement/src/routes.jsx - Page routes → Inventory manager: routes to
InventoryManagement/src/routes.jsx - Page routes → Bill generation: routes to
InventoryManagement/src/routes.jsx - Page routes → Bill history: routes to
InventoryManagement/src/routes.jsx - Page routes → Notifications: routes to
InventoryManagement/src/routes.jsx - Page routes → Product analysis: routes to
InventoryManagement/src/routes.jsx - Page routes → Shop analysis: routes to
InventoryManagement/src/routes.jsx - Page routes → User profile: routes to
InventoryManagement/src/routes.jsx - Page routes → Registration: routes to
InventoryManagement/src/routes.jsx - Web application → Auth state: provides auth
InventoryManagement/src/main.jsx - Auth state → Protected pages: supplies state
InventoryManagement/src/context/UserProtectedWrapper.jsx - Inventory manager → Authenticated API client: requests data
InventoryManagement/src/component/inventorymanager.jsx - Notifications → Authenticated API client: requests data
InventoryManagement/src/component/Notifications.jsx - Product analysis → Authenticated API client: requests data
InventoryManagement/src/component/ProductAnalysis.jsx - Bill generation → Authenticated API client: requests data
InventoryManagement/src/component/billgenerator.jsx - Authenticated API client → Backend server: sends requests
- Backend server → Inventory API: mounts
InventoryManagement/backend/server.js - Backend server → Billing API: mounts
InventoryManagement/backend/server.js - Backend server → Notification API: mounts
InventoryManagement/backend/server.js - Backend server → Shop analysis API: mounts
InventoryManagement/backend/server.js - Backend server → Chat endpoint: mounts
InventoryManagement/backend/server.js - Inventory API → Product records: reads and writes
InventoryManagement/backend/routes/inventory.js - Inventory API → Notification records: uses
InventoryManagement/backend/routes/inventory.js - Billing API → Bill records: reads and writes
InventoryManagement/backend/routes/bill.js - Billing API → Product records: uses
InventoryManagement/backend/routes/bill.js - Notification API → Notification records: reads and writes
InventoryManagement/backend/routes/notify.js - Notification API → Product records: uses
InventoryManagement/backend/routes/notify.js - Notification API → User records: uses
InventoryManagement/backend/routes/notify.js - Shop analysis API → Bill records: reads
InventoryManagement/backend/routes/shopanalysis.js - Shop analysis API → Product records: reads
InventoryManagement/backend/routes/shopanalysis.js - Auth state → Backend server: validates token
- Chat endpoint → Chat orchestration: dispatches
InventoryManagement/backend/chatbot/routes.js - Chat orchestration → Intent classifier: classifies query
InventoryManagement/backend/chatbot/Controller.js - Chat orchestration → Ollama service: generates answer
InventoryManagement/backend/chatbot/Controller.js - Chat orchestration → Chat response cache: checks cache
InventoryManagement/backend/chatbot/Controller.js - Ollama service → Ollama service: calls
InventoryManagement/backend/chatbot/llm/OllamaService.js - RAG ingestion → Chroma client: adds documents
InventoryManagement/backend/chatbot/rag/RagIngest.js - RAG retrieval → Chroma client: queries
InventoryManagement/backend/chatbot/rag/RagRetrieve.js - Chroma client → Chroma service: uses HTTP
InventoryManagement/backend/chatbot/rag/ChromaClient.js - Chat orchestration → RAG retrieval: retrieves context
- Chat interface → Chat endpoint: sends questions