Full Documentation

Getting Started

Complete setup guide, installation instructions, and configuration documentation for PredictiveCare - your AI-powered predictive maintenance system for industrial devices.

PredictiveCare

Documentation

Source
Core Features

Powerful Capabilities

Real-time Monitoring

Track machine health, temperature, and performance metrics in real-time

ML Predictions

Ensemble models predict failures before they occur

Smart Alerts

RAG-powered recommendations for maintenance actions

IoT Integration

Arduino sensors with MQTT protocol for data collection

Prerequisites

Before You Begin

Software Requirements

Node.js 18+

For Next.js frontend

Python 3.10+

For ML backend

Arduino IDE

For IoT programming

Hardware Requirements (Optional)

Arduino Board

Uno, Mega, or compatible

DHT22 Sensor

Temperature & humidity

Vibration Sensor

SW-420 or similar

Installation

Setup Instructions

1

Clone Repository

terminal
git clone https://github.com/VaibhavK289/predictive_maintenance_for_industrial_devices.git
cd predictive_maintenance_for_industrial_devices
2

Setup Next.js Frontend

terminal
cd predictive-maintenance-frontend
npm install
3

Setup Python Backend

terminal
cd ml-backend
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
4

Train ML Models (Optional)

terminal
cd ml-backend
python train_models.py
Configuration

Environment Setup

predictive-maintenance-frontend/.env.local

.env.local
NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_WS_URL=ws://localhost:8000/ws

ml-backend/.env

.env
GOOGLE_API_KEY="your_gemini_api_key"
GROQ_API_KEY="your_groq_api_key"
MODEL_PATH="./models"
DATABASE_URL="sqlite:///./predictions.db"
Project Structure

Directory Layout

project structure
predictive_maintenance_for_industrial_devices/
├── predictive-maintenance-frontend/    # Next.js 16 Frontend
│   ├── src/
│   │   ├── app/                        # App Router pages
│   │   │   ├── dashboard/              # Real-time monitoring
│   │   │   ├── predictions/            # ML predictions view
│   │   │   ├── settings/               # Configuration
│   │   │   └── history/                # Maintenance history
│   │   ├── components/                 # React components
│   │   │   ├── ui/                     # Shadcn/UI components
│   │   │   ├── charts/                 # Data visualizations
│   │   │   └── widgets/                # Dashboard widgets
│   │   └── lib/                        # Utilities & API client
│   ├── package.json
│   └── tailwind.config.ts
│
├── ml-backend/                          # FastAPI ML Backend
│   ├── models/                          # Trained ML models
│   │   ├── xgboost_model.pkl
│   │   ├── lightgbm_model.pkl
│   │   └── catboost_model.pkl
│   ├── config/
│   │   ├── ensemble.py                 # Ensemble prediction
│   │   ├── rag.py                      # RAG recommendations
│   │   └── vectordb.py                 # ChromaDB setup
│   ├── main.py                         # FastAPI server
│   ├── train_models.py                 # Model training
│   └── requirements.txt
│
├── arduino/                             # IoT Sensor Code
│   ├── sensor_hub.ino                  # Main Arduino code
│   └── libraries/                       # Required libraries
│
├── data/                                # Dataset & samples
│   └── predictive_maintenance.csv
│
├── .gitignore
└── README.md
Running

Start the Application

Terminal 1 - Next.js Frontend:

terminal 1
cd predictive-maintenance-frontend
npm run dev

Terminal 2 - FastAPI Backend:

terminal 2
cd ml-backend
source venv/bin/activate  # On Windows: venv\Scripts\activate
uvicorn main:app --host 0.0.0.0 --port 8000 --reload

Access Points

Next.js Dashboard

http://localhost:3000

API Documentation

http://localhost:8000/docs

Health Check

http://localhost:8000/health

Ready to Get Started?

Clone the repository, set up your environment, and start monitoring your industrial equipment with AI-powered predictions.

Made with ❤️ by Vaibhav • MIT License