Windows 11 Demo
GitHub: https://github.com/yclizr20230720/EDAgit config --global user.email "yclizr20230720@gmail.com"
git branch -M main
git remote add origin https://github.com/yclizr20230720/EDA.git
git add .
git commit -m "first commit"
git push -u origin mainQuick Demo SOP - Advanced Analytics Platform on Windows 11
🚀 Quick Start Guide (15 minutes)
Prerequisites Check
# Open PowerShell as Administrator and verify:
docker-compose --version
git --version
📦 Step 1: Install Prerequisites (if needed)
A. Install Docker Desktop
# Download and install Docker Desktop for Windows
# Visit: https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe
# After installation, restart Windows
# Enable WSL 2 if prompted
B. Install Git (if needed)
# Download from: https://git-scm.com/download/win
# Or use winget:
winget install --id Git.Git -e --source winget
🏗️ Step 2: Quick Setup
A. Clone and Navigate
# Open PowerShell in your desired directory
cd C:\
mkdir Analytics-Demo
cd Analytics-Demo
# Clone the project (replace with actual repo URL)
git clone https://github.com/your-repo/advanced-analytics-platform.git
cd advanced-analytics-platform
B. Quick Configuration
# Create environment file --- in the PowerShell
@"
NODE_ENV=development
JWT_SECRET=demo-jwt-secret-key-for-testing-only
POSTGRES_PASSWORD=demopassword123
REDIS_PASSWORD=demoredis123
MINIO_ROOT_PASSWORD=demominio123
VITE_API_URL=http://localhost:3001
VITE_ML_SERVICE_URL=http://localhost:8001
"@ | Out-File -FilePath .env -Encoding UTF8
🚀 Step 3: Start the System
A. Launch Services
# Launch the Docker Desktop

# Start all services (this will take 3-5 minutes first time)
docker-compose -f docker-compose.dev.yml up -d
# Check if services are starting
docker-compose -f docker-compose.dev.yml ps


B. Wait for Services to be Ready
# Wait for all services to be healthy (check every 30 seconds)
do {
Write-Host "Checking service health..." -ForegroundColor Yellow
$response = try {
Invoke-RestMethod -Uri "http://localhost:3001/health" -TimeoutSec 5
} catch {
$null
}
if ($response -and $response.status -eq "ok") {
Write-Host "✅ Backend is ready!" -ForegroundColor Green
break
}
Write-Host "⏳ Services still starting... waiting 30 seconds" -ForegroundColor Yellow
Start-Sleep -Seconds 30
} while ($true)
# Check frontend
do {
Write-Host "Checking frontend..." -ForegroundColor Yellow
$frontendReady = try {
$response = Invoke-WebRequest -Uri "http://localhost:3000" -TimeoutSec 5
$response.StatusCode -eq 200
} catch {
$false
}
if ($frontendReady) {
Write-Host "✅ Frontend is ready!" -ForegroundColor Green
break
}
Start-Sleep -Seconds 10
} while ($true)


🎯 Step 4: Initialize Demo Data
A. Create Admin User and Get Token
# Register admin user
$registerResponse = Invoke-RestMethod -Uri "http://localhost:3001/api/auth/register" `
-Method POST `
-ContentType "application/json" `
-Body (@{
username = "admin"
email = "admin@demo.com"
password = "admin123"
firstName = "Demo"
lastName = "Admin"
} | ConvertTo-Json)
Write-Host "✅ Admin user created" -ForegroundColor Green
# Login to get token
$loginResponse = Invoke-RestMethod -Uri "http://localhost:3001/api/auth/login" `
-Method POST `
-ContentType "application/json" `
-Body (@{
username = "admin"
password = "admin123"
} | ConvertTo-Json)
$token = $loginResponse.data.token
Write-Host "✅ Admin token obtained" -ForegroundColor Green
B. Initialize Equipment Data
# Initialize FDC equipment profiles and sample data
$headers = @{
"Authorization" = "Bearer $token"
"Content-Type" = "application/json"
}
$equipmentResponse = Invoke-RestMethod -Uri "http://localhost:3001/api/equipment/initialize" `
-Method POST `
-Headers $headers
Write-Host "✅ Equipment data initialized:" -ForegroundColor Green
Write-Host " - Equipment Count: $($equipmentResponse.data.equipmentCount)" -ForegroundColor Cyan
Write-Host " - Fault Count: $($equipmentResponse.data.faultCount)" -ForegroundColor Cyan
🌐 Step 5: Access the System
A. Open Web Browser
# Open the analytics platform in default browser
Start-Process "http://localhost:3000"
Write-Host "🎉 System is ready for demonstration!" -ForegroundColor Green
Write-Host ""
Write-Host "📊 Access URLs:" -ForegroundColor Yellow
Write-Host " Frontend: http://localhost:3000" -ForegroundColor Cyan
Write-Host " Backend API: http://localhost:3001" -ForegroundColor Cyan
Write-Host " Health Check: http://localhost:3001/health" -ForegroundColor Cyan
Write-Host ""
Write-Host "🔐 Demo Credentials:" -ForegroundColor Yellow
Write-Host " Username: admin" -ForegroundColor Cyan
Write-Host " Password: admin123" -ForegroundColor Cyan
🎭 Step 6: Demo Script
A. Login and Navigation
Open Browser: Navigate to
http://localhost:3000Login: Use credentials
admin/admin123Dashboard: You'll see the main analytics dashboard
B. Equipment Monitoring Demo
# Get equipment list for demo
$equipmentList = Invoke-RestMethod -Uri "http://localhost:3001/api/equipment" `
-Headers $headers
Write-Host "📋 Available Equipment for Demo:" -ForegroundColor Yellow
$equipmentList.data | ForEach-Object {
Write-Host " - $($_.name) ($($_.type)) - Status: $($_.status)" -ForegroundColor Cyan
}
C. Demo Flow
Equipment Page: Show 10 different FDC equipment types
Sensor Data: Display real-time sensor readings with faults
Data Upload: Upload CSV files for analysis
Analytics: Generate statistical reports and visualizations
Fault Detection: Show detected equipment faults and recommendations
Jobs: Demonstrate job scheduling and monitoring
🔧 Step 7: Demo Data Generation
A. Create Sample CSV Data
# Create sample FDC data file for upload demo
$sampleData = @"
timestamp,equipment_id,sensor_id,temperature,pressure,flow_rate,quality
2024-01-15T10:00:00Z,EQ001,TEMP_01,125.5,2.45,150.2,good
2024-01-15T10:01:00Z,EQ001,TEMP_01,126.2,2.48,151.1,good
2024-01-15T10:02:00Z,EQ001,TEMP_01,127.8,2.52,149.8,warning
2024-01-15T10:03:00Z,EQ001,TEMP_01,135.4,2.89,148.5,critical
2024-01-15T10:04:00Z,EQ001,TEMP_01,142.1,3.12,147.2,critical
2024-01-15T10:05:00Z,EQ001,TEMP_01,128.3,2.55,150.8,good
"@
$sampleData | Out-File -FilePath "demo_fdc_data.csv" -Encoding UTF8
Write-Host "✅ Sample CSV file created: demo_fdc_data.csv" -ForegroundColor Green
B. Upload Demo Data via API
# Upload the sample file
$boundary = [System.Guid]::NewGuid().ToString()
$filePath = "demo_fdc_data.csv"
$fileBytes = [System.IO.File]::ReadAllBytes($filePath)
$fileContent = [System.Text.Encoding]::GetEncoding('iso-8859-1').GetString($fileBytes)
$bodyLines = @(
"--$boundary",
'Content-Disposition: form-data; name="file"; filename="demo_fdc_data.csv"',
'Content-Type: text/csv',
'',
$fileContent,
"--$boundary--"
) -join "`r`n"
$uploadResponse = Invoke-RestMethod -Uri "http://localhost:3001/api/data/upload" `
-Method POST `
-Headers @{
"Authorization" = "Bearer $token"
"Content-Type" = "multipart/form-data; boundary=$boundary"
} `
-Body $bodyLines
Write-Host "✅ Demo data uploaded successfully" -ForegroundColor Green
🎪 Step 8: Demo Scenarios
A. Equipment Monitoring Scenario
Write-Host "🎯 Demo Scenario 1: Equipment Monitoring" -ForegroundColor Magenta
Write-Host "1. Navigate to Equipment page" -ForegroundColor White
Write-Host "2. Select 'CVD_Chamber_1' equipment" -ForegroundColor White
Write-Host "3. View real-time sensor data with fault indicators" -ForegroundColor White
Write-Host "4. Show fault history and recommendations" -ForegroundColor White
B. Data Analytics Scenario
Write-Host "🎯 Demo Scenario 2: Data Analytics" -ForegroundColor Magenta
Write-Host "1. Go to Data page and upload demo_fdc_data.csv" -ForegroundColor White
Write-Host "2. Preview data with quality assessment" -ForegroundColor White
Write-Host "3. Navigate to Analytics page" -ForegroundColor White
Write-Host "4. Generate statistical summary and time series analysis" -ForegroundColor White
Write-Host "5. Create visualizations (line charts, histograms)" -ForegroundColor White
C. Job Management Scenario
Write-Host "🎯 Demo Scenario 3: Job Management" -ForegroundColor Magenta
Write-Host "1. Go to Jobs page" -ForegroundColor White
Write-Host "2. Create a new statistical analysis job" -ForegroundColor White
Write-Host "3. Monitor job queue and execution status" -ForegroundColor White
Write-Host "4. View job results and logs" -ForegroundColor White
🛑 Step 9: Stop the System
A. Graceful Shutdown
# Stop all services
docker-compose -f docker-compose.dev.yml down
Write-Host "✅ System stopped successfully" -ForegroundColor Green
B. Complete Cleanup (Optional)
# Remove all containers and volumes (⚠️ This will delete all data)
docker-compose -f docker-compose.dev.yml down -v
docker system prune -f
Write-Host "✅ Complete cleanup done" -ForegroundColor Green
🚨 Troubleshooting
A. Common Windows Issues
1. Docker Desktop Not Running
# Start Docker Desktop
Start-Process "C:\Program Files\Docker\Docker\Docker Desktop.exe"
Start-Sleep -Seconds 30
2. Port Conflicts
# Check if ports are in use
netstat -an | findstr ":3000"
netstat -an | findstr ":3001"
netstat -an | findstr ":5432"
# Kill processes using ports (if needed)
# Get-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess | Stop-Process -Force
3. WSL 2 Issues
# Enable WSL 2 (run as Administrator)
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# Restart required after enabling WSL 2
B. Service Health Check
# Quick health check script
function Test-ServiceHealth {
$services = @{
"Frontend" = "http://localhost:3000"
"Backend" = "http://localhost:3001/health"
"Database" = "localhost:5432"
}
foreach ($service in $services.GetEnumerator()) {
try {
if ($service.Value -like "http*") {
$response = Invoke-WebRequest -Uri $service.Value -TimeoutSec 5
$status = if ($response.StatusCode -eq 200) { "✅ OK" } else { "❌ Error" }
} else {
$tcpTest = Test-NetConnection -ComputerName "localhost" -Port 5432 -WarningAction SilentlyContinue
$status = if ($tcpTest.TcpTestSucceeded) { "✅ OK" } else { "❌ Error" }
}
Write-Host "$($service.Key): $status" -ForegroundColor $(if ($status -like "*OK*") { "Green" } else { "Red" })
} catch {
Write-Host "$($service.Key): ❌ Error" -ForegroundColor Red
}
}
}
Test-ServiceHealth
📋 Demo Checklist
Pre-Demo Setup (5 minutes)
[ ] Docker Desktop running
[ ] All services started and healthy
[ ] Admin user created
[ ] Equipment data initialized
[ ] Sample CSV file ready
[ ] Browser opened to localhost:3000
Demo Flow (10 minutes)
[ ] Login demonstration
[ ] Equipment monitoring showcase
[ ] Data upload and preview
[ ] Analytics and visualization
[ ] Fault detection features
[ ] Job management system
Post-Demo
[ ] Answer questions
[ ] Show additional features if requested
[ ] Provide access credentials for extended testing
[ ] Stop services if demo is complete
🎉 Success Indicators
✅ System Ready When:
Frontend loads at http://localhost:3000
Backend health check returns "ok"
Login works with admin/admin123
Equipment page shows 10 FDC equipment units
Sample data can be uploaded successfully
This SOP will get your Advanced Analytics Platform running on Windows 11 in approximately 15 minutes, ready for a comprehensive demonstration of FDC time series analytics capabilities!