3.2 KiB
3.2 KiB
Architecture & Technical Design – PulseDock
Overview
PulseDock is built on modern C# .NET 10 WPF architecture leveraging Dependency Injection, MVVM separation, and non-blocking background telemetry sampling.
┌─────────────────────────┐
│ App Bootstrapper │
│ (Microsoft.Extensions │
│ .DependencyInjection) │
└────────────┬────────────┘
│
┌───────────────────────┼───────────────────────┐
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Hardware │ │ Settings & │ │ Theme & Position │
│ Monitoring │ │ Notifications │ │ Management │
│ Service │ │ Services │ │ Services │
└────────┬─────────┘ └────────┬─────────┘ └────────┬─────────┘
│ │ │
└───────────────────────┼───────────────────────┘
▼
┌───────────────────────┐
│ MainWidgetViewModel │
└───────────┬───────────┘
▼
┌───────────────────────┐
│ MainWindow (WPF UI) │
│ Glassmorphism XAML │
└───────────────────────┘
Key Architectural Principles
-
Non-Blocking Telemetry Polling:
HardwareMonitoringServiceexecutes hardware polling on background tasks viaPeriodicTimerandCancellationToken.- Never blocks the WPF UI thread (
Dispatcher.InvokeAsyncmarshals updates cleanly).
-
Non-Elevated Safe Fallbacks:
- Standard user mode startup.
- If
LibreHardwareMonitorLibkernel driver access is denied without Admin rights, it automatically falls back toPerformanceCounter, WMI,NetworkInterface, andSystem.Diagnosticswithout crashing.
-
Memory Optimization:
CircularBuffer<T>allocates fixed-size arrays for 60s/300s/900s history arrays.- Zero endless GC allocations during long runtime sessions.
-
Custom WPF Drawing Controls:
SparklineControlandProgressRingControlderive directly fromFrameworkElementusingDrawingContext, bypassing heavy WPF layout trees for rendering.