How sivaganeshv1729/iiot-digital-twin-platform works
SmartFactory-Nexus is an IIoT factory operations platform: users sign in, then monitor production and machine telemetry through dashboards and a 3D digital twin, while accessing inventory, quality, audit, security, and MLOps views. The gateway serves authenticated API routes and streams telemetry to connected clients; its simulator also records history and adjusts inventory. The AI service provides maintenance predictions, forecasting, model metrics, retraining, and factory chat. Some route and page internals were not sampled, so those capabilities are represented without speculative handler-level connections.
Main entry points: index.ts HTTP and socket server · App.tsx React app · main.py AI API · Dashboard.tsx Command dashboard
Components 27
Factory UI
- React app
frontend/src/App.tsx - Login page
frontend/src/pages/Login.tsx - Command dashboard
frontend/src/pages/Dashboard.tsx - 3D digital twin
frontend/src/components/DigitalTwin.tsx - Machine operations
frontend/src/pages/Machines.tsx - Inventory view
frontend/src/pages/Inventory.tsx - Quality view
frontend/src/pages/Quality.tsx - Audit ledger
frontend/src/pages/AuditLogs.tsx - MLOps console
frontend/src/pages/MLOps.tsx
API Gateway
- HTTP and socket server
api-gateway/src/index.ts - Authentication route
api-gateway/src/routes/auth.ts - Machine route
api-gateway/src/routes/machines.ts - Production route
api-gateway/src/routes/production.ts - Inventory route
api-gateway/src/routes/inventory.ts - Quality route
api-gateway/src/routes/quality.ts - Audit route
api-gateway/src/routes/audit.ts - AI route
api-gateway/src/routes/ai.ts - JWT protection
api-gateway/src/middleware/auth.ts
AI Service
- AI API
ai-service/main.py - Failure predictor
ai-service/models/maintenance_model.py - Temperature forecaster
ai-service/models/forecast_model.py - Factory assistant
ai-service/services/llm_service.py
Data Services
- PostgreSQL
- Redis telemetry broker
Other components
- Factory user
- Live UI clients
- Gemini API
Connections 35
- Factory user → React app: uses
- React app → Login page: routes
- React app → Command dashboard: routes
- React app → Machine operations: routes
- React app → Inventory view: routes
- React app → Quality view: routes
- React app → Audit ledger: routes
- React app → MLOps console: routes
- Login page → HTTP and socket server: signs in
- Command dashboard → HTTP and socket server: fetches data
- Command dashboard → 3D digital twin: renders machines
- Machine operations → HTTP and socket server: requests data
- Inventory view → HTTP and socket server: requests data
- Quality view → HTTP and socket server: requests data
- Audit ledger → HTTP and socket server: requests data
- MLOps console → HTTP and socket server: requests metrics
- HTTP and socket server → Authentication route: dispatches
- HTTP and socket server → Machine route: dispatches
- HTTP and socket server → Production route: dispatches
- HTTP and socket server → Inventory route: dispatches
- HTTP and socket server → Quality route: dispatches
- HTTP and socket server → Audit route: dispatches
- HTTP and socket server → AI route: dispatches
- HTTP and socket server → JWT protection: protects routes
- Authentication route → PostgreSQL: reads users
- HTTP and socket server → PostgreSQL: reads machines; writes history and inventory
- HTTP and socket server → Redis telemetry broker: publishes telemetry
- Redis telemetry broker → HTTP and socket server: delivers telemetry
- HTTP and socket server → Live UI clients: emits updates
- Live UI clients → Command dashboard: streams telemetry
- AI route → AI API: forwards AI requests
- AI API → Failure predictor: predicts and retrains
- AI API → Temperature forecaster: forecasts
- AI API → Factory assistant: generates insights
- Factory assistant → Gemini API: requests answers