Hackathon Project โ AI-Powered Smart Manufacturing Management System with Machine & Workforce Optimization
SmartFactory AI is a full-stack industrial management platform that provides real-time monitoring, predictive analytics, and AI-driven optimization for manufacturing facilities.
| Module | Description |
|---|---|
| ๐ฅ๏ธ Machine Health Monitoring | Real-time temperature, vibration, runtime tracking |
| ๐ฎ Predictive Maintenance | AI-powered failure prediction scoring |
| ๐ Production Tracking | Daily targets vs actual with efficiency analytics |
| ๐ฆ Inventory Automation | Automated low-stock alerts and stock management |
| ๐ Smart Alert System | Multi-category alert system with severity levels |
| ๐ Analytics Dashboard | Factory-wide KPIs and performance charts |
| ๐ฅ Worker Management | Profiles, performance, skill-based assignment |
| ๐ก๏ธ Safety Monitoring | Incident tracking and compliance dashboard |
| ๐ Report Generation | CSV/PDF export for all modules |
| ๐ Role-Based Auth | Admin / Manager / Worker access control |
smartfactory/
โโโ frontend/ # React + Vite + Tailwind CSS
โ โโโ src/
โ โ โโโ components/
โ โ โ โโโ common/
โ โ โ โโโ Layout.jsx # Sidebar + Header
โ โ โโโ context/
โ โ โ โโโ AuthContext.jsx # JWT Auth state
โ โ โโโ data/
โ โ โ โโโ dummyData.js # Complete sample data
โ โ โโโ pages/
โ โ โ โโโ LoginPage.jsx
โ โ โ โโโ DashboardPage.jsx # Command Center
โ โ โ โโโ MachinesPage.jsx # Machine Health
โ โ โ โโโ MaintenancePage.jsx # Predictive Maint.
โ โ โ โโโ ProductionPage.jsx # Production Tracking
โ โ โ โโโ InventoryPage.jsx # Inventory Automation
โ โ โ โโโ WorkersPage.jsx # Workforce Mgmt
โ โ โ โโโ AlertsPage.jsx # Smart Alerts
โ โ โ โโโ AnalyticsPage.jsx # Analytics Dashboard
โ โ โ โโโ ReportsPage.jsx # Report Generation
โ โ โ โโโ SafetyPage.jsx # Safety Monitoring
โ โ โโโ App.jsx
โ โ โโโ main.jsx
โ โ โโโ index.css
| |__public
|___ _redirects
| |__ netlify.toml
โ โโโ index.html
โ โโโ vite.config.js
โ โโโ tailwind.config.js
โ โโโ package.json
โ
โโโ backend/ # Node.js + Express.js + MongoDB
โ โโโ controllers/
โ โ โโโ authController.js
โ โโโ middleware/
โ โ โโโ auth.js # JWT protection + role authorization
โ โโโ models/
โ โ โโโ Machine.js # Machine schema
โ โ โโโ Worker.js # Worker schema
โ โ โโโ User.js # User/auth schema
โ โ โโโ index.js # Inventory, Production, Alert, Safety
โ โโโ routes/
โ โ โโโ authRoutes.js
โ โ โโโ machineRoutes.js
โ โ โโโ workerRoutes.js
โ โ โโโ inventoryRoutes.js
โ โ โโโ productionRoutes.js
โ โ โโโ alertRoutes.js
โ โ โโโ analyticsRoutes.js
โ โ โโโ maintenanceRoutes.js
โ โ โโโ safetyRoutes.js
โ โโโ utils/
โ โโโ seed.js # Database seeder
โ โโโ server.js
โ โโโ .env.example
โ โโโ package.json
โ
โโโ README.md
- Node.js 18+
- MongoDB (local or Atlas)
- npm or yarn
git clone <your-repo-url>
cd smartfactorycd frontend
npm install
npm run devFrontend will run at http://localhost:5173
cd backend
npm install
cp .env.example .env
# Edit .env with your MongoDB URI
npm run devAPI will run at http://localhost:5000
cd backend
npm run seed| Role | Password | |
|---|---|---|
| Admin | admin@factory.com | admin123 |
| Manager | manager@factory.com | manager123 |
| Worker | worker@factory.com | worker123 |
POST /api/auth/register Register new user
POST /api/auth/login Login
GET /api/auth/me Get current user
GET /api/machines All machines (filterable)
GET /api/machines/:id Machine by ID
POST /api/machines Create machine
PUT /api/machines/:id Update machine
PUT /api/machines/:id/sensors Update sensor data
DELETE /api/machines/:id Deactivate machine
GET /api/workers All workers
GET /api/workers/:id Worker by ID
POST /api/workers Create worker
PUT /api/workers/:id Update worker
GET /api/inventory All inventory
GET /api/inventory/low-stock Low stock items
POST /api/inventory Add item
PUT /api/inventory/:id Update item
GET /api/analytics/overview Factory overview stats
GET /api/maintenance/predict AI failure risk predictions
The failure risk score is calculated using weighted factors:
Risk Score = Temperature Weight (40 pts max)
+ Vibration Weight (30 pts max)
+ Maintenance Overdue Weight (25 pts max)
+ Efficiency Weight (15 pts max)
- HIGH RISK (โฅ70): Immediate maintenance required
- MEDIUM RISK (40-69): Schedule within 30 days
- LOW RISK (<40): Normal monitoring
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS |
| Charts | Recharts |
| Icons | Lucide React |
| Routing | React Router v6 |
| Auth | JWT (simulated in frontend) |
| Backend | Node.js, Express.js |
| Database | MongoDB + Mongoose |
| Fonts | Orbitron, Rajdhani, Share Tech Mono |
{
"machineId": "M001",
"name": "CNC Lathe Alpha",
"type": "CNC Lathe",
"department": "Machining",
"location": "Bay A1",
"status": "operational | warning | critical | offline",
"sensors": { "temperature": 68, "vibration": 0.3, "runtime": 1420 },
"efficiency": 94,
"assignedWorker": "ObjectId",
"maintenance": { "lastDate": "2026-02-10", "nextDate": "2026-04-10" }
}{
"workerId": "W001",
"name": "Arjun Sharma",
"department": "Machining",
"role": "Senior Operator",
"skills": ["CNC", "Milling", "QC"],
"shift": "Morning",
"status": "active",
"performance": { "score": 92, "completedTasks": 48 },
"safetyScore": 98,
"assignedMachine": "ObjectId"
}- โ 10 complete modules covering all requirements
- โ Full-stack MERN with proper MVC architecture
- โ AI Predictive Engine with multi-factor risk scoring
- โ Professional dark theme โ Industrial grade UI
- โ Role-based access โ Admin, Manager, Worker
- โ Real-time charts โ Area, Bar, Radar, Pie charts
- โ Export functionality โ CSV report downloads
- โ Responsive design โ Works on all screen sizes
- โ Worker-Machine Correlation Analysis
- โ Safety incident tracking with compliance checklist
SmartFactory AI โ Built for hackathon showcase Technology: MERN Stack + AI Analytics
"Industry 4.0 โ where intelligence meets manufacturing"