How rico-knots/labelstock works
LabelStock is an Avalonia desktop app for scanning or searching stock labels, viewing quantities, and maintaining label records. The main workflow runs from the scan screen through label lookup to a detail screen, where stock can be adjusted and saved. Admin screens provide label management and invoke backup; restore, spreadsheet export, and backup-location selection are explicitly unfinished. Source excerpts show label persistence and UI calls, but do not establish the active backup implementation or all service wiring.
Main entry points: ScanViewModel.cs Scan and search · Navigator.cs Screen navigation · AdminViewModel.cs Admin tools · DependencyInjection.cs Core registration
Components 22
Desktop UI
- App startup
LabelStock.Desktop/App.axaml.cs - Screen navigation
LabelStock.Desktop/Services/Navigator.cs - Scan and search
LabelStock.Desktop/ViewModels/ScanViewModel.cs - Label rows
LabelStock.Desktop/ViewModels/LabelRowViewModel.cs - New label
LabelStock.Desktop/ViewModels/NewLabelViewModel.cs - Stock detail
LabelStock.Desktop/ViewModels/LabelDetailViewModel.cs - Admin login
LabelStock.Desktop/ViewModels/AdminLoginViewModel.cs - Admin tools
LabelStock.Desktop/ViewModels/AdminViewModel.cs - Main window state
LabelStock.Desktop/ViewModels/MainWindowViewModel.cs
Core services
- Label service API
LabelStock.Core/Abstractions/ILabelService.cs - Label operations
LabelStock.Core/Services/LabelService.cs - Stock service API
LabelStock.Core/Abstractions/IStockService.cs - Stock operations
LabelStock.Core/Services/StockService.cs - Auth service API
LabelStock.Core/Abstractions/IAuthService.cs - Authentication
LabelStock.Core/Services/AuthService.cs - Backup service API
LabelStock.Core/Abstractions/IBackupService.cs - Backup service
LabelStock.Core/Services/BackupService.cs - Export service
LabelStock.Core/Services/ExportService.cs - Core registration
LabelStock.Core/DependencyInjection.cs - Label read model
LabelStock.Core/Models/LabelSummary.cs
Persistence
- SQLite context
LabelStock.Core/Data/LabelStockDbContext.cs
Other components
- Operator
Connections 30
- Operator → Scan and search: scans or searches
LabelStock.Desktop/ViewModels/ScanViewModel.cs - App startup → Screen navigation: creates
LabelStock.Desktop/App.axaml.cs - App startup → Main window state: creates
LabelStock.Desktop/App.axaml.cs - App startup → SQLite context: runs migrations
LabelStock.Desktop/App.axaml.cs - App startup → Core registration: registers services
LabelStock.Desktop/App.axaml.cs - Screen navigation → Scan and search: resolves screen
LabelStock.Desktop/Services/Navigator.cs - Scan and search → Label service API: searches and loads recent
LabelStock.Desktop/ViewModels/ScanViewModel.cs - Scan and search → Screen navigation: opens screens
LabelStock.Desktop/ViewModels/ScanViewModel.cs - Scan and search → Label rows: builds rows
LabelStock.Desktop/ViewModels/ScanViewModel.cs - Scan and search → New label: opens unknown barcode
LabelStock.Desktop/ViewModels/ScanViewModel.cs - Scan and search → Stock detail: opens match
LabelStock.Desktop/ViewModels/ScanViewModel.cs - New label → Label service API: creates label
LabelStock.Desktop/ViewModels/NewLabelViewModel.cs - New label → Screen navigation: returns to screen
LabelStock.Desktop/ViewModels/NewLabelViewModel.cs - Stock detail → Stock service API: saves quantity
LabelStock.Desktop/ViewModels/LabelDetailViewModel.cs - Stock detail → Screen navigation: returns to scan
LabelStock.Desktop/ViewModels/LabelDetailViewModel.cs - Admin login → Auth service API: authenticates
LabelStock.Desktop/ViewModels/AdminLoginViewModel.cs - Admin login → Screen navigation: switches screens
LabelStock.Desktop/ViewModels/AdminLoginViewModel.cs - Admin tools → Label service API: lists and deletes
LabelStock.Desktop/ViewModels/AdminViewModel.cs - Admin tools → Backup service API: requests backup
LabelStock.Desktop/ViewModels/AdminViewModel.cs - Admin tools → Label rows: builds rows
LabelStock.Desktop/ViewModels/AdminViewModel.cs - Admin tools → Screen navigation: opens screens
LabelStock.Desktop/ViewModels/AdminViewModel.cs - Admin tools → Export service: export not implemented
LabelStock.Desktop/ViewModels/AdminViewModel.cs - Label operations → SQLite context: queries and writes
LabelStock.Core/Services/LabelService.cs - Label operations → Label read model: projects results
LabelStock.Core/Services/LabelService.cs - Stock operations → SQLite context: uses context
LabelStock.Core/Services/StockService.cs - Authentication → Auth service API: implements
LabelStock.Core/Services/AuthService.cs - Core registration → Label operations: registers
LabelStock.Core/DependencyInjection.cs - Core registration → Stock operations: registers
LabelStock.Core/DependencyInjection.cs - Core registration → Authentication: registers
LabelStock.Core/DependencyInjection.cs - Core registration → SQLite context: configures factory
LabelStock.Core/DependencyInjection.cs