DEV Community

Cover image for Building an Enterprise-Grade File Organizer with .NET and Avalonia UI
Furkan Akça
Furkan Akça

Posted on

Building an Enterprise-Grade File Organizer with .NET and Avalonia UI

The Motivation

We've all been there: the Downloads folder that looks like a digital jungle. I wanted to build something more than just a simple script; I wanted a robust, silent, and enterprise-grade utility that handles file organization professionally.

Enter SmartFoldering.

Screenshot

The Tech Stack

Framework: .NET Core
UI Framework: Avalonia UI (for that premium cross-platform feel)
Architecture: Strict MVVM using CommunityToolkit.Mvvm
Logging: Serilog (File Sinks)
Serialization: System.Text.Json (Async & culture-independent)

Solving Real-World Engineering Challenges

What makes a file organizer "Enterprise-grade"? It's how it handles edge cases.

  1. The "Large File" Problem (Race Conditions)

Detecting a file is easy with FileSystemWatcher. But what if the file is still being downloaded or copied?I implemented an intelligent Retry & Lock Handling mechanism. The engine waits for the file to be fully released by the OS before attempting to move it, preventing crashes and data loss.

  1. Atomic Saves for ReliabilityTo prevent JSON corruption during unexpected power losses, SmartFoldering uses Atomic Saves. User settings are written to a temporary file first, then swapped—ensuring your rules are always safe.

  2. Silent & Performant Background Ops
    Running seamlessly in the system tray, the app uses a Single Instance (Mutex) pattern to ensure background resources are never wasted by multiple instances.

Premium UI/UXI chose a distraction-free, premium dark-grayscale design. The goal was to make a tool that feels like a native part of a high-end workstation, not a flashy toy.

Key Features at a Glance

  • Real-Time Monitoring: Instant routing via FileSystemWatcher.
  • Smart Rule Engine: Filter by extensions (.pdf, .jpg) or keywords.
  • Tray-First Design: Minimizes to tray and supports Windows Startup via Registry.
  • Professional Logging: Full diagnostics logged in AppData.

Open Source & Contributions

I've decided to open-source this project. Whether you want to use it to clean up your workspace or dive into the MVVM architecture, feel free to check out the repo!

GitHub Repository: https://github.com/furkiak/SmartFoldering

I’m curious to hear your thoughts! How do you handle file organization in your daily workflow? Let's discuss in the comments!

Top comments (0)