How prakasamtk/quality-inspection-system---qis works
QIS predicts in-process manufacturing defects, explains risk, and surfaces recommended corrective action to quality engineers and operators. The main workflow runs from the live-floor UI through the prediction API, inference and asset resolution, then inspection/alert handling and live dashboard updates. Separate branches cover machine/product management, analytics, model insights, and offline dataset preparation and training. The graph combines sampled calls and imports with README-documented capabilities; unsampled service and endpoint internals are represented only at their documented subsystem level.
Main entry points: App.tsx Dashboard app · inference_service.py Inference and explanation · predict.py Prediction endpoint · endpoints.ts Typed API client
Components 26
Operator interface
- Dashboard app
frontend/src/App.tsx - Live floor
frontend/src/pages/LiveFloor.tsx - Inspections view
frontend/src/pages/Inspections.tsx - Machines view
frontend/src/pages/Machines.tsx - Analytics view
frontend/src/pages/Analytics.tsx - Model insights
frontend/src/pages/ModelInsights.tsx - Typed API client
frontend/src/api/endpoints.ts - Live feed hooks
frontend/src/hooks/useLiveFeed.ts - WebSocket hook
frontend/src/hooks/useWebSocket.ts
API and realtime
- FastAPI app
backend/app/main.py - V1 API router
backend/app/api/v1/router.py - Prediction endpoint
backend/app/api/v1/endpoints/predict.py - Domain API endpoints
backend/app/api/v1/endpoints - WebSocket channels
backend/app/ws
Quality services
- Inference and explanation
backend/app/services/inference_service.py - Asset registry
backend/app/services/registry_service.py - Inspection service
backend/app/services/inspection_service.py - Alert rules
backend/app/services/alert_service.py - Analytics services
backend/app/services - Production simulator
backend/app/simulator - SQLite domain records
backend/app/models
Data and modeling
- Feature pipeline
ml/features.py - Model training
ml/train.py - Synthetic data
ml/generate_dataset.py - AI4I loader
ml/loaders/ai4i.py
Other components
- Operator / engineer
Connections 35
- Operator / engineer → Dashboard app: uses
- Dashboard app → Live floor: routes to
frontend/src/App.tsx - Dashboard app → Inspections view: routes to
frontend/src/App.tsx - Dashboard app → Machines view: routes to
frontend/src/App.tsx - Dashboard app → Analytics view: routes to
frontend/src/App.tsx - Dashboard app → Model insights: routes to
frontend/src/App.tsx - Dashboard app → Live feed hooks: subscribes via
frontend/src/App.tsx - Dashboard app → Typed API client: fetches KPIs via
frontend/src/App.tsx - Live feed hooks → WebSocket hook: uses
frontend/src/hooks/useLiveFeed.ts - Live floor → Typed API client: loads data via
- Inspections view → Typed API client: fetches via
frontend/src/pages/Inspections.tsx - Model insights → Typed API client: fetches via
frontend/src/pages/ModelInsights.tsx - Typed API client → FastAPI app: calls REST API
- WebSocket hook → WebSocket channels: connects to
frontend/src/hooks/useWebSocket.ts - FastAPI app → V1 API router: mounts
backend/app/main.py - FastAPI app → WebSocket channels: mounts
backend/app/main.py - V1 API router → Prediction endpoint: registers
backend/app/api/v1/router.py - V1 API router → Domain API endpoints: registers
backend/app/api/v1/router.py - Prediction endpoint → Inference and explanation: scores parts
backend/app/api/v1/endpoints/predict.py - Prediction endpoint → Inspection service: records inspection
backend/app/api/v1/endpoints/predict.py - Prediction endpoint → Alert rules: evaluates alerts
backend/app/api/v1/endpoints/predict.py - Prediction endpoint → WebSocket channels: publishes updates
backend/app/api/v1/endpoints/predict.py - Inference and explanation → Asset registry: resolves assets
backend/app/services/inference_service.py - Inference and explanation → Feature pipeline: reuses features
- Inspection service → Inference and explanation: requests scoring
backend/app/services/inspection_service.py - Alert rules → SQLite domain records: reads and writes
backend/app/services/alert_service.py - Asset registry → SQLite domain records: loads asset records
backend/app/services/registry_service.py - Inspection service → SQLite domain records: persists inspections
backend/app/services/inspection_service.py - Domain API endpoints → Analytics services: serves analytics
backend/app/api/v1/endpoints/predict.py - Production simulator → Inference and explanation: generates scored flow
- Production simulator → WebSocket channels: feeds live updates
- Synthetic data → Feature pipeline: provides data for
ml/generate_dataset.py - AI4I loader → Feature pipeline: canonicalizes inputs for
- Model training → Feature pipeline: uses features
ml/train.py - Model training → Inference and explanation: produces model artifacts