A React-based interactive factory floor simulation and monitoring system with AI-powered layout generation capabilities.
Watch the demo of the digital twin in action:
- Interactive Factory Floor: Visual representation of machines, conveyors, and logistics components
- Real-time Simulation: Live data streaming with temperature, pressure, output, and throughput monitoring
- AI Layout Generation: Upload blueprint images/videos and use AI to automatically detect and place components
- Placement Mode: Drag, resize, and configure factory components
- Anomaly Detection: Automatic alerts for temperature spikes and equipment failures
- Pan and Zoom: Navigate large factory layouts with mouse controls
- Component Management: Add, edit, and delete factory components with custom properties
- Performance Report: Interactive daily performance dashboard with analytics and automation recommendations
- Node.js (version 16 or higher)
- npm or yarn package manager
-
Clone or download this project to your local machine
-
Navigate to the project directory:
cd factory-floor-digital-twin -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:3000
The interactive factory floor simulation with real-time monitoring, AI layout generation, and component management.
A comprehensive daily performance dashboard featuring:
- KPI Summary: Overall efficiency, bottlenecks, and cost analysis
- Interactive Performance Map: Click on factory areas to view detailed analytics
- Charts & Visualizations: Real-time data visualization using Chart.js
- Automation Recommendations: Cost-benefit analysis for different automation solutions
- Component Analysis: Detailed insights for each factory area with actionable recommendations
- Simulation Toggle: Use the toggle in the header to start/stop the live simulation
- Pan View: Click and drag on empty areas to pan around the factory floor
- Component Details: Hover over any component to see real-time data
- Click "Enter Placement Mode" in the control panel
- Click on existing components to select and edit them
- Add new machines by entering an ID and clicking on the factory floor
- Drag components to reposition them
- Use resize handles to adjust component sizes
- Configure pipeline stages and display fields for each component
- Upload a blueprint image or video using the file input
- Click "Generate Layout from Media" to analyze the media with AI
- The AI will detect objects and automatically place appropriate components:
- People → Order picker units
- Trucks → Shipping containers
- Long rectangular objects → Conveyor belts
- Other objects → Production machines
- CNC/MOLD: Production machines with temperature, pressure, and output monitoring
- SHIP: Shipping containers for logistics
- PICK: Order picker units for warehouse operations
- CV: Conveyor belts with throughput monitoring
- 🟢 Green: Running/Active
- 🔵 Blue: Conveyor systems running
- 🟡 Yellow: Idle/Standby
- 🔴 Red: Error/Alert state
- React 18: Modern React with hooks
- Vite: Fast build tool and development server
- Tailwind CSS: Utility-first CSS framework
- TensorFlow.js: AI model integration for object detection
- COCO-SSD: Pre-trained object detection model
factory-floor-digital-twin/
├── src/
│ ├── App.jsx # Main application component
│ ├── main.jsx # React entry point
│ └── index.css # Global styles
├── public/ # Static assets
├── package.json # Dependencies and scripts
├── vite.config.js # Vite configuration
├── tailwind.config.js # Tailwind CSS configuration
└── README.md # This file
npm run dev: Start development servernpm run build: Build for productionnpm run preview: Preview production buildnpm run lint: Run ESLint
The application is highly customizable:
- Modify
initialMachinesandinitialConveyorsarrays to change default components - Adjust simulation parameters in the
simulateDataStreamfunction - Customize component appearance by modifying the SVG rendering logic
- Add new component types by extending the component mapping logic
- Chrome/Chromium (recommended)
- Firefox
- Safari
- Edge
Note: AI features require a modern browser with WebGL support for TensorFlow.js.
This project is open source and available under the MIT License.