How ykatchou/ylauncher works
Purpose and runtime
yLauncher is a native Android home-screen launcher: a minimalist, gesture-driven interface for launching installed apps, organizing favorites/folders/panels, showing notification summaries, and hosting widgets. It is Kotlin 2.1 on Android (min SDK 26, compile SDK 36), using Jetpack Compose/Material 3, MVVM with StateFlow, Hilt, Room, DataStore, and Navigation Compose.
Application bootstrap and composition
Android launches through the manifest and Compose activity; the application class initializes process-level dependencies. Hilt’s module defines the dependency boundary for repositories, persistence, and platform integrations.
• app/src/main/AndroidManifest.xml
• app/src/main/java/com/ykatchou/ylauncher/MainActivity.kt
• app/src/main/java/com/ykatchou/ylauncher/YLauncherApp.kt
• app/src/main/java/com/ykatchou/ylauncher/di/AppModule.kt
Home workspace and state orchestration
The home screen is the primary workspace: it renders a selected panel’s favorites, folders, clock, notification badges, widgets, gesture targets, and configurable HAL button. HomeViewModel coordinates initial loading and mutations across app inventory, persisted favorites/folders/panels, and preferences; UI editing surfaces feed those changes back through it.
• app/src/main/java/com/ykatchou/ylauncher/ui/home/HomeScreen.kt
• app/src/main/java/com/ykatchou/ylauncher/ui/home/HomeViewModel.kt
• app/src/main/java/com/ykatchou/ylauncher/ui/home/EditFavoritesSheet.kt
• app/src/main/java/com/ykatchou/ylauncher/ui/home/EditPanelsDialog.kt
Installed-app discovery and drawer flow
AppRepository is the boundary to Android’s installed-app/package data and produces app information consumed by both home and drawer. The drawer ViewModel maintains searchable app-list state; the screen supports live filtering, single-match auto-launch, alphabet navigation, and !-prefixed DuckDuckGo bang search behavior. Launching crosses into Android intents via the launcher utility.
• app/src/main/java/com/ykatchou/ylauncher/data/repository/AppRepository.kt
• app/src/main/java/com/ykatchou/ylauncher/ui/drawer/AppDrawerViewModel.kt
• app/src/main/java/com/ykatchou/ylauncher/ui/drawer/AppDrawerScreen.kt
• app/src/main/java/com/ykatchou/ylauncher/util/AppLauncher.kt
Persistence and preference boundary
Room persists launcher-owned layout entities—favorites, folders, and panels—behind DAOs and a central database. DataStore-backed preferences hold user configuration such as gestures, visual settings, hidden apps, and action selection. Models form the shared data vocabulary between repository/ViewModel/UI layers.
• app/src/main/java/com/ykatchou/ylauncher/data/db/YLauncherDatabase.kt
• app/src/main/java/com/ykatchou/ylauncher/data/db/FavoriteDao.kt
• app/src/main/java/com/ykatchou/ylauncher/data/db/FolderDao.kt
• app/src/main/java/com/ykatchou/ylauncher/data/repository/PrefsRepository.kt
Android system integrations
Platform APIs provide notification access, usage statistics, flashlight control, app-widget hosting, app launching, and screen-lock-related actions. NotificationService is the privileged notification ingestion boundary; its output maps to app notification models for home display. Widget host code embeds Android widgets in Compose-facing UI.
• app/src/main/java/com/ykatchou/ylauncher/service/NotificationService.kt
• app/src/main/java/com/ykatchou/ylauncher/data/model/AppNotification.kt
• app/src/main/java/com/ykatchou/ylauncher/widget/LauncherWidgetHost.kt
• app/src/main/java/com/ykatchou/ylauncher/ui/components/AppWidgetContainer.kt
Configurable actions, settings, and monetization
The HAL button and home gestures resolve configured actions through a dedicated action model/executor, isolating UI events from platform side effects. Settings is the user-facing configuration surface. Billing supports optional purchase flows through Google Play Billing; review and Play Store helpers integrate with Play services/store intents.
• app/src/main/java/com/ykatchou/ylauncher/ui/hal/HalAction.kt
• app/src/main/java/com/ykatchou/ylauncher/ui/hal/HalActionExecutor.kt
• app/src/main/java/com/ykatchou/ylauncher/ui/settings/SettingsScreen.kt
• app/src/main/java/com/ykatchou/ylauncher/billing/BillingManager.kt>
Main entry points: HomeViewModel.kt Home view model · HomeScreen.kt Home screen · AppModule.kt Hilt module · AppDrawerViewModel.kt Drawer view model
Components 17
App bootstrap
- Android manifest
app/src/main/AndroidManifest.xml - YLauncher app · Initializes process-level dependencies.
app/src/main/java/com/ykatchou/ylauncher/YLauncherApp.kt - Main activity
app/src/main/java/com/ykatchou/ylauncher/MainActivity.kt - Hilt module
app/src/main/java/com/ykatchou/ylauncher/di/AppModule.kt
Launcher UI
- Home screen · Renders the selected panel, widgets, badges, and gesture targets.
app/src/main/java/com/ykatchou/ylauncher/ui/home/HomeScreen.kt - Home view model · Coordinates workspace loading and mutations.
app/src/main/java/com/ykatchou/ylauncher/ui/home/HomeViewModel.kt - App drawer
app/src/main/java/com/ykatchou/ylauncher/ui/drawer/AppDrawerScreen.kt - Drawer view model · Maintains searchable installed-app state.
app/src/main/java/com/ykatchou/ylauncher/ui/drawer/AppDrawerViewModel.kt - Settings
app/src/main/java/com/ykatchou/ylauncher/ui/settings/SettingsScreen.kt - HAL action executor · Resolves configured gestures and HAL actions into side effects.
app/src/main/java/com/ykatchou/ylauncher/ui/hal/HalActionExecutor.kt
Data and state
- App repository · Reads installed application information from Android.
app/src/main/java/com/ykatchou/ylauncher/data/repository/AppRepository.kt - Launcher database · Persists favorites, folders, and panels.
app/src/main/java/com/ykatchou/ylauncher/data/db/YLauncherDatabase.kt - Preferences repository · Stores configuration, hidden apps, and action selection.
app/src/main/java/com/ykatchou/ylauncher/data/repository/PrefsRepository.kt
Android integrations
- Notification service · Ingests Android notifications for home summaries.
app/src/main/java/com/ykatchou/ylauncher/service/NotificationService.kt - Widget host · Hosts Android widgets in Compose UI.
app/src/main/java/com/ykatchou/ylauncher/widget/LauncherWidgetHost.kt - App launcher · Launches selected apps through Android intents.
app/src/main/java/com/ykatchou/ylauncher/util/AppLauncher.kt - Billing manager · Runs optional purchase flows.
Connections 19
- Android manifest → YLauncher app: starts
- Android manifest → Main activity: launches
- YLauncher app → Hilt module: initializes
- Main activity → Home screen: hosts navigation
- Hilt module → Home view model: injects dependencies
- Hilt module → Drawer view model: injects dependencies
- Home screen → Home view model: observes and dispatches
- App drawer → Drawer view model: observes and dispatches
- Home view model → App repository: loads apps
- Home view model → Launcher database: reads and updates layout
- Home view model → Preferences repository: reads configuration
- Home view model → Notification service: shows summaries
- Home screen → Widget host: embeds widgets
- Home screen → HAL action executor: triggers gestures and HAL
- Drawer view model → App repository: queries apps
- App drawer → App launcher: launches selection
- HAL action executor → App launcher: launch-app action
- Settings → Preferences repository: updates configuration
- Settings → Billing manager: starts purchase flow