Empowering mining operations with standards-based, real-time ore intelligence
This demo showcases how an AI-augmented MineSensors platform can surface shovel-level grade data, feed fleet management systems (FMS) within seconds, and meet the OPC UA Mining Companion Specification โ all wrapped in a modern, interactive UI that delights executives and engineers alike.
graph TB
subgraph "Frontend (Next.js 14)"
UI[3D Real-Time Dashboard]
EXP[OPC UA Explorer]
INT[Integration Hub]
COMP[Compliance View]
end
subgraph "Backend (Node.js + TypeScript)"
OPC[OPC UA Server<br/>node-opcua]
WS[WebSocket Bridge<br/>ws://4841]
API[REST API<br/>:3001]
end
subgraph "Mining Equipment"
EXC[Hydraulic Excavator<br/>Grade Data]
TRUCK[Mining Trucks<br/>Fleet Data]
CONV[Conveyors<br/>Throughput]
end
subgraph "External Systems"
FMS[Fleet Management<br/>REST/SOAP]
SCADA[Mine SCADA<br/>OPC UA Client]
ERP[Enterprise Systems<br/>ISA-95 L4]
end
UI --> WS
EXP --> WS
INT --> API
COMP --> API
WS --> OPC
API --> OPC
OPC -.->|opc.tcp://4840| EXC
OPC -.->|opc.tcp://4840| TRUCK
OPC -.->|opc.tcp://4840| CONV
API <--> FMS
OPC <--> SCADA
API <--> ERP
style UI fill:#2563eb,color:#fff
style OPC fill:#dc2626,color:#fff
style EXC fill:#16a34a,color:#fff
- Node.js โฅ 18.0.0
- pnpm โฅ 8.0.0
- Docker (optional, for containerized deployment)
-
Clone and install dependencies
git clone <repository-url> cd mining-opc-demo pnpm install
-
Start development servers
# Start both frontend and backend pnpm dev # Or start individually pnpm --filter backend dev # OPC UA server on :4840, API on :3001 pnpm --filter frontend dev # Next.js on :3000
-
Access the demo
- Web UI: http://localhost:3000
- OPC UA Server: opc.tcp://localhost:4840/mining-demo
- WebSocket: ws://localhost:4841
# Build and start all services
docker-compose up --build
# Access services
# - Web UI: http://localhost:3000
# - OPC UA Server: opc.tcp://localhost:4840
# - WebSocket Bridge: ws://localhost:4841- Node-OPCUA powered server modeling
MiningEquipmentType - Historical trend surface and alarm simulation
- Compliance with OPC UA Mining Companion Specification v1.0
- Three.js Visualization: Interactive 3D mine pit with equipment models
- Equipment Tracking: Real-time positioning of excavators, trucks, conveyors
- Grade Heatmap: Toggle-able 20x20 grid overlay with color-coded ore grades
- Camera Controls: Keyboard shortcuts (R=reset, G=grade toggle, E=equipment focus, H=help, F=fullscreen)
- Performance Optimized: LOD rendering, frustum culling, 30+ FPS on Intel UHD Graphics
- Tree Navigation: Hierarchical address space browser with virtual scrolling
- Live Subscriptions: Real-time value updates with subscription management
- Node Details: Complete OPC UA node information with data type interpretation
- Code Examples: Auto-generated JavaScript, Python, and REST API examples
- Search & Filter: Debounced search with fuzzy matching for large node trees
- ISA-95 swim-lane visualization
- FMS connectivity cards showing throughput
- Multi-protocol integration (REST, SOAP, OPC UA)
- Checklist against OPC UA Mining standards
- Regional regulatory compliance tracking
- Audit trail and certification status
- Mining Glossary: 50+ industry terms with search and explanations
- Interactive Tooltips: Contextual help for mining concepts and values
- Help Mode: Guided tutorial with click targets for new users
- Progress Tracking: Remembers which educational content has been viewed
- Trigger "high-grade discovery" events
- Simulate equipment failure scenarios
- Performance metrics and KPI tracking
- Real-time 3D equipment movement and status changes
- Runtime: Node.js 18+ with TypeScript
- OPC UA: node-opcua (industrial automation)
- WebSocket: ws (real-time communication)
- API: Express.js with REST endpoints
- Testing: Jest with ts-jest
- Framework: Next.js 15.4.0 with App Router
- Styling: Tailwind CSS + Radix UI
- 3D Graphics: Three.js with @react-three/fiber, @react-three/drei
- State Management: React Query + Context API
- WebSocket: Native WebSocket API with reconnection
- Syntax Highlighting: react-syntax-highlighter for code examples
- Performance: Virtual scrolling, LOD rendering, frustum culling
- Containerization: Docker + Docker Compose
- Package Manager: pnpm workspaces
- Code Quality: ESLint + Prettier + Husky
- < 2s Latency: End-to-end data flow from equipment to UI
- 30+ msgs/s: FMS integration throughput
- < 60fps: WebGL rendering on Intel UHD Graphics
- 8GB RAM: Complete stack running on laptop
- X.509 certificate-based authentication
- 256-bit encryption for data transmission
- Secure channels with message signing
- Configurable security policies (None/Basic256Sha256)
- OPC UA Mining Companion Spec v1.0: Equipment information models
- ISA-95 / IEC 62264: Enterprise-control integration
- Industry 4.0: Secure sensor-to-cloud connectivity
- R - Reset camera to default position
- G - Toggle grade heatmap overlay
- E - Focus camera on selected equipment
- H - Toggle help mode for educational features
- F - Toggle fullscreen mode
- Double-click - Focus on equipment or terrain feature
- Left drag - Rotate camera around mine pit
- Right drag - Pan camera view
- Scroll wheel - Zoom in/out
- Hover - Show equipment tooltips with live data
{
"type": "equipment_positions",
"data": [
{
"id": "excavator-001",
"x": 245.6, "y": 12.3, "z": -87.4,
"status": "operational",
"type": "excavator",
"currentLoad": 85,
"efficiency": 92.5
}
]
}{
"type": "grade_data",
"data": {
"timestamp": 1703123456789,
"grid": [
[2.1, 2.3, 2.8, ...],
[1.9, 2.1, 2.4, ...],
...
]
}
}{
"type": "opcua_updates",
"data": [
{
"nodeId": "ns=2;s=Equipment.Excavator001.OreGrade",
"value": 3.45,
"timestamp": 1703123456789,
"dataType": "Double",
"unit": "g/t Au"
}
]
}# Test with UA Expert (Windows)
# Endpoint: opc.tcp://localhost:4840/mining-demo
# Security: None (demo) or Basic256Sha256 (production)
# Test with opcua-commander (CLI)
npx opcua-commander -e opc.tcp://localhost:4840/mining-demo# Run all tests
pnpm test
# Backend unit tests
pnpm --filter backend test
# Frontend component tests
pnpm --filter frontend test
# Phase 4 validation (requires both servers running)
node validation/phase4-puppeteer.jsmining-opc-demo/
โโโ backend/ # OPC UA server & API
โ โโโ src/
โ โ โโโ server.ts # Main OPC UA server
โ โ โโโ addressSpace/ # Mining OPC UA models
โ โ โโโ api/ # REST API endpoints
โ โ โโโ simulation/ # Grade & equipment simulation
โ โ โโโ websocket/ # WebSocket message handlers
โ โโโ tests/ # Backend unit tests
โ โโโ Dockerfile # Backend container
โ โโโ package.json # Backend dependencies
โโโ frontend/ # Next.js web application
โ โโโ src/
โ โ โโโ app/ # App router pages
โ โ โโโ components/ # React components
โ โ โ โโโ three/ # 3D visualization
โ โ โ โโโ opcua/ # OPC UA explorer
โ โ โ โโโ educational/ # Learning features
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ providers/ # Context providers
โ โ โโโ types/ # TypeScript definitions
โ โโโ tests/ # Frontend tests
โ โโโ Dockerfile # Frontend container
โ โโโ package.json # Frontend dependencies
โโโ validation/ # Puppeteer validation scripts
โ โโโ phase3-puppeteer.js # Phase 3 validation
โ โโโ phase4-puppeteer.js # Phase 4 validation
โโโ docs/ # Documentation
โ โโโ standards/ # OPC UA & ISA-95 research
โ โโโ tooling/ # Technology decisions
โ โโโ research/ # Economic analysis
โโโ specs/ # Requirements & tasks
โโโ spikes/ # Proof-of-concept code
โโโ docker-compose.yml # Multi-service deployment
โโโ package.json # Workspace configuration
- Excavator discovers high-grade ore (>3.5g/t Au)
- Real-time alert triggers in dashboard
- FMS rerouting recommendations appear
- Grade heatmap updates immediately
- Conveyor vibration exceeds threshold
- Maintenance notification sent via OPC UA
- Downtime impact calculated and displayed
- Alternative routing suggestions provided
- Fleet coordination for optimal truck dispatch
- Real-time throughput monitoring
- Grade control feedback loop
- Economic KPI tracking ($/tonne processed)
- OPC UA Metrics: Connection status, message throughput, error rates
- Performance HUD: Latency, memory usage, WebGL frame rate
- Business KPIs: Production volume, grade recovery, equipment utilization
- Compliance Status: Standards adherence, audit readiness
- Follow the Phase-based development approach (see
specs/) - Maintain OPC UA compliance and security best practices
- Use conventional commits and automated testing
- Document mining domain knowledge and technical decisions
- Issues: GitHub Issues for bug reports and feature requests
- Documentation: See
docs/for technical specifications - Demo Questions: Contact the mining technology team
Built with โค๏ธ for the mining industry | Showcasing the future of connected mining operations