How anil0401/cnc-app works
This Blazor Server production-monitoring app turns PLC machine counts and downtime signals into live dashboards, persisted production/alarm records, and reports/exports. Its central runtime path is background PLC polling, shift-aware interpretation, SQL persistence, and browser-facing dashboards or reporting. The README documents additional report and dashboard capabilities whose page-level wiring was not sampled; those links are therefore not asserted. Relationships shown below are limited to the README and excerpted source; unsampled UI and report-helper internals are represented by their exact tree paths.
Main entry points: DatabaseHelper.cs AndonDB · Pages Reports and history · ReportStyleHelper.cs Report formatting · PlcPollingService.cs PLC polling
Components 20
Web experience
- Blazor app
Components/App.razor - Home dashboard
Components/Pages/Home.razor - Machine dashboards
Components/Shared/MachineGroupDashboard.razor - Reports and history
Components/Pages - Login and users
Components/Pages/Login.razor - User context
Security/CurrentUserAccessor.cs - Trend graphs
Components/Pages/TrendGraph.razor - Machine planning
Components/Pages/MachinePlanning.razor - Settings
Components/Pages/Settings.razor
Production monitoring
- PLC polling
Communication/PlcPollingService.cs - MC Protocol client
Communication/PLCconnection.cs - Shift rules
Communication/ShiftHelper.cs
Persistence
- AndonDB
Data/DatabaseHelper.cs
Reporting
- Daily reports
Reporting/DailyReportHelper.cs - Hourly reports
Reporting/HourlyReportHelper.cs - Production history
Reporting/ProductionHistoryHelper.cs - Alarm history
Reporting/AlarmHistoryHelper.cs - Report formatting
Reporting/ReportStyleHelper.cs - Email helper
Communication/EmailHelper.cs
Other components
- Shop-floor user
Connections 25
- Shop-floor user → Blazor app: uses
README.md - Blazor app → Home dashboard: renders
- Home dashboard → Machine dashboards: shows
- Shop-floor user → Reports and history: requests
- Shop-floor user → Login and users: signs in
- Login and users → User context: sets claims
Security/CurrentUserAccessor.cs - PLC polling → MC Protocol client: reads devices
Communication/PlcPollingService.cs - PLC polling → Shift rules: uses shift rules
Communication/PlcPollingService.cs - PLC polling → AndonDB: persists readings
Communication/PlcPollingService.cs - Home dashboard → AndonDB: reads dashboards
- Reports and history → Daily reports: requests reports
- Reports and history → Hourly reports: requests reports
- Reports and history → Production history: requests history
- Reports and history → Alarm history: requests alarms
- Daily reports → AndonDB: queries data
Reporting/DailyReportHelper.cs - Hourly reports → AndonDB: queries data
Reporting/HourlyReportHelper.cs - Production history → AndonDB: queries data
Reporting/ProductionHistoryHelper.cs - Alarm history → AndonDB: queries data
Reporting/AlarmHistoryHelper.cs - Daily reports → Report formatting: formats workbook
Reporting/DailyReportHelper.cs - Hourly reports → Report formatting: formats workbook
Reporting/HourlyReportHelper.cs - Production history → Report formatting: formats workbook
Reporting/ProductionHistoryHelper.cs - Alarm history → Report formatting: formats workbook
Reporting/AlarmHistoryHelper.cs - Shop-floor user → Trend graphs: views trends
- Shop-floor user → Machine planning: plans production
- Shop-floor user → Settings: configures system