DEV Community

Cover image for Are You Actually Productive? How I Built a Professional Focus Suite with .NET 9 and Avalonia UI
Furkan Akça
Furkan Akça

Posted on

Are You Actually Productive? How I Built a Professional Focus Suite with .NET 9 and Avalonia UI

Working remotely is a double-edged sword. On one hand, you have freedom. On the other, the lines between "Deep Work," "Casual Browsing," and "Burnt Out" blur into a gray haze. Most productivity tools are either too colorful and distracting or too simplistic to provide real value.

I built ActiveRest to solve this. It’s a premium, executive-grade productivity suite designed for Windows that doesn't just track time—it analyzes the quality of your work while guarding your ergonomic health.

The Core Philosophy
ActiveRest is designed with a "Carbon & Silver" executive aesthetic. It’s meant to look like a native part of a high-end workstation. No gamification, no "cute" icons—just data-driven performance and health management.

Key Value Propositions:
Intelligent Activity Classification: Uses system telemetry to distinguish between focus sessions and media consumption.

20-20-20 Ergonomic Guardrails: Implements medical-standard eye strain prevention through non-intrusive notifications.

Executive PDF Reporting: Professional-grade documentation of your focus leaks and efficiency metrics.

echnical Deep Dive: Under the Hood
To achieve the performance and professional feel required for a tool like this, I pushed the boundaries of the latest .NET ecosystem.

  1. The Power of .NET 9 & C# 13 Choosing .NET 9 wasn't just about staying current; it was about performance.

Low Memory Footprint: By utilizing the latest GC (Garbage Collection) optimizations, ActiveRest stays under 50MB of RAM while idling in the system tray.

C# 13 Features: I leveraged new features like params collections and improved ref safety to keep the telemetry engine highly efficient.

  1. Custom UI with Avalonia UI (MVVM) I chose Avalonia UI over standard WPF for its modern rendering pipeline and flexible styling.

Frameless Interface: To achieve the "Carbon & Silver" look, I implemented a completely custom, chrome-less window.

Reactive Architecture: Using CommunityToolkit.Mvvm, the UI stays perfectly synced with background telemetry without blocking the main thread.

  1. Precision Telemetry via Win32 P/Invoke Determining "Active" vs. "Rest" requires more than just checking if a window is open. ActiveRest communicates directly with the Windows kernel:

Idle Tracking: I use GetLastInputInfo via P/Invoke to determine the exact millisecond a user goes idle.

Audio Intelligence: By tapping into the Core Audio APIs (WASAPI), the software can detect if a background application (like Spotify or YouTube) is actively playing audio, allowing it to differentiate between a "Silent Break" and "Media Consumption."

  1. High-Fidelity Reporting with QuestPDF Generating professional PDFs in .NET used to be a nightmare of HTML-to-PDF wrappers. ActiveRest uses QuestPDF, a modern, layout-based engine.

Declarative UI for PDF: This allows for complex, paginated executive reports that include charts and efficiency metrics, all rendered at 300 DPI for print-ready quality.

Why This Matters for Remote Workers
When you work remotely, you are your own manager. ActiveRest provides the Executive Report you need to hold yourself accountable. Are you actually hitting 4 hours of Deep Work, or are you losing 40% of your day to "context switching"?

ActiveRest doesn't just tell you that you're tired; it gives you the data to prove why and helps you fix it before the burnout hits.

Try It Out
I’m looking for feedback from fellow developers and remote professionals. How do you balance your deep focus sessions with physical health?

https://github.com/furkiak/ActiveRest

Top comments (0)