Valtronics is a cutting-edge, enterprise-grade IoT platform that delivers real-time monitoring, advanced analytics, and AI-powered insights for electronic devices and sensors. Built with a modern microservices architecture, it provides businesses with the tools to monitor, analyze, and control their IoT infrastructure through an intuitive web-based dashboard and robust API ecosystem.
Live Demo • Documentation • API Reference
- Real-time Device Monitoring - Track IoT devices via MQTT and WebSocket connections
- Advanced Analytics - Comprehensive data analysis with trend detection and anomaly identification
- AI-Powered Insights - Intelligent device analysis using OpenAI GPT integration
- Smart Alert System - Configurable alert rules with multi-channel notifications
- Interactive Dashboard - Modern React-based UI with real-time updates
- Multi-tenant Architecture - Scalable design supporting multiple organizations
- RESTful API - Complete API documentation with FastAPI
- WebSocket Support - Real-time bidirectional communication
- MQTT Integration - Standard IoT protocol support
- Containerized Deployment - Docker and Kubernetes ready
- Backend: FastAPI, SQLAlchemy, PostgreSQL, Redis, Celery
- Frontend: React 18, TailwindCSS, Recharts, WebSocket Client
- Messaging: MQTT (Mosquitto), WebSocket, Redis Pub/Sub
- AI/ML: OpenAI GPT, Scikit-learn, Pandas, NumPy
- Infrastructure: Docker, Kubernetes, Terraform
- Monitoring: Grafana, Prometheus, Custom Health Checks
- Docker & Docker Compose
- Node.js 18+ (for local frontend development)
- Python 3.11+ (for local backend development)
- PostgreSQL 15+ (if not using Docker)
- Redis 7+ (if not using Docker)
- MQTT broker (Mosquitto recommended)
# 1. Clone the repository
git clone https://github.com/AutoBotSolutions/Valtronics.git
cd valtronics
# 2. Set environment variables
cp .env.example .env
# Edit .env with your configuration
# 3. Start all services
docker-compose up -d
# 4. Access the application
# Frontend: http://localhost:3000
# Backend API: http://localhost:8000
# API Documentation: http://localhost:8000/docs
# MQTT Broker: localhost:1883cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd frontend
npm install
npm start
# Access: http://localhost:3000valtronics/
├── backend/ # FastAPI backend application
│ ├── app/
│ │ ├── api/v1/endpoints/ # API endpoints
│ │ ├── core/ # Core configuration
│ │ ├── db/ # Database session management
│ │ ├── models/ # SQLAlchemy models
│ │ ├── schemas/ # Pydantic schemas
│ │ └── services/ # Business logic services
│ ├── telemetry/ # MQTT and telemetry handling
│ ├── tests/ # Backend tests
│ ├── requirements.txt # Python dependencies
│ └── Dockerfile # Backend Docker configuration
├── frontend/ # React frontend application
│ ├── public/ # Static assets
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API and WebSocket services
│ │ └── utils/ # Utility functions
│ ├── package.json # Node.js dependencies
│ ├── tailwind.config.js # TailwindCSS configuration
│ └── Dockerfile # Frontend Docker configuration
├── cloud/ # Cloud deployment configurations
│ ├── kubernetes/ # K8s deployment manifests
│ └── terraform/ # Terraform infrastructure
├── firmware/ # Embedded firmware development
├── mock-devices/ # Device simulation framework
├── scripts/ # Utility scripts
├── docs/ # Documentation
├── site/ # Static website (GitHub Pages)
├── config/ # Configuration files
├── docker-compose.yml # Local development setup
└── README.md # This file
The API uses JWT tokens for authentication:
Authorization: Bearer <your-jwt-token>GET /api/v1/devices- List all devicesPOST /api/v1/devices- Create new deviceGET /api/v1/devices/{id}- Get device detailsPUT /api/v1/devices/{id}- Update deviceDELETE /api/v1/devices/{id}- Delete deviceGET /api/v1/devices/{id}/telemetry- Get device telemetryPOST /api/v1/devices/{id}/telemetry- Add telemetry data
GET /api/v1/analytics/device/{id}- Get device analyticsGET /api/v1/analytics/system- Get system analyticsGET /api/v1/analytics/device/{id}/timeseries- Get time series dataPOST /api/v1/analytics/comparison- Compare devices
POST /api/v1/ai/insights- Get AI-powered insightsPOST /api/v1/ai/anomaly-detection- Detect anomaliesPOST /api/v1/ai/predictive-maintenance- Get maintenance predictions
GET /api/v1/alerts- List alertsPOST /api/v1/alerts- Create alertPATCH /api/v1/alerts/{id}/acknowledge- Acknowledge alertPATCH /api/v1/alerts/{id}/resolve- Resolve alert
ws://localhost:8000/ws- General WebSocket connectionws://localhost:8000/ws/{device_id}- Device-specific connection
# Database
DATABASE_URL=postgresql://valtronics:password@localhost:5432/valtronics_db
# Redis
REDIS_URL=redis://localhost:6379
# MQTT
MQTT_BROKER_HOST=localhost
MQTT_BROKER_PORT=1883
MQTT_USERNAME=
MQTT_PASSWORD=
# AI Integration
OPENAI_API_KEY=your-openai-api-key
# Security
SECRET_KEY=your-secret-key
ACCESS_TOKEN_EXPIRE_MINUTES=30
# CORS
ALLOWED_HOSTS=["http://localhost:3000"]# API URL
REACT_APP_API_URL=http://localhost:8000/api/v1-
Build images
docker build -t valtronics/backend ./backend docker build -t valtronics/frontend ./frontend
-
Run with Docker Compose
docker-compose -f docker-compose.prod.yml up -d
-
Create namespace
kubectl create namespace valtronics
-
Apply secrets
kubectl apply -f cloud/kubernetes/secrets.yaml
-
Deploy database
kubectl apply -f cloud/kubernetes/postgres-deployment.yaml
-
Deploy applications
kubectl apply -f cloud/kubernetes/backend-deployment.yaml kubectl apply -f cloud/kubernetes/frontend-deployment.yaml
-
Setup ingress
kubectl apply -f cloud/kubernetes/ingress.yaml
{
"device_id": "TEMP_SENSOR_001",
"timestamp": "2024-01-01T12:00:00Z",
"metrics": [
{
"name": "temperature",
"value": 23.5,
"unit": "celsius"
},
{
"name": "humidity",
"value": 45.2,
"unit": "percent"
}
]
}{
"device_id": "TEMP_SENSOR_001",
"status": "online",
"timestamp": "2024-01-01T12:00:00Z"
}{
"device_id": "TEMP_SENSOR_001",
"type": "threshold",
"severity": "warning",
"message": "Temperature exceeds threshold",
"timestamp": "2024-01-01T12:00:00Z"
}valtronics/{device_id}/telemetry- Device telemetry datavaltronics/{device_id}/status- Device status updatesvaltronics/{device_id}/heartbeat- Device heartbeatvaltronics/{device_id}/alert- Device alertsvaltronics/{device_id}/command- Commands to devicevaltronics/{device_id}/response- Command responses
cd backend
pytest tests/ -vcd frontend
npm test# Run with Docker Compose
docker-compose -f docker-compose.test.yml up --abort-on-container-exit- Backend logs: Available in container logs or
/app/logs/ - Frontend logs: Browser console and Nginx logs
- Database logs: PostgreSQL logs
- Backend:
GET /api/v1/health/ - Database: PostgreSQL health check
- Redis: Redis ping command
- MQTT: MQTT connection status
- Application performance metrics
- Database query performance
- API response times
- WebSocket connection counts
- MQTT message throughput
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Commit your changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature-name - Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check the documentation in
/docs - Review the API documentation at
/docs
This repository is organized for both development and deployment:
- Main Project: Complete IoT platform with backend, frontend, and infrastructure
- Static Website:
site/directory contains the GitHub Pages website - Documentation: Comprehensive docs in
docs/directory - Firmware: Embedded firmware development in
firmware/directory
The project includes a static website deployed via GitHub Pages:
- Website URL:
https://autobotsolutions.github.io/Valtronics/ - Source:
site/directory - Auto-deployment: Automatic deployment on push to main branch
- Build Process: GitHub Actions workflow handles deployment
-
Create GitHub Repository
# Create a new repository on GitHub named "valtronics" # Then add the remote: git remote add origin https://github.com/your-username/valtronics.git
-
Push to GitHub
git push -u origin main
-
Enable GitHub Pages
- Go to repository Settings → Pages
- Source: Deploy from a branch
- Branch: main
- Folder: /(root)
- Save settings
-
Enable GitHub Actions
- Go to repository Settings → Actions → General
- Allow all actions and reusable workflows
- Save settings
# Clone the repository
git clone https://github.com/your-username/valtronics.git
cd valtronics
# Start development environment
./start-dev.sh
# Make changes and commit
git add .
git commit -m "Your changes"
git push origin mainThe project includes automated workflows:
- GitHub Pages Deployment: Automatic website deployment
- Testing: Automated backend and frontend tests
- Code Quality: Linting and formatting checks
- Security: Dependency vulnerability scanning
Valtronics - Building the future of intelligent electronics monitoring and control.
5. Push to branch: git push origin feature-name
6. Create a Pull Request
Valtronics - Building the future of intelligent electronics monitoring and control.