Predict machine failures before they happen. Built with React, Django, and Scikit-learn.
InsightX is a full-stack predictive maintenance platform that uses machine learning to identify potential equipment failures before they occur. Users can input real-time sensor data, receive instant failure predictions with confidence scores, and monitor historical trends β all through a responsive dashboard built for both desktop and mobile.
The system is designed around the challenge of unplanned industrial downtime: by predicting failures early, it enables proactive maintenance rather than reactive repair.
- ML-Powered Predictions β Submit sensor readings and receive instant failure probability predictions using a trained Scikit-learn model
- Real-Time Monitoring Dashboard β Visualize live equipment metrics and anomaly indicators
- Prediction History β Track past predictions and outcomes for auditing and model improvement
- Data Analysis Tools β Explore trends and patterns across historical sensor data
- User Authentication β Secure JWT-based login/signup with protected routes
- Responsive Design β Dark-themed UI optimized for desktop and mobile
| Technology | Purpose |
|---|---|
| React 18 | UI framework |
| Vite | Build tool & dev server |
| React Router DOM v6 | Client-side routing |
| Axios | HTTP client with interceptors |
| Chart.js | Data visualization |
| Custom CSS | Styling (CSS Grid, Flexbox, Variables) |
| Technology | Purpose |
|---|---|
| Django | Web framework |
| Django REST Framework | REST API layer |
| Scikit-learn | ML model training & inference |
| JWT | Authentication tokens |
insightX-final/
βββ frontend/
β βββ src/
β βββ components/
β β βββ Layout/ # Navbar, Layout wrapper
β β βββ Auth/ # PrivateRoute guard
β βββ pages/
β β βββ Home.jsx # Landing page
β β βββ Predict.jsx # Failure prediction form
β β βββ Monitoring.jsx # Real-time dashboard
β β βββ History.jsx # Prediction history (protected)
β β βββ Dashboard.jsx # Overview (protected)
β β βββ Analysis.jsx # Data analysis tools
β β βββ Explore.jsx # About predictive maintenance
β βββ context/
β β βββ AuthContext.jsx # JWT auth state
β βββ services/
β βββ api.js # Axios instance + interceptors
βββ backend/
βββ apps/
β βββ authentication/ # Login, signup, JWT
β βββ predictions/ # ML inference endpoint
β βββ monitoring/ # Sensor data endpoints
βββ ml/
βββ models/ # Trained Scikit-learn models
- Node.js β₯ 18
- Python β₯ 3.10
- pip
cd frontend
npm install
npm run devThe React app runs at http://localhost:5173
Create a .env file in the frontend/ directory:
VITE_API_URL=http://localhost:8000/apicd backend
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverThe Django API runs at http://localhost:8000
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/login |
User login, returns JWT | No |
| POST | /api/signup |
User registration | No |
| POST | /api/predict |
Submit sensor data, get prediction | Yes |
| GET | /api/history |
Fetch prediction history | Yes |
| GET | /api/monitoring |
Get live monitoring data | Yes |
| GET | /api/analysis |
Get aggregated analysis data | Yes |
POST /api/predict
{
"type": "Medium",
"air_temperature": 298.1,
"process_temperature": 308.6,
"rotational_speed": 1551,
"torque": 42.8,
"tool_wear": 0
}{
"failure_predicted": true,
"probability": 0.87,
"failure_type": "Tool Wear Failure",
"confidence": "High"
}| Page | Route | Description |
|---|---|---|
| Home | / |
Landing page with feature highlights |
| Login | /login |
User authentication |
| Signup | /signup |
New user registration |
| Predict | /predict |
Submit sensor readings for prediction |
| Monitoring | /monitoring |
Real-time equipment monitoring |
| Dashboard | /dashboard |
Overview with charts (protected) |
| History | /history |
Past predictions log (protected) |
| Analysis | /analysis |
Trend and pattern analysis |
| Explore | /explore |
What is predictive maintenance? |
The prediction engine is powered by a Scikit-learn model trained on industrial sensor data. Key input features include:
- Machine Type β Low / Medium / High
- Air Temperature (K)
- Process Temperature (K)
- Rotational Speed (RPM)
- Torque (Nm)
- Tool Wear (min)
The model predicts binary failure outcomes and classifies failure type (Tool Wear, Heat Dissipation, Power, Overstrain).
- Dark theme with blue gradient accents
- Backdrop blur navigation bar
- Animated hero section with staggered headings
- Color-coded prediction results (green / red / yellow)
- Responsive hamburger menu for mobile
- Smooth hover transitions on cards and buttons
InsightX uses JWT-based authentication managed through a global React context (AuthContext). Tokens are stored and attached automatically via Axios request interceptors. Protected pages (Dashboard, History) are gated behind a PrivateRoute component.
- Email/SMS alerts for high-risk predictions
- Multi-machine support and equipment profiles
- Model retraining pipeline from user-submitted data
- Export predictions to CSV / PDF
- Dockerized deployment with
docker-compose
Sai Sinare ECE Student @ Vishwakarma Institute of Technology, Pune GitHub
This project is licensed under the MIT License.






