Skip to content
reactiveuiPublic

About

A cross-platform sample application built with ReactiveUI. Camelotia is a file manager for cloud storage providers and local file systems, demonstrating reactive MVVM architecture, testable view models and shared code across desktop UI frameworks.

Topics

Resources

Code of conduct

Security policy

Stars

616 stars

Watchers

16 watching

Forks

Latest commit

 

History

324 Commits

Folders and files

Repository files navigation

Camelotia

Camelotia: A cloud storage file manager built with ReactiveUI

Build Coverage License Discussions

Camelotia is a file manager for cloud storage, built with ReactiveUI and modern .NET UI frameworks. It browses, uploads, downloads, renames and deletes files in Yandex Disk, Google Drive, VK Documents, GitHub, FTP, SFTP and the local file system.

The same view models drive an Avalonia app for Windows, Linux and macOS, and a WPF app for Windows. Both target .NET 10 and .NET 11.

Avalonia WPF

Build and run

Install the .NET 11 SDK. Run these commands from the src folder.

# Build the Avalonia app, the shared libraries and the tests.
dotnet build Camelotia.Avalonia.slnf

# Run the Avalonia app.
dotnet run --project Camelotia.Presentation.Avalonia --framework net11.0

# Run the tests. Add the flags after "--" to collect Cobertura coverage.
dotnet test --project Camelotia.Tests -- --coverage --coverage-output-format cobertura

The WPF app builds on Windows with dotnet build Camelotia.Wpf.slnf. Its views use plain XAML and reactive bindings, so you can copy a view and its view model into your own WPF app.

Signing in to each provider

Provider How you sign in What to set up
Local No sign-in. Nothing.
FTP and SFTP Address, port, user name and password. Nothing. The SFTP client accepts any host key.
GitHub Your user name, with a personal access token as the password. Give the token read and write access to the repositories you want to browse.
Google Drive In the browser. Set Cloud:GoogleDrive:GoogleDriveClientSecret (and GoogleDriveClientId for your own app) in configuration.
Yandex Disk In the browser, with PKCE. Register http://127.0.0.1:3000/ as the redirect URI of your Yandex OAuth app, then set Cloud:YandexDisk:CodeAuthClientId and Cloud:YandexDisk:CodeAuthClientSecret in configuration.
VK Documents In the browser, through VK ID with PKCE. Register http://127.0.0.1:3001/ as a trusted redirect URL of the VK ID app in VkDocsCloudOptions. VK must also give that app access to the documents API.

The browser providers open your default browser, then wait on the loopback address for the redirect. The app's settings live in CloudConfiguration, which the app saves with the rest of its state.

Configuration

The repository holds no client secrets. At start-up the app binds the Cloud section of .NET configuration over CloudConfiguration, so you can set any provider option. It reads these sources, and later ones override earlier ones:

  1. appsettings.json beside the app.

  2. User secrets. Both desktop apps share the store of Camelotia.Presentation:

    dotnet user-secrets set "Cloud:GoogleDrive:GoogleDriveClientSecret" "<secret>" --project src/Camelotia.Presentation
  3. Environment variables that start with CAMELOTIA_, with __ between sections, for example CAMELOTIA_Cloud__YandexDisk__CodeAuthClientSecret.

  4. Command-line arguments, for example --Cloud:VkDocs:ApplicationId=5560698.

A value you don't set keeps the saved or default value.

How it is built

  • Camelotia.Services holds one ICloud provider for each service. The Yandex Disk and VK clients are Refit interfaces with source-generated code and source-generated JSON, registered through AddCloudServices().
  • Camelotia.Presentation holds the view models. They are written with ReactiveUI.SourceGenerators, ReactiveUI.Validation and DynamicData.
  • ReactiveUI's typed suspension saves the app state to Akavache with System.Text.Json.
  • The tests use TUnit on Microsoft.Testing.Platform. They run the real Refit, Octokit and Google clients against stubbed HTTP handlers, so no test talks to a real service.

Technologies

Contribute

Camelotia is part of ReactiveUI and is released under the MIT license. We welcome contributions of every size, from bug reports and documentation to features and tests.

Coding standards

Every pull request must meet these standards. The build checks most of them.

  • Follow the ReactiveUI C# style guide.
  • The repository's .editorconfig and the StyleSharp, PerformanceSharp and SecuritySharp analyzers run on every build. Fix each finding in the code. Do not suppress it or relax the .editorconfig.
  • Add tests for every bug fix and new feature.
  • Document public APIs with XML documentation comments.
  • Write commit messages in the Conventional Commits format.
  • Follow the Code of Conduct.

Support the project

Sponsors

JetBrains gives ReactiveUI's maintainers licences for its tools through its open source support programme. Anthropic supports them with Claude through Claude for Open Source. OpenAI supports them with Codex through Codex for Open Source. Snyk gives the maintainers access to security tools through its Secure Developer Program.

JetBrains Claude by Anthropic OpenAI Sponsored by Snyk

See our sponsors for more information. JetBrains, Claude, Anthropic, OpenAI and Codex names and logos are trademarks of their respective owners. Snyk and the Snyk logo are trademarks of Snyk Ltd.

About

A cross-platform sample application built with ReactiveUI. Camelotia is a file manager for cloud storage providers and local file systems, demonstrating reactive MVVM architecture, testable view models and shared code across desktop UI frameworks.

Topics

Resources

Code of conduct

Security policy

Stars

616 stars

Watchers

16 watching

Forks

Sponsor this project

Used by

Contributors

Languages