Quickstart Guide
Get your predictive maintenance system up and running with Docker in minutes.Prerequisites
Before you begin, ensure you have the following installed:Docker
Docker 24.x or later
Docker Compose
Included with Docker Desktop
Git
For cloning the repository
InfluxDB Cloud Account
Free tier available at influxdata.com
The system requires InfluxDB Cloud for time-series data persistence. You can use the free tier for development and testing.
Installation
Configure Environment Variables
Create a Get your InfluxDB credentials:
.env file in the backend/ directory with your InfluxDB credentials:backend/.env
- Sign up at influxdata.com
- Create a new bucket named
sensor_data - Generate an API token with read/write permissions
- Copy your Organization ID from the settings
Start All Services
Launch the backend and frontend using Docker Compose:You should see output indicating both services are starting:
The
--build flag ensures Docker builds fresh images. Subsequent starts can omit this flag for faster startup.Access the Application
Open your browser and navigate to:
Frontend Dashboard
Backend API
API Documentation
Health Check
Verify the Installation
Calibrate the Baseline Model
Before detecting anomalies, the system needs to learn what “healthy” looks like. Use the calibration endpoint:This generates 60 seconds of healthy baseline data and trains both ML models.
The system will automatically generate synthetic sensor data matching real-world industrial patterns.
View the Dashboard
Open the dashboard at http://localhost:5173 and verify:
- STATUS: LIVE badge is green
- Real-time charts are updating
- Health score shows 100 (LOW risk)
- Baseline target values are displayed
Local Development (Manual Setup)
If you prefer to run services individually without Docker:- Backend
- Frontend
Common Issues
db_connected: false in health check
db_connected: false in health check
Cause: Invalid InfluxDB credentials or network connectivity issue.Solution:
- Verify your InfluxDB token and organization ID
- Check that the bucket
sensor_dataexists - Test connectivity:
curl https://us-east-1-1.aws.cloud2.influxdata.com/health - Ensure your token has read/write permissions
Frontend shows 'Connection Error'
Frontend shows 'Connection Error'
Cause: Backend is not running or CORS configuration issue.Solution:
- Verify backend is running:
curl http://localhost:8000/ping - Check Docker logs:
docker-compose logs backend - Ensure port 8000 is not blocked by firewall
Docker build fails on Windows
Docker build fails on Windows
Cause: Line endings or path issues.Solution:
- Configure Git to use LF line endings:
git config core.autocrlf false - Re-clone the repository
- Run Docker Desktop as Administrator
Models not detecting anomalies
Models not detecting anomalies
Cause: System not calibrated or insufficient baseline data.Solution:
- Run calibration:
POST /system/calibratewith at least 60 seconds duration - Verify baseline targets appear on status cards in the dashboard
- Check model training logs:
docker-compose logs backend | grep "Model trained"
Next Steps
Explore the Architecture
Learn how the ML pipeline processes sensor data
API Reference
Integrate real sensors using the REST API
Production Deployment
Deploy to Render (backend) and Vercel (frontend)
Testing Guide
Run the 182-test suite and benchmark models