How naveen-hub-design/smart-inventory-system works
SIMS is a React/TypeScript and Flask inventory platform. The principal workflow is user authentication, protected navigation, operational data entry or lookup, backend persistence, and dashboard/report/AI results. Distinct stages are authentication, inventory and transaction operations, analytics and reporting, and conversational assistance. The AI copilot is an internal orchestration layer combining intent, entity, memory, ERP, action, navigation, and response services. The graph preserves documented search, alerts, audit, supplier, and administration capabilities; some route-to-UI connections are necessarily grouped because their source was not sampled.
Components 23
Client Experience
- Application Router
client/src/App.tsx - Auth Context
client/src/context/AuthContext.tsx - Login Screen
client/src/pages/auth/Login.tsx - Operations UI
client/src/pages - AI Workspace
client/src/pages/ai - API Data Service
client/src/services/dataService.ts - Auth Service
client/src/services/authService.ts
Flask API
- Auth Routes
server/app/routes/auth.py - Operations Routes
server/app/routes - Reports Routes
server/app/routes/reports.py - Search Routes
server/app/routes/search.py - Alerts Routes
server/app/routes/notifications.py - AI Routes
server/app/routes
AI Intelligence
- Copilot Orchestrator
server/app/services/copilot_engine.py - Health Engine
server/app/services/health_engine.py - Insights Engine
server/app/services/insights_engine.py - Supplier Intelligence
server/app/services/supplier_intel_engine.py - Forecast Engine
server/app/services/forecast_engine.py
Domain Data
- Inventory Models
server/app/models - SQL Database
server/app/config/config.py
External Services
- Google OAuth
- Google Auth Flow
client/src/services/googleAuth.ts
Other components
- User
Connections 36
- User → Login Screen: opens login
- Login Screen → Auth Service: submits credentials
- Auth Service → Auth Routes: calls auth API
- Auth Routes → Inventory Models: reads users
- Inventory Models → SQL Database: reads/writes
- Auth Service → Auth Context: returns tokens
- Auth Context → Application Router: gates routes
- Application Router → Operations UI: routes operations
- Operations UI → API Data Service: requests data
- API Data Service → Operations Routes: calls operations
- Operations Routes → Inventory Models: reads/writes
- Operations UI → Reports Routes: requests reports
- Reports Routes → Inventory Models: aggregates data
- Operations UI → Search Routes: submits search
- Search Routes → Inventory Models: searches entities
- Operations UI → Alerts Routes: loads alerts
- Alerts Routes → Inventory Models: reads notifications
- Application Router → AI Workspace: routes AI
- AI Workspace → API Data Service: requests analysis
- API Data Service → AI Routes: calls AI API
- AI Routes → Health Engine: dispatches health
- AI Routes → Insights Engine: dispatches insights
- AI Routes → Forecast Engine: dispatches forecasts
- AI Routes → Supplier Intelligence: dispatches suppliers
- Health Engine → Inventory Models: queries inventory
- Insights Engine → Inventory Models: queries sales
- Forecast Engine → Inventory Models: queries history
- Supplier Intelligence → Inventory Models: queries suppliers
- AI Routes → Copilot Orchestrator: dispatches chat
- Copilot Orchestrator → Health Engine: requests health
- Copilot Orchestrator → Insights Engine: requests insights
- Copilot Orchestrator → Supplier Intelligence: requests supplier data
- Copilot Orchestrator → Inventory Models: uses ERP data
- User → Google Auth Flow: starts sign-in
- Google Auth Flow → Auth Service: exchanges code
- Google OAuth → Google Auth Flow: returns OAuth code