qTe Docs — App Architecture

App Architecture

qTeApp MAUI MVVM architecture — ViewModels, Services, Views, and navigation

Architecture Overview

qTeApp is the cross-platform .NET MAUI application targeting Windows, Android, iOS, and macOS. It follows the MVVM (Model-View-ViewModel) pattern using CommunityToolkit.Mvvm for property change notification, command binding, and source generators.

Key Principle: qTeApp is ONLY the UI/UX layer. ALL workflows and logic are in the qTe shared library. qTeApp must call the exact same qTe library methods that qTeLite calls.
qTeApp MVVM ARCHITECTURE Views XAML Pages Desktop/ Mobile/ EncodePage DecodePage PublishPage NetworkPage SettingsPage +12 ViewModels C# + MVVM Toolkit EncodeVM DecodeVM PublishVM NetworkVM SyndicationVM +12 ProtectVM SecurityVM ArchiveVM MemesVM CollectionsVM Services Wrappers AtProtoStorageService QteService BlockchainService MemeStorageService qTe Library VB.NET SymphEmbed QteNetworkManager RecycleBin ATProtocolClient Data Binding (x:DataType, {Binding}) ViewModels call Services → Services call qTe Library Platforms: Windows (WinUI3) | Android | iOS | macOS (Mac Catalyst)

MVVM Pattern

qTeApp uses CommunityToolkit.Mvvm with source generators for minimal boilerplate:

FeatureToolkit AttributeGenerated Code
Observable Properties[ObservableProperty]Public property with PropertyChanged notification
Commands[RelayCommand]ICommand implementation from method
Property Dependencies[NotifyPropertyChangedFor]Raises change for dependent properties
Base ClassObservableObjectINotifyPropertyChanged infrastructure
// Example ViewModel pattern
public partial class EncodeViewModel : ObservableObject
{
    [ObservableProperty]
    [NotifyPropertyChangedFor(nameof(CanEncode))]
    private string title = "";

    [RelayCommand]
    private async Task EncodeAsync()
    {
        // Calls qTe shared library methods
        var embed = new SymphEmbed(resourcesPath, ...);
        var result = await embed.EmbedMultiThreaded(false, false, 0);
    }
}

ViewModels

ViewModelPageResponsibility
HomeViewModelHomeDashboard stats — file counts, storage usage
EncodeViewModelEncodeEncode files/text → Symph. File picker, metadata entry, progress tracking
DecodeViewModelDecodeDecode Symph → original data. List offsets, preview, save/export
BatchEncodeViewModelBatch EncodeParallel encoding of multiple files with SemaphoreSlim concurrency
PublishViewModelPublishPublish, Syndicate, PublishAndSyndicate, attach memes
SyndicationViewModelSyndicationFeed display, dynamic filters (Category/Author/Tag), dedup, import/decode
NetworkViewModelNetworkConnect/disconnect AT Proto, sync, contact management
ConversationsViewModelConversationsLocal + remote conversations, contact filters, message display
MessagesViewModelMessagesDirect message thread with a contact
CollectionsViewModelCollectionsCRUD collections, search, detail view, GUID filtering
ArchiveViewModelArchiveExport/import archives with merge mode selection
MemesViewModelMemesMeme list, process thumbnails, delete, dedup
ProtectViewModelProtectScan .qTe files, rename to .qTp for protection
SecurityViewModelSecuritySecurity phrase, protected file scanning (.qTp)
RecycleBinViewModelRecycle BinRestore, delete, empty bin operations
MonitorViewModelMonitorGlobal job tracking, timer refresh for encoding progress
SettingsViewModelSettingsRebuild metadata, soft reset, full reset, folder selection

Services

Services wrap qTe library singletons and provide MAUI-specific functionality:

ServicePurpose
AtProtoStorageServiceWraps AT Proto paths (UserBasePath, OffsetsPath, MetadataPath, etc.)
QteServiceHigh-level encoding/decoding operations
BlockchainServiceBlockchain sync and verification
MemeStorageServiceLocal meme file operations
CollectionsServiceCollection CRUD against collections.json
ContactsServiceContact management wrapper
MetadataServiceSymphMetadataStore wrapper
DesktopModeServiceDetects desktop vs. mobile for view switching
CrashLogServiceError logging and crash reports

Views (Desktop & Mobile)

qTeApp provides dual XAML layouts: Desktop views with two-column master-detail layouts, and Mobile views with stacked single-column layouts. The DesktopModeService detects the platform and routes to the appropriate view.

Desktop Views

Views/Desktop/Desktop*.xaml

  • Two-column layouts
  • Side-by-side list + detail panels
  • Wider filter bars with Pickers
  • Optimized for mouse/keyboard

Mobile Views

Views/*.xaml

  • Single-column stacked layout
  • Bottom detail panels
  • Touch-friendly controls
  • Optimized for small screens

Navigation uses .NET MAUI Shell with route-based navigation. The AppShell.xaml defines tab structure and flyout menu items. Pages are registered as routes for both URI-based navigation and tab-based switching.

qTeLite Comparison

qTeLite is the WinForms desktop reference implementation. Every feature in qTeApp must match qTeLite's functionality by calling the same qTe library methods.

AspectqTeLiteqTeApp
UI FrameworkWinForms.NET MAUI
LanguageVB.NETC#
PatternCode-behind (UserControls)MVVM (ViewModels)
PlatformWindows onlyWindows, Android, iOS, macOS
Core LibrarySame qTe shared library
Feature ParityqTeApp must do everything qTeLite does