# hunoia/luno architecture

> Architecture diagram of the GitHub repository hunoia/luno, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hunoia/luno
- Repository: https://github.com/hunoia/luno

## Overview

Luno is an Android gesture-and-overlay utility: users configure gestures, panels, actions, and automation rules, then invoke them through system gestures, the floating ball, or quick search. The runtime dispatches actions and automation against Android capabilities; settings and rules are persisted through the configuration layer. The graph preserves the major product branches visible in the tree. Several relationships are omitted because their implementing source was not sampled and the README provides no additional evidence.

Main entry points: [`core/data/src/main/java/hunoia/luno/config/ConfigProvider.kt`](https://github.com/hunoia/luno/blob/main/core/data/src/main/java/hunoia/luno/config/ConfigProvider.kt) (Configuration API), [`feature/execute/src/main/java/hunoia/luno/action/dispatcher/ActionDispatcher.kt`](https://github.com/hunoia/luno/blob/main/feature/execute/src/main/java/hunoia/luno/action/dispatcher/ActionDispatcher.kt) (Action dispatch), [`feature/quicklaunch/src/main/java/hunoia/luno/quicklaunch/QuickSearchActivity.kt`](https://github.com/hunoia/luno/blob/main/feature/quicklaunch/src/main/java/hunoia/luno/quicklaunch/QuickSearchActivity.kt) (Quick search), [`app/src/main/java/hunoia/luno/service/SideGestureService.kt`](https://github.com/hunoia/luno/blob/main/app/src/main/java/hunoia/luno/service/SideGestureService.kt) (Gesture service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["Application setup<br/>[App.kt]"]
  node_service["Gesture service"]
end

subgraph group_runtime["Gesture runtime"]
  node_coordinator["Gesture coordinator"]
  node_gestureui["Gesture overlays"]
  node_floatball["Floating ball"]
  node_runtimehost["Runtime host<br/>[RuntimeHost.kt]"]
  node_shizuku["Shizuku bridge<br/>[ShizukuManager.kt]"]
end

subgraph group_actions["Actions and search"]
  node_actionlibrary["Action library<br/>[ActionLibrary.kt]"]
  node_dispatch["Action dispatch"]
  node_controllers["System controllers<br/>[Controllers.kt]"]
  node_quicksearch["Quick search"]
  node_searchrows["Search result rows"]
  node_launch["App launching"]
  node_link["Link dispatch<br/>[LinkDispatcher.kt]"]
end

subgraph group_automation["Automation"]
  node_automationengine["Automation engine"]
  node_automationui["Automation editor"]
  node_conditions["Condition evaluation"]
end

subgraph group_config["Configuration"]
  node_configprovider["Configuration API<br/>[ConfigProvider.kt]"]
  node_stores[("Settings stores<br/>[SettingsStores.kt]")]
  node_storedaction["Stored action contract<br/>[StoredAction.kt]"]
  node_backup["Backup and restore"]
end

node_user(("Device user"))
node_accessibility["Accessibility service"]
node_android["Android system"]

node_user -->|"performs gestures"| node_service
node_accessibility -->|"hosts service"| node_service
node_service -->|"delegates actions"| node_coordinator
node_user -->|"opens search"| node_quicksearch
node_quicksearch -->|"dispatches action"| node_dispatch
node_quicksearch -.->|"renders results"| node_searchrows
node_floatball -->|"dispatches links"| node_link
node_floatball -->|"creates launch action"| node_storedaction
node_dispatch -.->|"executes actions"| node_controllers
node_dispatch -.->|"launches apps"| node_launch
node_actionlibrary -->|"uses action contract"| node_storedaction
node_automationui -.->|"edits rules"| node_configprovider
node_automationengine -.->|"evaluates conditions"| node_conditions
node_automationengine -.->|"records events"| node_configprovider
node_app -.->|"initializes configuration"| node_configprovider
node_configprovider -->|"reads and writes"| node_stores
node_backup -.->|"backs up settings"| node_stores
node_coordinator -.->|"uses runtime"| node_runtimehost
node_gestureui -->|"manages overlay windows"| node_android
node_shizuku -->|"requests system access"| node_android

click node_app "https://github.com/hunoia/luno/blob/main/app/src/main/java/hunoia/luno/App.kt"
click node_service "https://github.com/hunoia/luno/blob/main/app/src/main/java/hunoia/luno/service/SideGestureService.kt"
click node_coordinator "https://github.com/hunoia/luno/blob/main/app/src/main/java/hunoia/luno/runtime/GestureCoordinator.kt"
click node_gestureui "https://github.com/hunoia/luno/blob/main/feature/gesture/src/main/java/hunoia/luno/runtime/overlay/ButtonWindowController.kt"
click node_floatball "https://github.com/hunoia/luno/blob/main/feature/floatball/src/main/java/hunoia/luno/runtime/floatball/FloatBallService.kt"
click node_runtimehost "https://github.com/hunoia/luno/blob/main/core/runtime/src/main/java/hunoia/luno/runtime/RuntimeHost.kt"
click node_actionlibrary "https://github.com/hunoia/luno/blob/main/feature/actions/src/main/java/hunoia/luno/domain/action/ActionLibrary.kt"
click node_dispatch "https://github.com/hunoia/luno/blob/main/feature/execute/src/main/java/hunoia/luno/action/dispatcher/ActionDispatcher.kt"
click node_controllers "https://github.com/hunoia/luno/blob/main/feature/actions/src/main/java/hunoia/luno/action/controller/Controllers.kt"
click node_quicksearch "https://github.com/hunoia/luno/blob/main/feature/quicklaunch/src/main/java/hunoia/luno/quicklaunch/QuickSearchActivity.kt"
click node_searchrows "https://github.com/hunoia/luno/blob/main/feature/search/src/main/java/hunoia/luno/quicklaunch/query/SearchEngineResultRows.kt"
click node_launch "https://github.com/hunoia/luno/blob/main/capability/launch/src/main/java/hunoia/luno/quicklaunch/launch/AppLaunchCoordinator.kt"
click node_link "https://github.com/hunoia/luno/blob/main/feature/link/src/main/java/hunoia/luno/link/LinkDispatcher.kt"
click node_automationengine "https://github.com/hunoia/luno/blob/main/feature/automation/src/main/java/hunoia/luno/runtime/automation/AutomationEngine.kt"
click node_automationui "https://github.com/hunoia/luno/blob/main/app/src/main/java/hunoia/luno/ui/automation/AutomationEditScreen.kt"
click node_conditions "https://github.com/hunoia/luno/blob/main/feature/conditions/src/main/java/hunoia/luno/runtime/condition/ConditionEvaluator.kt"
click node_configprovider "https://github.com/hunoia/luno/blob/main/core/data/src/main/java/hunoia/luno/config/ConfigProvider.kt"
click node_stores "https://github.com/hunoia/luno/blob/main/core/data/src/main/java/hunoia/luno/config/store/SettingsStores.kt"
click node_storedaction "https://github.com/hunoia/luno/blob/main/core/domain/src/main/kotlin/hunoia/luno/core/domain/StoredAction.kt"
click node_backup "https://github.com/hunoia/luno/blob/main/core/data/src/main/java/hunoia/luno/config/backup/ConfigBackupRepository.kt"
click node_shizuku "https://github.com/hunoia/luno/blob/main/core/bridge/src/main/java/hunoia/luno/shizuku/ShizukuManager.kt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_service,node_user toneBlue
class node_coordinator,node_gestureui,node_floatball,node_runtimehost,node_shizuku toneAmber
class node_actionlibrary,node_dispatch,node_controllers,node_quicksearch,node_searchrows,node_launch,node_link toneMint
class node_automationengine,node_automationui,node_conditions toneRose
class node_configprovider,node_stores,node_storedaction,node_backup,node_accessibility,node_android toneIndigo
```

## Components

### App entry

- [Application setup](https://github.com/hunoia/luno/blob/main/app/src/main/java/hunoia/luno/App.kt): `app/src/main/java/hunoia/luno/App.kt`
- [Gesture service](https://github.com/hunoia/luno/blob/main/app/src/main/java/hunoia/luno/service/SideGestureService.kt): `app/src/main/java/hunoia/luno/service/SideGestureService.kt`

### Gesture runtime

- [Gesture coordinator](https://github.com/hunoia/luno/blob/main/app/src/main/java/hunoia/luno/runtime/GestureCoordinator.kt): `app/src/main/java/hunoia/luno/runtime/GestureCoordinator.kt`
- [Gesture overlays](https://github.com/hunoia/luno/blob/main/feature/gesture/src/main/java/hunoia/luno/runtime/overlay/ButtonWindowController.kt): `feature/gesture/src/main/java/hunoia/luno/runtime/overlay/ButtonWindowController.kt`
- [Floating ball](https://github.com/hunoia/luno/blob/main/feature/floatball/src/main/java/hunoia/luno/runtime/floatball/FloatBallService.kt): `feature/floatball/src/main/java/hunoia/luno/runtime/floatball/FloatBallService.kt`
- [Runtime host](https://github.com/hunoia/luno/blob/main/core/runtime/src/main/java/hunoia/luno/runtime/RuntimeHost.kt): `core/runtime/src/main/java/hunoia/luno/runtime/RuntimeHost.kt`
- [Shizuku bridge](https://github.com/hunoia/luno/blob/main/core/bridge/src/main/java/hunoia/luno/shizuku/ShizukuManager.kt): `core/bridge/src/main/java/hunoia/luno/shizuku/ShizukuManager.kt`

### Actions and search

- [Action library](https://github.com/hunoia/luno/blob/main/feature/actions/src/main/java/hunoia/luno/domain/action/ActionLibrary.kt): `feature/actions/src/main/java/hunoia/luno/domain/action/ActionLibrary.kt`
- [Action dispatch](https://github.com/hunoia/luno/blob/main/feature/execute/src/main/java/hunoia/luno/action/dispatcher/ActionDispatcher.kt): `feature/execute/src/main/java/hunoia/luno/action/dispatcher/ActionDispatcher.kt`
- [System controllers](https://github.com/hunoia/luno/blob/main/feature/actions/src/main/java/hunoia/luno/action/controller/Controllers.kt): `feature/actions/src/main/java/hunoia/luno/action/controller/Controllers.kt`
- [Quick search](https://github.com/hunoia/luno/blob/main/feature/quicklaunch/src/main/java/hunoia/luno/quicklaunch/QuickSearchActivity.kt): `feature/quicklaunch/src/main/java/hunoia/luno/quicklaunch/QuickSearchActivity.kt`
- [Search result rows](https://github.com/hunoia/luno/blob/main/feature/search/src/main/java/hunoia/luno/quicklaunch/query/SearchEngineResultRows.kt): `feature/search/src/main/java/hunoia/luno/quicklaunch/query/SearchEngineResultRows.kt`
- [App launching](https://github.com/hunoia/luno/blob/main/capability/launch/src/main/java/hunoia/luno/quicklaunch/launch/AppLaunchCoordinator.kt): `capability/launch/src/main/java/hunoia/luno/quicklaunch/launch/AppLaunchCoordinator.kt`
- [Link dispatch](https://github.com/hunoia/luno/blob/main/feature/link/src/main/java/hunoia/luno/link/LinkDispatcher.kt): `feature/link/src/main/java/hunoia/luno/link/LinkDispatcher.kt`

### Automation

- [Automation engine](https://github.com/hunoia/luno/blob/main/feature/automation/src/main/java/hunoia/luno/runtime/automation/AutomationEngine.kt): `feature/automation/src/main/java/hunoia/luno/runtime/automation/AutomationEngine.kt`
- [Automation editor](https://github.com/hunoia/luno/blob/main/app/src/main/java/hunoia/luno/ui/automation/AutomationEditScreen.kt): `app/src/main/java/hunoia/luno/ui/automation/AutomationEditScreen.kt`
- [Condition evaluation](https://github.com/hunoia/luno/blob/main/feature/conditions/src/main/java/hunoia/luno/runtime/condition/ConditionEvaluator.kt): `feature/conditions/src/main/java/hunoia/luno/runtime/condition/ConditionEvaluator.kt`

### Configuration

- [Configuration API](https://github.com/hunoia/luno/blob/main/core/data/src/main/java/hunoia/luno/config/ConfigProvider.kt): `core/data/src/main/java/hunoia/luno/config/ConfigProvider.kt`
- [Settings stores](https://github.com/hunoia/luno/blob/main/core/data/src/main/java/hunoia/luno/config/store/SettingsStores.kt): `core/data/src/main/java/hunoia/luno/config/store/SettingsStores.kt`
- [Stored action contract](https://github.com/hunoia/luno/blob/main/core/domain/src/main/kotlin/hunoia/luno/core/domain/StoredAction.kt): `core/domain/src/main/kotlin/hunoia/luno/core/domain/StoredAction.kt`
- [Backup and restore](https://github.com/hunoia/luno/blob/main/core/data/src/main/java/hunoia/luno/config/backup/ConfigBackupRepository.kt): `core/data/src/main/java/hunoia/luno/config/backup/ConfigBackupRepository.kt`

### Other components

- **Device user**
- **Accessibility service**
- **Android system**

## Connections

- Device user → Gesture service: performs gestures
- Accessibility service → Gesture service: hosts service (evidence: `app/src/main/java/hunoia/luno/service/SideGestureService.kt`)
- Gesture service → Gesture coordinator: delegates actions (evidence: `app/src/main/java/hunoia/luno/service/SideGestureService.kt`)
- Device user → Quick search: opens search
- Quick search → Action dispatch: dispatches action (evidence: `feature/quicklaunch/src/main/java/hunoia/luno/quicklaunch/QuickSearchActivity.kt`)
- Quick search → Search result rows: renders results
- Floating ball → Link dispatch: dispatches links (evidence: `feature/floatball/src/main/java/hunoia/luno/runtime/floatball/FloatBallService.kt`)
- Floating ball → Stored action contract: creates launch action (evidence: `feature/floatball/src/main/java/hunoia/luno/runtime/floatball/FloatBallService.kt`)
- Action dispatch → System controllers: executes actions
- Action dispatch → App launching: launches apps
- Action library → Stored action contract: uses action contract (evidence: `core/domain/src/main/kotlin/hunoia/luno/core/domain/StoredAction.kt`)
- Automation editor → Configuration API: edits rules
- Automation engine → Condition evaluation: evaluates conditions
- Automation engine → Configuration API: records events
- Application setup → Configuration API: initializes configuration
- Configuration API → Settings stores: reads and writes (evidence: `core/data/src/main/java/hunoia/luno/config/ConfigProvider.kt`)
- Backup and restore → Settings stores: backs up settings
- Gesture coordinator → Runtime host: uses runtime
- Gesture overlays → Android system: manages overlay windows (evidence: `feature/gesture/src/main/java/hunoia/luno/runtime/overlay/ButtonWindowController.kt`)
- Shizuku bridge → Android system: requests system access (evidence: `core/bridge/src/main/java/hunoia/luno/shizuku/ShizukuManager.kt`)
