The AiteProfiles application follows a layered architecture with clear separation of concerns:
src/
├── Api/ # HTTP API layer
├── Application/ # Business logic and application services
├── Core/ # Shared utilities and infrastructure
├── Domain/ # Core business entities and logic
├── Runtime/ # System-level services (tray, hotkeys)
├── Services/ # Application services
├── ViewModels/ # MVVM view models
├── Views/ # UI components
└── Models/ # Data transfer objects
- Built with WinUI 3 and MVVM pattern
- MainWindow.xaml provides the main user interface
- ProfileListItemViewModel represents individual profiles in the UI
- TerminalViewModel handles the quick link functionality
- Contains business logic and workflows
- Workers for asynchronous operations
- Refresh controller for profile scanning
- Core entities: Profile, ProfileScanRow
- Chrome service for browser interactions
- Profile scanning and management logic
- Contracts for service interfaces
- Configuration management
- File I/O operations
- System integration (tray icon, hotkeys)
- Window management and activation
- Local HTTP server implementation
- RESTful endpoints for external integration
- Token-based authentication
The main application window that hosts the UI and manages:
- System tray integration
- Global hotkey handling (
Ctrl+Shift+4) - Window positioning and animation
- Application lifecycle management
Central data store for profile information:
- Caches profile data for performance
- Manages favorite profiles
- Handles profile search and lookup
- Persists user preferences
Manages all Chrome-related operations:
- Profile scanning in Chrome user data directory
- Launching Chrome with specific profiles
- Opening URLs in profiles
- Specialized actions (Gmail, Drive, etc.)
Provides RESTful API for external integration:
- Runs on localhost only (security measure)
- Token-based authentication
- Profile listing and launching endpoints
Manages system tray presence:
- Shows/hides application window
- Provides context menu options
- Maintains persistent presence
Handles global keyboard shortcuts:
- Registers
Ctrl+Shift+4for window toggle - Cross-platform hotkey abstraction
-
Startup Sequence:
- App initializes services and checks for single instance
- Chrome availability is verified
- HTTP API server starts with generated token
- MainWindow is displayed with system tray icon
-
Profile Management:
- ChromeService scans profile directories
- ProfilesStore caches and manages profile data
- UI displays profiles through ViewModels
- User actions trigger ChromeService methods
-
API Integration:
- LocalHttpServer validates tokens
- Requests are routed to ProfilesApiService
- Actions are executed through ChromeService
- Responses are formatted and returned
-
Runtime Services:
- TrayIconService provides system integration
- GlobalHotkeyService enables quick access
- SingleInstanceService prevents multiple instances
- src/