-
Notifications
You must be signed in to change notification settings - Fork 0
quick start
Valtronics Team edited this page May 4, 2026
·
1 revision
Get Valtronics running in 5 minutes
This quick start guide will get you up and running with Valtronics in just a few minutes. For detailed installation instructions, see the Installation Guide.
- Python 3.8+ installed
- Node.js 16+ installed
- Git installed
- 20GB free disk space
# Clone the repository
git clone https://github.com/valtronics/valtronics.git
cd valtronics
# Backend setup
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Frontend setup
cd ../frontend
npm install# Copy configuration files
cd ../backend
cp .env.example .env
cd ../frontend
cp .env.example .env
# Use SQLite for quick start (already configured)cd ../backend
python init_database.py
python create_sample_data.py# Terminal 1: Start backend
cd backend
source venv/bin/activate
python main_sqlite.py
# Terminal 2: Start frontend
cd frontend
npm start- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
Open http://localhost:3000 to see the main dashboard with:
- Device overview and statistics
- Real-time telemetry data
- Alert management
- System analytics
# Check system health
curl http://localhost:8000/api/v1/health/
# List devices
curl http://localhost:8000/api/v1/devices/
# View analytics
curl http://localhost:8000/api/v1/analytics/system# Create a new device
curl -X POST http://localhost:8000/api/v1/devices/ \
-H "Content-Type: application/json" \
-d '{
"name": "My First Device",
"device_id": "DEV-001",
"device_type": "sensor",
"manufacturer": "Test Corp",
"model": "TC-1000",
"firmware_version": "1.0.0",
"location": "Office",
"status": "online"
}'# Send telemetry data
curl -X POST http://localhost:8000/api/v1/telemetry/ \
-H "Content-Type: application/json" \
-d '{
"device_id": 1,
"metric_name": "temperature",
"metric_value": 23.5,
"unit": "°C"
}'# Create an alert rule
curl -X POST http://localhost:8000/api/v1/alerts/ \
-H "Content-Type: application/json" \
-d '{
"device_id": 1,
"title": "High Temperature Alert",
"description": "Temperature exceeds threshold",
"severity": "warning",
"alert_type": "threshold",
"threshold_value": 25.0,
"metric_name": "temperature"
}'The quick start includes sample data with:
- Temperature Sensor Alpha - Online, Zone A
- Pressure Monitor Beta - Online, Zone B
- Flow Controller Gamma - Warning, Zone C
- Voltage Sensor Delta - Offline, Zone D
- Humidity Monitor Epsilon - Online, Zone E
- 480 data points across 24 hours
- Multiple metrics: temperature, humidity, pressure, voltage
- Real-time updates via WebSocket
- 3 active alerts with different severity levels
- Alert rules for automated monitoring
- Live device status updates
- Interactive charts and graphs
- Real-time telemetry streaming
- Add, edit, and delete devices
- Monitor device health
- Track device locations
- Create custom alert rules
- Set severity levels
- Configure notifications
- System performance metrics
- Device efficiency tracking
- Historical data analysis
// Connect to WebSocket
const ws = new WebSocket('ws://localhost:8000/ws');
// Send message
ws.send(JSON.stringify({
type: 'ping',
timestamp: new Date().toISOString()
}));
// Receive messages
ws.onmessage = function(event) {
console.log('Received:', JSON.parse(event.data));
};Key configuration options in .env files:
Backend (.env)
DATABASE_URL=sqlite:///./valtronics.db
SECRET_KEY=your-secret-key
API_V1_STR=/api/v1Frontend (.env)
REACT_APP_API_URL=http://localhost:8000
REACT_APP_WS_URL=ws://localhost:8000/ws- Development: SQLite (file-based)
- Production: PostgreSQL (recommended)
- Caching: Redis (optional)
# Start development server
python main_sqlite.py
# Initialize database
python init_database.py
# Create sample data
python create_sample_data.py
# Run tests
python -m pytest tests/
# Check dependencies
pip list# Start development server
npm start
# Build for production
npm run build
# Run tests
npm test
# Check dependencies
npm list# Health check
curl http://localhost:8000/api/v1/health/
# List all endpoints
curl http://localhost:8000/docs
# Test authentication
curl -X POST http://localhost:8000/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "password"}'# Check Python version
python --version
# Reinstall dependencies
pip install -r requirements.txt --force-reinstall
# Check database
ls -la valtronics.db# Clear cache
npm cache clean --force
# Reinstall dependencies
rm -rf node_modules package-lock.json
npm install# Check port usage
netstat -tulpn | grep :8000
netstat -tulpn | grep :3000
# Kill processes
sudo kill -9 <PID>After the quick start:
- Read the Full Documentation: Explore the complete wiki documentation
- Configure Production: Set up PostgreSQL and Redis for production use
- Deploy to Cloud: Learn about cloud deployment options
- Customize: Modify themes and components
- Integrate: Connect your own devices and systems
- Documentation: Full Wiki
- Installation Guide: Detailed Installation
- API Reference: API Documentation
- Troubleshooting: Troubleshooting Guide
© 2024 Software Customs Auto Bot Solution. All Rights Reserved.
Valtronics Quick Start Guide v1.0