How hicham-4r/smartfactory-dss works
SmartFactory DSS combines a Laravel manufacturing decision-support application with a separate FastAPI ML service. The principal workflow is a user request through Laravel to verified inference and back into dashboards or secure reports; ERP synchronization supplies operational context, while guarded LLM explanations are an optional branch. The graph preserves production, maintenance, quality, security, and observability capabilities documented in the README. Sampled source confirms selected query, inference-client, and reporting behavior; some broader subsystem links rely on README documentation rather than inspected implementation.
Main entry points: laravel-app Laravel DSS · AiInsightsController.php AI Insights requests · ErpSyncCommand.php ERP synchronization · monitoring Prometheus
Components 25
Manufacturing Operations
- Laravel DSS
laravel-app - Production workflows
laravel-app/app/Http/Controllers/Production - Dashboards and KPIs
laravel-app/app/Services/Dashboard - Quality workflows
laravel-app/app/Http/Controllers/Analytics - DSS database
AI Decision Support
- AI Insights requests
laravel-app/app/Http/Controllers/AI/AiInsightsController.php - Inference source features
laravel-app/app/Services/AI/Inference/EloquentAutomaticInferenceSourceRepository.php - FastAPI inference client
laravel-app/app/Services/AI/Inference/FastApiAiInferenceClient.php - Inference API routes
fastapi-ai/app/api/routes/inference.py - Inference service
fastapi-ai/app/inference/service.py - Model registry
fastapi-ai/app/inference/registry.py - Dataset preprocessing
fastapi-ai/app/preprocessing/pipeline.py - Feature engineering
fastapi-ai/app/features/pipeline.py - Guarded explanations
fastapi-ai/app/llm/service.py - AI report exports
laravel-app/app/Http/Controllers/Reports/AiInferenceReportController.php
ERP Integration
- ERP synchronization
laravel-app/app/Console/Commands/ErpSyncCommand.php - ERP sync monitoring
laravel-app/app/Services/ERP/Monitoring/ErpMonitoringQueryService.php - Sage ERP simulator
sage-erp-simulator - ERP database
Access and Observability
- HTTPS gateway
- Authentication and RBAC
laravel-app/app/Services/Auth/SecureLoginService.php - Prometheus
deploy/kubernetes/monitoring - Grafana
deploy/kubernetes/monitoring
Other components
- Browser user
- Ollama
Connections 28
- Browser user → HTTPS gateway: HTTPS requests
- HTTPS gateway → Laravel DSS: routes requests
- Browser user → Authentication and RBAC: signs in
- Laravel DSS → Production workflows: serves workflows
- Laravel DSS → Dashboards and KPIs: builds views
- Laravel DSS → Quality workflows: serves workflows
- Production workflows → DSS database: reads and writes
- Dashboards and KPIs → DSS database: queries metrics
- Quality workflows → DSS database: reads and writes
- Laravel DSS → ERP synchronization: runs synchronization
- ERP synchronization → Sage ERP simulator: syncs records
- Sage ERP simulator → ERP database: stores simulated data
- ERP synchronization → DSS database: persists sync state
- Laravel DSS → ERP sync monitoring: queries sync health
- ERP sync monitoring → DSS database: reads sync runs
- Laravel DSS → AI Insights requests: serves AI requests
- AI Insights requests → Inference source features: prepares features
- AI Insights requests → FastAPI inference client: requests inference
- FastAPI inference client → Inference API routes: sends contract
- Inference API routes → Inference service: dispatches inference
- Inference service → Model registry: loads models
- Dataset preprocessing → Feature engineering: prepares datasets
- AI Insights requests → AI report exports: exports saved results
- AI Insights requests → Guarded explanations: requests narrative
- Guarded explanations → Ollama: generates explanation
- Prometheus → Laravel DSS: scrapes metrics
- Prometheus → HTTPS gateway: scrapes private metrics
- Grafana → Prometheus: queries metrics