Layer diagram
Layer responsibilities
| Layer | Projects | Role |
|---|---|---|
| Presentation | Arius.Cli, Arius.Explorer | Parse user input, display progress, dispatch commands via IMediator |
| Business logic | Arius.Core | Validate commands, orchestrate pipelines, enforce domain rules |
| Infrastructure | Azure Blob Storage, SQLite, Local FS | Persist and retrieve data |
IMediator.Send(), keeping the CLI and WPF projects thin and testable.
Architecture principles
1. Vertical Slice Architecture
Each feature lives in its own folder insideArius.Core/Features/. The command definition, handler, and validator are co-located, so adding or changing a feature does not require touching unrelated code.
2. CQRS
Operations are split into commands (writes) and queries (reads):- Commands —
Archive,Restore: mutate state and produce side effects. - Queries —
ContainerNames,PointerFileEntries: return data without side effects.
3. Mediator pattern
Arius.Cli and Arius.Explorer dispatch work by calling IMediator.Send(). Neither project holds a direct reference to any handler. This decoupling means handlers can be tested in isolation and the same handler is reachable from both frontends without duplication.
4. Domain-Driven Design
Core domain concepts are modelled as first-class types:- Value objects:
Hash(immutable SHA256 wrapper),FilePair(pointer + binary file pair). - Entities: tracked with identity through the state repository.
- Rich domain models: business rules live in the domain layer, not in handlers or controllers.
HandlerContext pattern
Every handler receives an immutableHandlerContext record that bundles all validated dependencies for the operation. A HandlerContextBuilder initialises and validates the context before the handler runs.
Technology stack
| Technology | Role |
|---|---|
| .NET 10 | Runtime and base class libraries |
| CliFx | Declarative CLI command parsing in Arius.Cli |
| Spectre.Console | Rich terminal output and progress rendering |
| Azure.Storage.Blobs | Azure Blob Storage client |
| SQLite / EF Core | Local state repository and metadata persistence |
| Zio | Filesystem abstraction layer (FilePairFileSystem) |
| FluentValidation | Command and query validators |
| Mediator | In-process IMediator implementation (no external bus) |
| CommunityToolkit.Mvvm | MVVM helpers for Arius.Explorer |
| Serilog | Structured logging |
| xUnit / NSubstitute / Shouldly | Testing |
Explore further
Archive pipeline
Multi-stage parallel pipeline: indexing, hashing, uploading large files, and TAR-batching small files.
Storage layer
How
AzureBlobStorage and EncryptedCompressedStorage compose to deliver encrypted, compressed blob storage.State repository
SQLite-backed metadata store: schema, change tracking, and the four core types.