How carlhenrikalm/calm.weathermonitor works
Calm.WeatherMonitor is an interactive console weather monitor. The user starts at the menu, can import bundled CSV data or fetch current weather from Open-Meteo, and sees import outcomes and status in the dashboard; the menu also offers a Statistics selection, though the supplied source shows selection rather than a statistics computation. Both import paths validate/deduplicate measurements and persist them in SQL Server. The graph reflects the shown wiring and calls; the README gives no additional capability details, and unsampled migration/configuration internals are not expanded.
Main entry points: FileImportService.cs CSV import · Menu.cs Interactive menu · WeatherApiService.cs Live weather import · Program.cs Program startup
Components 20
Application
- Program startup
Calm.WeatherMonitor/Program.cs - Database status check
Calm.WeatherMonitor/Services/DatabaseStatusService.cs
Weather imports
- CSV import
Calm.WeatherMonitor/Services/FileImport/FileImportService.cs - CSV validation
Calm.WeatherMonitor/Services/FileImport/WeatherCsvParser.cs - Rejected-row logger
Calm.WeatherMonitor/Services/BadDataLogger.cs - Weather CSV
Calm.WeatherMonitor/DataFiles/weather_data.csv - Live weather import
Calm.WeatherMonitor/Services/Api/WeatherApiService.cs - API response models
Calm.WeatherMonitor/Models/Api/OpenMeteoResponse.cs - Import results
Calm.WeatherMonitor/Models/Results/ApiImportResult.cs - File import result
Calm.WeatherMonitor/Models/Results/FileImportResult.cs
Persistence
- Weather measurement
Calm.WeatherMonitor/Models/WeatherDataPoint.cs - Weather data context
Calm.WeatherMonitor/Data/WeatherDbContext.cs
Console interface
- Interactive menu
Calm.WeatherMonitor/Classes/Menu/Menu.cs - Menu state
Calm.WeatherMonitor/Classes/Menu/States/MenuState.cs - Dashboard layout
Calm.WeatherMonitor/Classes/Menu/Layouts/DashboardLayout.cs - Dashboard panels
Calm.WeatherMonitor/Classes/Menu/Panels - Panel factory
Calm.WeatherMonitor/Classes/Menu/Factory/PanelFactory.cs
Other components
- Console user
- Open-Meteo
- SQL Server
Connections 24
- Console user → Program startup: starts
- Program startup → Interactive menu: runs
Calm.WeatherMonitor/Program.cs - Program startup → Database status check: configures
Calm.WeatherMonitor/Program.cs - Program startup → CSV import: configures
Calm.WeatherMonitor/Program.cs - Program startup → Live weather import: configures
Calm.WeatherMonitor/Program.cs - Interactive menu → Menu state: updates
Calm.WeatherMonitor/Classes/Menu/Menu.cs - Interactive menu → Database status check: checks
Calm.WeatherMonitor/Classes/Menu/Menu.cs - Interactive menu → CSV import: invokes
Calm.WeatherMonitor/Classes/Menu/Menu.cs - Interactive menu → Live weather import: invokes
Calm.WeatherMonitor/Classes/Menu/Menu.cs - Interactive menu → Dashboard layout: renders
Calm.WeatherMonitor/Classes/Menu/Menu.cs - Dashboard layout → Dashboard panels: builds
Calm.WeatherMonitor/Classes/Menu/Layouts/DashboardLayout.cs - Dashboard panels → Panel factory: uses
Calm.WeatherMonitor/Classes/Menu/Panels/InformationPanelBuilder.cs - CSV import → Weather CSV: reads
Calm.WeatherMonitor/Services/FileImport/FileImportService.cs - CSV import → CSV validation: parses rows
Calm.WeatherMonitor/Services/FileImport/FileImportService.cs - CSV import → Rejected-row logger: logs rejects
Calm.WeatherMonitor/Services/FileImport/FileImportService.cs - CSV import → Weather data context: reads and writes
Calm.WeatherMonitor/Services/FileImport/FileImportService.cs - Live weather import → Open-Meteo: requests weather
Calm.WeatherMonitor/Services/Api/WeatherApiService.cs - Live weather import → API response models: deserializes
Calm.WeatherMonitor/Services/Api/WeatherApiService.cs - Live weather import → Weather data context: reads and writes
Calm.WeatherMonitor/Services/Api/WeatherApiService.cs - Live weather import → Import results: returns result
Calm.WeatherMonitor/Services/Api/WeatherApiService.cs - CSV import → File import result: returns result
Calm.WeatherMonitor/Services/FileImport/FileImportService.cs - Database status check → Weather data context: checks connection
Calm.WeatherMonitor/Services/DatabaseStatusService.cs - Weather data context → Weather measurement: maps records
Calm.WeatherMonitor/Data/WeatherDbContext.cs - Weather data context → SQL Server: connects