# brskkkk/rythmn-games-auto-play architecture

> Architecture diagram of the GitHub repository brskkkk/rythmn-games-auto-play, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/brskkkk/rythmn-games-auto-play
- Repository: https://github.com/brskkkk/rythmn-games-auto-play

## Overview

Rhythm Autoplayer is an offline Android app that watches a downscroll rhythm game and can send lane taps through Android Accessibility. The main flow is: configure lane guides and input targets, capture frames, detect and track falling notes, then schedule taps or holds. Calibration, editable overlays, and named profiles support that workflow. Edges use the excerpts, SOURCE INDEX references, and README statements; unsampled implementation details are not assumed.

Main entry points: [`app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt`](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt) (Capture service), [`app/src/main/java/dev/rhythm/autoplayer/MainActivity.kt`](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/MainActivity.kt) (Setup screen), [`app/src/main/java/dev/rhythm/autoplayer/input/AccessibilityInputService.kt`](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/input/AccessibilityInputService.kt) (Gesture service), [`app/src/main/java/dev/rhythm/autoplayer/config/ProfileRepository.kt`](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/config/ProfileRepository.kt) (Profile storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup &amp; profiles"]
  node_activity["Setup screen<br/>[MainActivity.kt]"]
  node_selection["Profile selector"]
  node_profile["Calibration profile"]
  node_repository[("Profile storage")]
end

subgraph group_capture["Capture &amp; overlays"]
  node_capture_service["Capture service<br/>[CaptureService.kt]"]
  node_projection["Screen capture"]
  node_overlay["Lane overlay"]
  node_panel["Floating controls<br/>[ControlPanel.kt]"]
end

subgraph group_analysis["Detection &amp; timing"]
  node_detector["Note detector"]
  node_tracker["Note tracker<br/>[NoteTracker.kt]"]
  node_calibrator["Line calibration"]
end

subgraph group_input["Gesture input"]
  node_accessibility["Gesture service"]
end

node_user(("Player"))
node_game["Rhythm game"]

node_user -->|"configures"| node_activity
node_activity -->|"loads profiles"| node_repository
node_activity -->|"uses selector"| node_selection
node_repository -->|"stores settings"| node_profile
node_activity -->|"starts capture"| node_capture_service
node_capture_service -->|"loads settings"| node_repository
node_capture_service -->|"captures frames"| node_projection
node_capture_service -->|"updates overlay"| node_overlay
node_capture_service -->|"creates controls"| node_panel
node_user -->|"edits guides"| node_panel
node_projection -->|"provides frames"| node_capture_service
node_capture_service -->|"scans frames"| node_detector
node_capture_service -->|"calibrates frame"| node_calibrator
node_capture_service -->|"tracks detections"| node_tracker
node_capture_service -->|"schedules gestures"| node_accessibility
node_accessibility -->|"dispatches taps"| node_game
node_overlay -->|"shows markers"| node_user
node_accessibility -->|"uses targets"| node_profile

click node_activity "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/MainActivity.kt"
click node_selection "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/SimpleItemSelectedListener.kt"
click node_profile "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/core/CalibrationProfile.kt"
click node_repository "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/config/ProfileRepository.kt"
click node_capture_service "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt"
click node_overlay "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/capture/ReceptorOverlayView.kt"
click node_panel "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/capture/ControlPanel.kt"
click node_detector "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/core/FullScreenNoteDetector.kt"
click node_tracker "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/core/NoteTracker.kt"
click node_calibrator "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/core/JudgementLineCalibrator.kt"
click node_accessibility "https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/input/AccessibilityInputService.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_activity,node_selection,node_profile,node_repository toneBlue
class node_capture_service,node_projection,node_overlay,node_panel toneAmber
class node_detector,node_tracker,node_calibrator toneMint
class node_accessibility toneRose
class node_user,node_game toneIndigo
```

## Components

### Setup & profiles

- [Setup screen](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/MainActivity.kt): `app/src/main/java/dev/rhythm/autoplayer/MainActivity.kt`
- [Profile selector](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/SimpleItemSelectedListener.kt): `app/src/main/java/dev/rhythm/autoplayer/SimpleItemSelectedListener.kt`
- [Calibration profile](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/core/CalibrationProfile.kt): `app/src/main/java/dev/rhythm/autoplayer/core/CalibrationProfile.kt`
- [Profile storage](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/config/ProfileRepository.kt): `app/src/main/java/dev/rhythm/autoplayer/config/ProfileRepository.kt`

### Capture & overlays

- [Capture service](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt): `app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt`
- **Screen capture**
- [Lane overlay](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/capture/ReceptorOverlayView.kt): `app/src/main/java/dev/rhythm/autoplayer/capture/ReceptorOverlayView.kt`
- [Floating controls](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/capture/ControlPanel.kt): `app/src/main/java/dev/rhythm/autoplayer/capture/ControlPanel.kt`

### Detection & timing

- [Note detector](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/core/FullScreenNoteDetector.kt): `app/src/main/java/dev/rhythm/autoplayer/core/FullScreenNoteDetector.kt`
- [Note tracker](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/core/NoteTracker.kt): `app/src/main/java/dev/rhythm/autoplayer/core/NoteTracker.kt`
- [Line calibration](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/core/JudgementLineCalibrator.kt): `app/src/main/java/dev/rhythm/autoplayer/core/JudgementLineCalibrator.kt`

### Gesture input

- [Gesture service](https://github.com/brskkkk/rythmn-games-auto-play/blob/main/app/src/main/java/dev/rhythm/autoplayer/input/AccessibilityInputService.kt): `app/src/main/java/dev/rhythm/autoplayer/input/AccessibilityInputService.kt`

### Other components

- **Player**
- **Rhythm game**

## Connections

- Player → Setup screen: configures (evidence: `README.md`)
- Setup screen → Profile storage: loads profiles (evidence: `app/src/main/java/dev/rhythm/autoplayer/MainActivity.kt`)
- Setup screen → Profile selector: uses selector (evidence: `app/src/main/java/dev/rhythm/autoplayer/MainActivity.kt`)
- Profile storage → Calibration profile: stores settings (evidence: `app/src/main/java/dev/rhythm/autoplayer/config/ProfileRepository.kt`)
- Setup screen → Capture service: starts capture (evidence: `app/src/main/java/dev/rhythm/autoplayer/MainActivity.kt`)
- Capture service → Profile storage: loads settings (evidence: `app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt`)
- Capture service → Screen capture: captures frames (evidence: `README.md`)
- Capture service → Lane overlay: updates overlay (evidence: `app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt`)
- Capture service → Floating controls: creates controls (evidence: `app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt`)
- Player → Floating controls: edits guides (evidence: `README.md`)
- Screen capture → Capture service: provides frames (evidence: `README.md`)
- Capture service → Note detector: scans frames (evidence: `app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt`)
- Capture service → Line calibration: calibrates frame (evidence: `app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt`)
- Capture service → Note tracker: tracks detections (evidence: `app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt`)
- Capture service → Gesture service: schedules gestures (evidence: `app/src/main/java/dev/rhythm/autoplayer/capture/CaptureService.kt`)
- Gesture service → Rhythm game: dispatches taps (evidence: `README.md`)
- Lane overlay → Player: shows markers (evidence: `README.md`)
- Gesture service → Calibration profile: uses targets (evidence: `app/src/main/java/dev/rhythm/autoplayer/input/AccessibilityInputService.kt`)
