$ show DevToys-app/DevToys
DevToys is a cross-platform desktop application that bundles over 30 developer utilities (JSON formatter, Base64 encoder/decoder, hash generator, regex tester, etc.) into a single interface. The application uses an embedded Blazor WebView for its UI, enabling a modern web-like component model with rich editors (Monaco Editor), responsive layouts, and platform-specific theming. It follows an MVVM architecture with MEF (Managed Extensibility Framework) for dependency injection and plugin discovery, allowing third-party extensions to add new tools. The project also includes a CLI variant and an SDK (DevToys.Api) for extension development. Architecturally, the codebase is organized into platform-specific host projects (Windows WPF, macOS AppKit, Linux GTK) that all share a common Blazor UI layer (DevToys.Blazor) and business logic (DevToys.Business, DevToys.Core). Key entry points are the native window classes (e.g., MainWindow.xaml on Windows) which initialize the Blazor WebView and MEF composition. Data flows begin with clipboard or file input, which passes through smart detection services to suggest relevant tools, then renders the tool's UI via a fluent builder API. The settings system uses typed definitions and platform-agnostic storage. External dependencies include .NET 8, Blazor, SixLabors.ImageSharp, Monaco Editor (downloaded and vendored), and several community libraries (FuzzySharp, OneOf, System.CommandLine). The codebase demonstrates strong engineering practices: extensive localization (40+ languages), accessibility features, theme support (dark/light/compact), and a comprehensive Blazor component library. While the MEF-based plugin system is functional, it relies on the legacy System.ComponentModel.Composition package, and the platform-specific implementations (e.g., file storage, clipboard) are duplicated across Windows, macOS, and Linux, posing a moderate maintenance burden.
The LLM identified 4 files worth highlighting for reuse:
An observable collection implementation that extends HashSet<T> with INotifyCollectionChanged and INotifyPropertyChanged support. It is self-contained, has no internal dependencies beyond .NET base classes, and can be extracted into any project needing a hash set that tracks additions, removals, and clearing with UI-binding notifications. Demonstrates non-obvious skill in correctly wiring collection change events while preserving HashSet semantics.
A fluent CSS class builder that conditionally concatenates CSS class names based on boolean flags. It is a self-contained utility with no external dependencies, suitable for any Blazor or .NET UI project that needs clean conditional CSS composition. The pattern (AddClass when condition, then Build) is simple but well-executed and reusable.
Core MEF composition manager that initializes a CompositionContainer from a RecursiveDirectoryCatalog, aggregates catalogs, and provides a method to satisfy imports. It handles error logging and assembly filtering (skipping .resources.dll). The pattern of composing from a folder with subdirectory scanning is reusable for any plugin system built on MEF. It is decoupled from the rest of DevToys beyond the RecursiveDirectoryCatalog.
A Blazor popover component with dynamic positioning, flip logic, resize observers, and z-index management. It includes TypeScript interop for DOM measurement and event handling. The component is self-contained within the Blazor project and can be extracted into any Blazor application needing a robust popover. It demonstrates sophisticated handling of edge cases like overflow flipping and scroll containers.