# omeryol/akisgesture architecture

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

- Interactive diagram: https://gitdiagram.com/omeryol/akisgesture
- Repository: https://github.com/omeryol/akisgesture

## Overview

Akış Gesture is an Android accessibility app for customizable left-, right-, and bottom-edge gestures. Users configure gesture rules and actions in the app; the accessibility service runs the gesture engine, which detects input, resolves configured rules, presents feedback or selection menus, and dispatches the chosen action. The repository also includes service health/recovery, automation entry points, settings backup, and privileged command support. Edges are limited to relationships visible in excerpts or the README; several unsampled subsystem links are therefore omitted.

Main entry points: [`app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureEngine.kt`](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureEngine.kt) (Gesture engine), [`app/src/main/java/io/github/omeryol/akisgesture/service/GestureAccessibilityService.kt`](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/service/GestureAccessibilityService.kt) (Accessibility service), [`app/src/main/java/io/github/omeryol/akisgesture/rule/CompiledRuleSet.kt`](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/rule/CompiledRuleSet.kt) (Compiled rules), [`app/src/main/java/io/github/omeryol/akisgesture/root/RootCommandExecutor.kt`](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/root/RootCommandExecutor.kt) (Root commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Configuration"]
  node_gesture_config["Gesture settings<br/>[GestureConfig.kt]"]
  node_rule_graph["Rule graph"]
  node_compiled_rules["Compiled rules<br/>[CompiledRuleSet.kt]"]
  node_rule_profiles["Profile resolution"]
  node_rule_serialization["Rule serialization<br/>[RuleSerializer.kt]"]
  node_backup["Settings backup"]
end

subgraph group_runtime["Gesture runtime"]
  node_accessibility_service["Accessibility service"]
  node_gesture_engine["Gesture engine<br/>[GestureEngine.kt]"]
  node_edge_detector["Edge detector"]
  node_overlays["Overlay manager<br/>[OverlayManager.kt]"]
  node_feedback["Gesture feedback<br/>[FeedbackView.kt]"]
end

subgraph group_actions["Action execution"]
  node_action_dispatcher["Action dispatcher"]
  node_action_handlers["Action handlers"]
  node_root_executor["Root commands"]
  node_shizuku["Shizuku access<br/>[ShizukuManager.kt]"]
end

subgraph group_operations["Service operations"]
  node_keepalive["Keep-alive recovery"]
  node_automation["Automation commands"]
end

subgraph group_experience["App experience"]
  node_main_activity["Main activity<br/>[MainActivity.kt]"]
  node_viewmodels["Screen viewmodels"]
  node_rule_ui["Rule screens"]
end

node_user(("Phone user"))
node_external_automation(("Automation apps"))
node_os(("Android system"))

node_user -->|"configures"| node_main_activity
node_main_activity -->|"routes to"| node_rule_ui
node_main_activity -->|"uses"| node_viewmodels
node_viewmodels -.->|"updates"| node_gesture_config
node_viewmodels -.->|"edits"| node_rule_graph
node_gesture_config -.->|"configures"| node_compiled_rules
node_rule_graph -.->|"compiles"| node_compiled_rules
node_compiled_rules -.->|"resolves"| node_rule_profiles
node_backup -->|"uses"| node_rule_serialization
node_user -.->|"enables"| node_accessibility_service
node_accessibility_service -->|"starts"| node_gesture_engine
node_gesture_engine -->|"creates"| node_edge_detector
node_gesture_engine -->|"reads"| node_compiled_rules
node_gesture_engine -->|"manages"| node_overlays
node_gesture_engine -->|"renders"| node_feedback
node_gesture_engine -->|"dispatches"| node_action_dispatcher
node_action_dispatcher -.->|"routes actions"| node_action_handlers
node_action_handlers -->|"requests commands"| node_root_executor
node_root_executor -->|"falls back"| node_shizuku
node_root_executor -.->|"executes commands"| node_os
node_accessibility_service -->|"starts"| node_keepalive
node_keepalive -->|"repairs"| node_accessibility_service
node_external_automation -.->|"sends commands"| node_automation
node_automation -.->|"controls gestures"| node_accessibility_service

click node_main_activity "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/ui/MainActivity.kt"
click node_viewmodels "https://github.com/omeryol/akisgesture/tree/main/app/src/main/java/io/github/omeryol/akisgesture/ui/viewmodel"
click node_rule_ui "https://github.com/omeryol/akisgesture/tree/main/app/src/main/java/io/github/omeryol/akisgesture/ui/screen"
click node_gesture_config "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureConfig.kt"
click node_rule_graph "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/rule/GestureRuleGraph.kt"
click node_compiled_rules "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/rule/CompiledRuleSet.kt"
click node_rule_profiles "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/rule/RuleProfileResolver.kt"
click node_rule_serialization "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/rule/RuleSerializer.kt"
click node_backup "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/backup/SettingsBackupManager.kt"
click node_accessibility_service "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/service/GestureAccessibilityService.kt"
click node_gesture_engine "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureEngine.kt"
click node_edge_detector "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/gesture/EdgeGestureDetector.kt"
click node_overlays "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/overlay/OverlayManager.kt"
click node_feedback "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/feedback/FeedbackView.kt"
click node_action_dispatcher "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/action/ActionDispatcher.kt"
click node_action_handlers "https://github.com/omeryol/akisgesture/tree/main/app/src/main/java/io/github/omeryol/akisgesture/action/handler"
click node_root_executor "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/root/RootCommandExecutor.kt"
click node_shizuku "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/shizuku/ShizukuManager.kt"
click node_keepalive "https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/service/KeepAliveService.kt"
click node_automation "https://github.com/omeryol/akisgesture/tree/main/app/src/main/java/io/github/omeryol/akisgesture/automation"

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_gesture_config,node_rule_graph,node_compiled_rules,node_rule_profiles,node_rule_serialization,node_backup,node_user toneBlue
class node_accessibility_service,node_gesture_engine,node_edge_detector,node_overlays,node_feedback toneAmber
class node_action_dispatcher,node_action_handlers,node_root_executor,node_shizuku toneMint
class node_keepalive,node_automation toneRose
class node_main_activity,node_viewmodels,node_rule_ui,node_external_automation,node_os toneIndigo
```

## Components

### Configuration

- [Gesture settings](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureConfig.kt): `app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureConfig.kt`
- [Rule graph](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/rule/GestureRuleGraph.kt): `app/src/main/java/io/github/omeryol/akisgesture/rule/GestureRuleGraph.kt`
- [Compiled rules](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/rule/CompiledRuleSet.kt): `app/src/main/java/io/github/omeryol/akisgesture/rule/CompiledRuleSet.kt`
- [Profile resolution](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/rule/RuleProfileResolver.kt): `app/src/main/java/io/github/omeryol/akisgesture/rule/RuleProfileResolver.kt`
- [Rule serialization](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/rule/RuleSerializer.kt): `app/src/main/java/io/github/omeryol/akisgesture/rule/RuleSerializer.kt`
- [Settings backup](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/backup/SettingsBackupManager.kt): `app/src/main/java/io/github/omeryol/akisgesture/backup/SettingsBackupManager.kt`

### Gesture runtime

- [Accessibility service](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/service/GestureAccessibilityService.kt): `app/src/main/java/io/github/omeryol/akisgesture/service/GestureAccessibilityService.kt`
- [Gesture engine](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureEngine.kt): `app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureEngine.kt`
- [Edge detector](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/gesture/EdgeGestureDetector.kt): `app/src/main/java/io/github/omeryol/akisgesture/gesture/EdgeGestureDetector.kt`
- [Overlay manager](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/overlay/OverlayManager.kt): `app/src/main/java/io/github/omeryol/akisgesture/overlay/OverlayManager.kt`
- [Gesture feedback](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/feedback/FeedbackView.kt): `app/src/main/java/io/github/omeryol/akisgesture/feedback/FeedbackView.kt`

### Action execution

- [Action dispatcher](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/action/ActionDispatcher.kt): `app/src/main/java/io/github/omeryol/akisgesture/action/ActionDispatcher.kt`
- [Action handlers](https://github.com/omeryol/akisgesture/tree/main/app/src/main/java/io/github/omeryol/akisgesture/action/handler): `app/src/main/java/io/github/omeryol/akisgesture/action/handler`
- [Root commands](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/root/RootCommandExecutor.kt): `app/src/main/java/io/github/omeryol/akisgesture/root/RootCommandExecutor.kt`
- [Shizuku access](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/shizuku/ShizukuManager.kt): `app/src/main/java/io/github/omeryol/akisgesture/shizuku/ShizukuManager.kt`

### Service operations

- [Keep-alive recovery](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/service/KeepAliveService.kt): `app/src/main/java/io/github/omeryol/akisgesture/service/KeepAliveService.kt`
- [Automation commands](https://github.com/omeryol/akisgesture/tree/main/app/src/main/java/io/github/omeryol/akisgesture/automation): `app/src/main/java/io/github/omeryol/akisgesture/automation`

### App experience

- [Main activity](https://github.com/omeryol/akisgesture/blob/main/app/src/main/java/io/github/omeryol/akisgesture/ui/MainActivity.kt): `app/src/main/java/io/github/omeryol/akisgesture/ui/MainActivity.kt`
- [Screen viewmodels](https://github.com/omeryol/akisgesture/tree/main/app/src/main/java/io/github/omeryol/akisgesture/ui/viewmodel): `app/src/main/java/io/github/omeryol/akisgesture/ui/viewmodel`
- [Rule screens](https://github.com/omeryol/akisgesture/tree/main/app/src/main/java/io/github/omeryol/akisgesture/ui/screen): `app/src/main/java/io/github/omeryol/akisgesture/ui/screen`

### Other components

- **Phone user**
- **Automation apps**
- **Android system**

## Connections

- Phone user → Main activity: configures (evidence: `app/src/main/java/io/github/omeryol/akisgesture/ui/MainActivity.kt`)
- Main activity → Rule screens: routes to (evidence: `app/src/main/java/io/github/omeryol/akisgesture/ui/MainActivity.kt`)
- Main activity → Screen viewmodels: uses (evidence: `app/src/main/java/io/github/omeryol/akisgesture/ui/MainActivity.kt`)
- Screen viewmodels → Gesture settings: updates (evidence: `app/src/main/java/io/github/omeryol/akisgesture/ui/viewmodel/HomeViewModel.kt`)
- Screen viewmodels → Rule graph: edits (evidence: `app/src/main/java/io/github/omeryol/akisgesture/ui/viewmodel/HomeViewModel.kt`)
- Gesture settings → Compiled rules: configures
- Rule graph → Compiled rules: compiles
- Compiled rules → Profile resolution: resolves
- Settings backup → Rule serialization: uses (evidence: `app/src/main/java/io/github/omeryol/akisgesture/backup/SettingsBackupManager.kt`)
- Phone user → Accessibility service: enables
- Accessibility service → Gesture engine: starts (evidence: `app/src/main/java/io/github/omeryol/akisgesture/service/GestureAccessibilityService.kt`)
- Gesture engine → Edge detector: creates (evidence: `app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureEngine.kt`)
- Gesture engine → Compiled rules: reads (evidence: `app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureEngine.kt`)
- Gesture engine → Overlay manager: manages (evidence: `app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureEngine.kt`)
- Gesture engine → Gesture feedback: renders (evidence: `app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureEngine.kt`)
- Gesture engine → Action dispatcher: dispatches (evidence: `app/src/main/java/io/github/omeryol/akisgesture/gesture/GestureEngine.kt`)
- Action dispatcher → Action handlers: routes actions (evidence: `app/src/main/java/io/github/omeryol/akisgesture/action/ActionDispatcher.kt`)
- Action handlers → Root commands: requests commands (evidence: `app/src/main/java/io/github/omeryol/akisgesture/action/handler/HardwareAndAppHandler.kt`)
- Root commands → Shizuku access: falls back (evidence: `app/src/main/java/io/github/omeryol/akisgesture/root/RootCommandExecutor.kt`)
- Root commands → Android system: executes commands
- Accessibility service → Keep-alive recovery: starts (evidence: `app/src/main/java/io/github/omeryol/akisgesture/service/GestureAccessibilityService.kt`)
- Keep-alive recovery → Accessibility service: repairs (evidence: `app/src/main/java/io/github/omeryol/akisgesture/service/KeepAliveService.kt`)
- Automation apps → Automation commands: sends commands
- Automation commands → Accessibility service: controls gestures
