This directory documents ReFiles' architectural contracts, invariants, ownership, data flow, concurrency, extension points, testing, and performance. It focuses on durable rules rather than individual classes and implementations.
Read these documents before making architectural changes:
architecture/overview.md— high-level architecture and project responsibilities.architecture/principles.md— rules that changes are expected to preserve.architecture/layering.md— dependency direction and where code belongs.architecture/ownership-and-lifetime.md— ownership, cancellation, and disposal.architecture/browsing.md— end-to-end browse pipeline.architecture/presentation.md— the Core/WinUI boundary.
ReFiles
├─ Files WinUI application and presentation
├─ Files.BackgroundServer Out-of-process operation host
├─ Files.Controls Reusable WinUI controls
├─ Files.Core UI-independent application, browsing, storage, and model logic
├─ Files.SourceGenerators
└─ FilesLauncher C# Native AOT launcher/integration component
The most important dependency rule is:
Core logic must not depend on presentation.
Files.Core must remain independent from XAML, WinUI controls, ViewModels, visual state, and UI formatting.
architecture/browsing.mdsubsystems/storage.mdsubsystems/capabilities.mddevelopment/performance.md
subsystems/storage-providers.mdsubsystems/archives.mdarchitecture/storage-transfers.mddevelopment/adding-a-storage-provider.mdarchitecture/layering.md
subsystems/windows-shell.mdexplorer/README.mdexplorer/property-sheets/README.mdexplorer/drive-property-sheets/README.mdarchitecture/ownership-and-lifetime.md
testing/strategy.mdtesting/unit-tests.mdtesting/integration-tests.mdtesting/ui-tests.mdtesting/performance-tests.md
When a pull request changes an architectural contract, revise the relevant document in the same pull request. In particular, documentation should be reviewed when changing:
- layer ownership or dependency direction;
- lifetime/disposal semantics;
- concurrency or COM apartment behavior;
- navigation generations or cancellation;
- provider/capability contracts;
- browse publication or enrichment flow;
- operation execution boundaries;
- performance expectations;
- extension points.
A subsystem document should answer why the subsystem exists, what it owns, what it does not own, what must remain true, and how it is tested. Avoid documentation that only restates methods or current private implementation details.