How omiddadvar/tv-clock-app works
TvClockApp is a cross-platform MAUI clock with selectable time zones and background colors. A user opens the home screen, which loads saved preferences, refreshes the displayed time and date on a timer, and can navigate to settings to choose and save a location and color. Settings are persisted through MAUI Preferences. The graph includes the documented runtime workflow and the service-registration layer; UI composition and some navigation wiring are not shown in the available excerpts, so those links are omitted.
Main entry points: MauiSettingsRepository.cs MAUI settings store · HomeViewModel.cs Home view model · ServiceRegisteration.cs Application registration · SettingsViewModel.cs Settings view model
Components 14
Presentation
- Home page
TvClockApp/Presentation/Pages/HomePage.xaml.cs - Settings page
TvClockApp/Presentation/Pages/SettingsPage.xaml.cs
Application
- Home view model
TvClockApp/Application/ViewModels/HomeViewModel.cs - Settings view model
TvClockApp/Application/ViewModels/SettingsViewModel.cs - Clock service
TvClockApp/Application/Services/ClockService.cs - Location catalog
TvClockApp/Application/Services/LocationCatalog.cs - Application registration
TvClockApp/Application/ServiceRegisteration.cs
Domain
- Location setting
TvClockApp/Domain/Entities/LocationSetting.cs - Settings contract
TvClockApp/Domain/Interfaces/ISettingsRepository.cs
Infrastructure
- MAUI settings store
TvClockApp/Infrastructure/Repositories/MauiSettingsRepository.cs - Infrastructure registration
TvClockApp/Infrastructure/ServiceRegisteration.cs
Other components
- User
- MAUI Preferences
- MAUI bootstrap
TvClockApp/MauiProgram.cs
Connections 21
- User → Home page: opens
- User → Settings page: chooses settings
- Home page → Home view model: loads and starts
TvClockApp/Presentation/Pages/HomePage.xaml.cs - Settings page → Settings view model: binds view model
TvClockApp/Presentation/Pages/SettingsPage.xaml.cs - Home view model → Settings contract: reads preferences
TvClockApp/Application/ViewModels/HomeViewModel.cs - Home view model → Location catalog: uses default
TvClockApp/Application/ViewModels/HomeViewModel.cs - Home view model → Clock service: formats time
TvClockApp/Application/ViewModels/HomeViewModel.cs - Clock service → Location setting: resolves time zone
TvClockApp/Application/Services/ClockService.cs - Settings view model → Settings contract: loads and saves
TvClockApp/Application/ViewModels/SettingsViewModel.cs - Settings view model → Location catalog: offers locations
TvClockApp/Application/ViewModels/SettingsViewModel.cs - Settings contract → Location setting: uses model
TvClockApp/Domain/Interfaces/ISettingsRepository.cs - MAUI settings store → Settings contract: implements
TvClockApp/Infrastructure/Repositories/MauiSettingsRepository.cs - MAUI settings store → MAUI Preferences: reads and writes
TvClockApp/Infrastructure/Repositories/MauiSettingsRepository.cs - MAUI settings store → Location catalog: matches saved location
TvClockApp/Infrastructure/Repositories/MauiSettingsRepository.cs - MAUI settings store → Location setting: returns location
TvClockApp/Infrastructure/Repositories/MauiSettingsRepository.cs - MAUI bootstrap → Application registration: registers services
TvClockApp/MauiProgram.cs - MAUI bootstrap → Infrastructure registration: registers services
TvClockApp/MauiProgram.cs - Infrastructure registration → MAUI settings store: registers implementation
TvClockApp/Infrastructure/ServiceRegisteration.cs - Application registration → Clock service: registers service
TvClockApp/Application/ServiceRegisteration.cs - Application registration → Home view model: registers view model
TvClockApp/Application/ServiceRegisteration.cs - Application registration → Settings view model: registers view model
TvClockApp/Application/ServiceRegisteration.cs