How ltvasanth/inspectraai-ai-powered-pcb-defect-inspection-system works
PCB-AI is a full-stack PCB inspection and quality-intelligence platform. Engineers submit an image or demo scenario, receive defect detections and stored inspection results, then review process analytics, probable root causes, corrective actions, and closed-loop feedback. The React pages call a centralized API client; FastAPI routes handle requests and services perform inspection and analysis over SQLite-backed records. The README documents the main product capabilities; some route-to-service details and the training/sentinel internals are not fully shown, so uncertain links are omitted.
Main entry points: App.jsx Page Router · api.js API Client · main.py FastAPI App · inspection.py Inspection Routes
Components 29
Engineer Console
- Page Router
frontend/src/App.jsx - Inspection UI
frontend/src/pages/Inspection.jsx - Quality Views
frontend/src/pages/Dashboard.jsx - Inspection History
frontend/src/pages/History.jsx - Process Monitoring
frontend/src/pages/ProcessMonitoring.jsx - Root Cause View
frontend/src/pages/RootCause.jsx - Action Review
frontend/src/pages/CorrectiveActions.jsx - Closed Loop View
frontend/src/pages/ClosedLoop.jsx - Analytics Views
frontend/src/pages/Analytics.jsx - False Call View
frontend/src/pages/FalseCallAnalysis.jsx - API Client
frontend/src/services/api.js
API and Inspection
- FastAPI App
backend/main.py - Inspection Routes
backend/routes/inspection.py - Process Actions
backend/routes/process_actions.py - Analytics Routes
backend/routes/analytics.py - Dashboard Route
backend/routes/dashboard.py - Sentinel Routes
backend/routes/sentinel.py
Quality Intelligence
- Mock Inspection
backend/services/mock_inspection_service.py - YOLO Inspection
backend/services/yolo_inspection_service.py - Root Cause Analysis
backend/services/root_cause_service.py - Action Recommendations
backend/services/corrective_action_service.py - Quality Analytics
backend/services/analytics_service.py - Event Hub
backend/services/event_hub.py - Job Service
backend/services/job_service.py - Synthetic Datasets
backend/services/synthetic_dataset_service.py
Inspection Data
- DB Session
backend/database/db.py - Inspection Records
backend/models/models.py - Demo Seed Data
backend/database/seed.py
Other components
- Engineer
Connections 44
- Engineer → Page Router: uses console
frontend/src/App.jsx - Page Router → Inspection UI: routes to
frontend/src/App.jsx - Page Router → Quality Views: routes to
frontend/src/App.jsx - Page Router → Inspection History: routes to
frontend/src/App.jsx - Page Router → Process Monitoring: routes to
frontend/src/App.jsx - Page Router → Root Cause View: routes to
frontend/src/App.jsx - Page Router → Action Review: routes to
frontend/src/App.jsx - Page Router → Closed Loop View: routes to
frontend/src/App.jsx - Page Router → Analytics Views: routes to
frontend/src/App.jsx - Page Router → False Call View: routes to
frontend/src/App.jsx - Inspection UI → API Client: submits inspection
frontend/src/pages/Inspection.jsx - Quality Views → API Client: requests dashboard
frontend/src/pages/Dashboard.jsx - Inspection History → API Client: requests history
frontend/src/pages/History.jsx - Process Monitoring → API Client: requests process data
frontend/src/pages/ProcessMonitoring.jsx - Root Cause View → API Client: requests causes
frontend/src/pages/RootCause.jsx - Action Review → API Client: reviews actions
frontend/src/pages/CorrectiveActions.jsx - Closed Loop View → API Client: sends feedback
frontend/src/pages/ClosedLoop.jsx - Analytics Views → API Client: requests analytics
frontend/src/pages/Analytics.jsx - False Call View → API Client: requests comparison
frontend/src/pages/FalseCallAnalysis.jsx - API Client → FastAPI App: calls API
README.md - FastAPI App → Inspection Routes: mounts routes
backend/main.py - FastAPI App → Process Actions: mounts routes
backend/main.py - FastAPI App → Analytics Routes: mounts routes
backend/main.py - FastAPI App → Dashboard Route: mounts routes
backend/main.py - FastAPI App → Sentinel Routes: mounts routes
backend/main.py - Inspection Routes → Mock Inspection: uses demo engine
backend/routes/inspection.py - Inspection Routes → YOLO Inspection: runs inference
backend/routes/inspection.py - Inspection Routes → Root Cause Analysis: derives causes
backend/routes/inspection.py - Inspection Routes → Action Recommendations: gets recommendations
backend/routes/inspection.py - Analytics Routes → Quality Analytics: requests metrics
backend/routes/analytics.py - Dashboard Route → Quality Analytics: computes KPIs
backend/routes/dashboard.py - Inspection Routes → DB Session: opens session
backend/routes/inspection.py - Process Actions → DB Session: opens session
backend/routes/process_actions.py - Analytics Routes → DB Session: opens session
backend/routes/analytics.py - Dashboard Route → DB Session: opens session
backend/routes/dashboard.py - DB Session → Inspection Records: maps records
backend/models/models.py - Quality Analytics → Inspection Records: queries records
backend/services/analytics_service.py - Inspection Routes → Inspection Records: persists results
backend/routes/inspection.py - FastAPI App → DB Session: creates schema
backend/main.py - FastAPI App → Demo Seed Data: loads seed module
backend/main.py - Sentinel Routes → Event Hub: uses events
backend/routes/sentinel.py - Sentinel Routes → Job Service: dispatches jobs
backend/routes/sentinel.py - Sentinel Routes → Synthetic Datasets: creates datasets
backend/routes/sentinel.py - Job Service → Event Hub: publishes events
backend/services/job_service.py