How nirvash/illustra works
Main Components
• User Interface (UI) Layer:
• Views (in src/Views): MainWindow, ImageViewerWindow, property dialogs, custom controls (such as RatingStarControl, ZoomControl).
• ViewModels (in src/ViewModels): Main window, settings, file system tree, keyboard shortcuts, etc.
• XAML resources and themes (Dark.xaml, Light.xaml in src/Themes).
• Application/Domain Layer:
• Models (in src/Models and src/Shared/Models): Representing images, file nodes, settings, ratings, etc.
• Services and Helpers (in src/Services and src/Helpers): File operations, thumbnail processing, database access, drag & drop helpers, notifications, and UI helper classes.
• Converters and Extensions: Value converters (BooleanToColorConverter, etc.) and extension methods for file and image handling.
• Backend/API or Integration Layer:
• MCPHost component (in src/MCPHost): Contains controllers (such as McpController), APIService, Program.cs, Startup, and configuration files to provide web/API interfacing or external command handling.
• Persistence & Data Management:
• Database management classes (e.g., DatabaseAccess, DatabaseManager) and integration with SQLite-net for rating data persistence.
• External Dependencies:
• Third-party libraries (SkiaSharp, SixLabors.ImageSharp, pngcs, gong-wpf-dragdrop, VirtualizingWrapPanel, Extended.Wpf.Toolkit, MahApps.Metro, Prism, and Microsoft.Extensions.DependencyInjection) as seen in the README.
• Tests:
• Unit and integration tests (located in tests folder) which validate the components like MCPHost and application functionalities.
Relationships and Data Flow
• UI Components (Views/ViewModels) interact with the Domain Layer (Models and Services) to invoke business logic.
• Services (such as FileSystemMonitor, ThumbnailRequestQueue, ImagePropertiesService) retrieve image files/data and coordinate operations between Models and UI.
• The MCPHost component exposes API endpoints via its Controllers, which likely serve as a bridge between external commands and internal operations.
• The database layer (through classes like DatabaseManager) is used by services for persisting user ratings, settings, and possibly metadata.
• External libraries provide lower-level functions (image processing, drag/drop, virtualization) used within the services and controls.
Architectural Patterns & Design Principles
• MVVM Pattern:
• Clearly separate the presentation (Views) from business logic (ViewModels and Models).
• Use of Prism for MVVM, promoting maintainability and testability.
• Dependency Injection:
• Integration of Microsoft.Extensions.DependencyInjection to manage services and decouple dependencies.
• Modular Design:
• Separation of application logic (in src), API/integration (MCPHost), shared functionality (src/Shared), and testing (tests).
• External Service Integration:
• Clear textual and visual labels for every component.
• UI elements (Views/ViewModels),
• Business logic (Services/Helpers, Models),
• Integration/API components (MCPHost),
• Infrastructure/external dependencies (third-party libraries and database persistence).