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.
MVVM Pattern
qTeApp uses CommunityToolkit.Mvvm with source generators for minimal boilerplate:
| Feature | Toolkit Attribute | Generated Code |
| Observable Properties | [ObservableProperty] | Public property with PropertyChanged notification |
| Commands | [RelayCommand] | ICommand implementation from method |
| Property Dependencies | [NotifyPropertyChangedFor] | Raises change for dependent properties |
| Base Class | ObservableObject | INotifyPropertyChanged 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
| ViewModel | Page | Responsibility |
HomeViewModel | Home | Dashboard stats — file counts, storage usage |
EncodeViewModel | Encode | Encode files/text → Symph. File picker, metadata entry, progress tracking |
DecodeViewModel | Decode | Decode Symph → original data. List offsets, preview, save/export |
BatchEncodeViewModel | Batch Encode | Parallel encoding of multiple files with SemaphoreSlim concurrency |
PublishViewModel | Publish | Publish, Syndicate, PublishAndSyndicate, attach memes |
SyndicationViewModel | Syndication | Feed display, dynamic filters (Category/Author/Tag), dedup, import/decode |
NetworkViewModel | Network | Connect/disconnect AT Proto, sync, contact management |
ConversationsViewModel | Conversations | Local + remote conversations, contact filters, message display |
MessagesViewModel | Messages | Direct message thread with a contact |
CollectionsViewModel | Collections | CRUD collections, search, detail view, GUID filtering |
ArchiveViewModel | Archive | Export/import archives with merge mode selection |
MemesViewModel | Memes | Meme list, process thumbnails, delete, dedup |
ProtectViewModel | Protect | Scan .qTe files, rename to .qTp for protection |
SecurityViewModel | Security | Security phrase, protected file scanning (.qTp) |
RecycleBinViewModel | Recycle Bin | Restore, delete, empty bin operations |
MonitorViewModel | Monitor | Global job tracking, timer refresh for encoding progress |
SettingsViewModel | Settings | Rebuild metadata, soft reset, full reset, folder selection |
Services
Services wrap qTe library singletons and provide MAUI-specific functionality:
| Service | Purpose |
AtProtoStorageService | Wraps AT Proto paths (UserBasePath, OffsetsPath, MetadataPath, etc.) |
QteService | High-level encoding/decoding operations |
BlockchainService | Blockchain sync and verification |
MemeStorageService | Local meme file operations |
CollectionsService | Collection CRUD against collections.json |
ContactsService | Contact management wrapper |
MetadataService | SymphMetadataStore wrapper |
DesktopModeService | Detects desktop vs. mobile for view switching |
CrashLogService | Error 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 & Shell
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.
| Aspect | qTeLite | qTeApp |
| UI Framework | WinForms | .NET MAUI |
| Language | VB.NET | C# |
| Pattern | Code-behind (UserControls) | MVVM (ViewModels) |
| Platform | Windows only | Windows, Android, iOS, macOS |
| Core Library | Same qTe shared library |
| Feature Parity | qTeApp must do everything qTeLite does |