How mdkubal-17/intelligent-retail-analytics-and-inventory-optimization-system works
This repository is a retail analytics dashboard with a React frontend, a Flask backend, and a separate Express/MongoDB service. Users enter through login and navigate to dashboard, inventory, product, sales, forecast, transaction, report, and settings views. The frontend loads inventory and sales CSV data for analytics; product management calls the Flask API, while inventory changes and transaction history are handled by the Express service. The sampled evidence confirms routing and several data paths, but not all page-to-service connections or the internals of the Flask app.
Main entry points: App.jsx Page router · inventoryRoutes.js Inventory routes · server.js Express server · loadInventoryData.js Inventory loader
Components 21
Dashboard frontend
- Page router
retail-analytics-frontend/src/App.jsx - Login
retail-analytics-frontend/src/pages/Login.jsx - Dashboard
retail-analytics-frontend/src/pages/Dashboard.jsx - Inventory
retail-analytics-frontend/src/pages/Inventory.jsx - Products
retail-analytics-frontend/src/pages/Products.jsx - Sales
retail-analytics-frontend/src/pages/Sales.jsx - Forecast
retail-analytics-frontend/src/pages/Forecast.jsx - Transactions
retail-analytics-frontend/src/pages/Transactions.jsx - Reports
retail-analytics-frontend/src/pages/Reports.jsx - Settings
retail-analytics-frontend/src/pages/Settings.jsx
Analytics data
- Inventory loader
retail-analytics-frontend/src/utils/loadInventoryData.js - Sales loader
retail-analytics-frontend/src/utils/loadSalesData.js
API services
- Flask API
retail-analytics-backend/app.py - Express server
server/server.js - Authentication routes
server/routes/authRoutes.js - Report routes
server/routes/reports.js
Inventory ledger
- Inventory routes
server/routes/inventoryRoutes.js - User records
server/models/User.js - Transaction ledger
server/models/Transaction.js
Other components
- Retail user
- MongoDB
Connections 28
- Retail user → Page router: uses
- Page router → Login: routes to
retail-analytics-frontend/src/App.jsx - Page router → Dashboard: routes to
retail-analytics-frontend/src/App.jsx - Page router → Inventory: routes to
retail-analytics-frontend/src/App.jsx - Page router → Products: routes to
retail-analytics-frontend/src/App.jsx - Page router → Sales: routes to
retail-analytics-frontend/src/App.jsx - Page router → Forecast: routes to
retail-analytics-frontend/src/App.jsx - Page router → Transactions: routes to
retail-analytics-frontend/src/App.jsx - Page router → Reports: routes to
retail-analytics-frontend/src/App.jsx - Page router → Settings: routes to
retail-analytics-frontend/src/App.jsx - Products → Flask API: requests products
retail-analytics-frontend/src/pages/Products.jsx - Inventory → Inventory loader: loads data
retail-analytics-frontend/src/pages/Inventory.jsx - Dashboard → Inventory loader: loads data
- Forecast → Inventory loader: loads data
retail-analytics-frontend/src/pages/Forecast.jsx - Sales → Sales loader: loads data
retail-analytics-frontend/src/pages/Sales.jsx - Dashboard → Sales loader: loads data
- Forecast → Sales loader: loads data
retail-analytics-frontend/src/pages/Forecast.jsx - Inventory loader → Inventory routes: fetches CSV
retail-analytics-frontend/src/utils/loadInventoryData.js - Sales loader → Inventory routes: fetches CSV
retail-analytics-frontend/src/utils/loadSalesData.js - Reports → Report routes: fetches reports
retail-analytics-frontend/src/pages/Reports.jsx - Express server → Authentication routes: mounts routes
server/server.js - Express server → Report routes: mounts routes
server/server.js - Express server → Inventory routes: mounts routes
server/server.js - Authentication routes → User records: reads and writes
server/routes/authRoutes.js - Report routes → User records: references model
server/routes/reports.js - Inventory routes → Transaction ledger: reads and writes
server/routes/inventoryRoutes.js - Inventory routes → MongoDB: persists ledger
server/routes/inventoryRoutes.js - Express server → MongoDB: connects
server/server.js