How che10vec/cleanerschedulemanager works
Project Type & Purpose
• A desktop scheduling application built with WPF using the MVVM pattern.
• Manages cleaners, clients, and tasks; reads/writes data via a JSON file.
File Structure
• Top-level:
– CleanerScheduleManager (main WPF project)
– CleanerScheduleManager.Tests (unit & integration tests)
• Main WPF project layers:
– Views (XAML UI)
– ViewModels (presentation logic)
– Models (domain objects & enums)
– Services (IDataService, INavigationService, JSON implementation)
– Utilities (RelayCommand for commanding)
– DependencyInjection (Bootstrapper wiring)
• Config & resources: App.xaml for startup, Styles.xaml for theming, AssemblyInfo, project files.
Main Components & Their Interactions
a. UI Layer (Views)
– MainView, CleanerView, ClientView, TaskView (XAML + code-behind)
– Binds to properties & commands exposed by ViewModels.
b. Presentation Layer (ViewModels)
– MainViewModel orchestrates navigation and aggregates child VMs.
– CleanerViewModel, ClientViewModel, TaskViewModel handle CRUD and state.
– All inherit from ViewModelBase; implement IPersistable, IHasPendingEdits where needed.
c. Domain Layer (Models)
– Entities: Cleaner, Client, CleaningTask, base Person, enums for status/skill.
d. Service Layer
– IDataService: abstract data operations.
– JsonDataService: concrete JSON file I/O.
– INavigationService: abstract navigation.
– NavigationService: implements window/view transitions.
e. Infrastructure
– DependencyInjection/Bootstrapper: configures DI container, wires interfaces to implementations.
– Utilities/RelayCommand: command pattern implementation.
f. Data Storage
– Local JSON file(s) read/written by JsonDataService.
g. Tests
– Unit tests for JsonDataService, integration tests for NavigationService in CleanerScheduleManager.Tests.
Architectural Patterns
• MVVM: separation of concerns between Views, ViewModels, and Models.
• Dependency Injection: Bootstrapper configures service registry for IDataService and INavigationService.
• Command Pattern: RelayCommand decouples UI actions from logic.
• Repository‐like pattern via IDataService abstraction.