# nadiraliofficial/blacklanebot architecture

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

- Interactive diagram: https://gitdiagram.com/nadiraliofficial/blacklanebot
- Repository: https://github.com/nadiraliofficial/blacklanebot

## Overview

Blacklane Auto-Accept Bot is an Android app that turns Blacklane offer notifications into filtered, automated accept taps. The main workflow is notification detection, opening/scanning the Blacklane screen, Canada and pickup-window checks, then tapping a matching offer and reporting the result. The graph also captures setup/configuration, trial gating, reboot behavior, and the documented permission-based background services. Mock offer tooling is a separate testing aid. Source excerpts establish the core calls; links based only on README documentation are cited there.

Main entry points: [`app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt`](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt) (Screen scanner), [`app/src/main/java/com/blacklanebot/BlacklaneNotificationListener.kt`](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BlacklaneNotificationListener.kt) (Notification listener), [`app/src/main/java/com/blacklanebot/MainActivity.kt`](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/MainActivity.kt) (Setup UI), [`app/src/main/java/com/blacklanebot/BotConfig.kt`](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BotConfig.kt) (Bot settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and configuration"]
  node_main["Setup UI<br/>[MainActivity.kt]"]
  node_config["Bot settings<br/>[BotConfig.kt]"]
end

subgraph group_detection["Offer detection"]
  node_listener["Notification listener"]
  node_accessibility["Screen scanner"]
end

subgraph group_decision["Filtering and acceptance"]
  node_parser["Offer filters<br/>[OfferParser.kt]"]
end

subgraph group_support["Runtime support"]
  node_trial["Trial gate<br/>[TrialManager.kt]"]
  node_logger["Activity log<br/>[BotLogger.kt]"]
  node_boot["Reboot receiver<br/>[BootReceiver.kt]"]
end

subgraph group_mock["Mock offer tooling"]
  node_mockhelper["Mock notifier"]
  node_mockactivity["Mock offer screen"]
  node_mockoffers["Mock offers<br/>[MockOffer.kt]"]
end

node_user(("Phone user"))
node_blacklane["Blacklane app"]
node_android["Android system"]

node_user -->|"configures"| node_main
node_main -->|"reads and saves"| node_config
node_main -->|"initializes and checks"| node_trial
node_android -.->|"delivers notifications"| node_listener
node_listener -->|"checks package"| node_config
node_listener -->|"checks expiry"| node_trial
node_listener -->|"signals offer"| node_accessibility
node_listener -->|"logs events"| node_logger
node_accessibility -->|"opens notification shade"| node_android
node_accessibility -->|"scans screen"| node_blacklane
node_accessibility -->|"loads time window"| node_config
node_accessibility -->|"checks expiry"| node_trial
node_accessibility -->|"checks offer text"| node_parser
node_parser -->|"uses location lists"| node_config
node_accessibility -->|"taps acceptance"| node_blacklane
node_accessibility -->|"logs decisions"| node_logger
node_accessibility -->|"broadcasts result"| node_main
node_main -->|"displays and clears log"| node_logger
node_android -.->|"sends boot event"| node_boot
node_mockhelper -->|"generates offers"| node_mockoffers
node_mockhelper -->|"launches screen"| node_mockactivity
node_mockactivity -->|"renders offers"| node_mockoffers
node_mockhelper -->|"signals service"| node_accessibility

click node_main "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/MainActivity.kt"
click node_config "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BotConfig.kt"
click node_trial "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/TrialManager.kt"
click node_listener "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BlacklaneNotificationListener.kt"
click node_accessibility "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt"
click node_parser "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/OfferParser.kt"
click node_logger "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BotLogger.kt"
click node_boot "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BootReceiver.kt"
click node_mockhelper "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/TestNotificationHelper.kt"
click node_mockactivity "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/MockBlacklaneActivity.kt"
click node_mockoffers "https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/MockOffer.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_main,node_config,node_user toneBlue
class node_listener,node_accessibility toneAmber
class node_parser toneMint
class node_trial,node_logger,node_boot toneRose
class node_mockhelper,node_mockactivity,node_mockoffers,node_blacklane,node_android toneIndigo
```

## Components

### Setup and configuration

- [Setup UI](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/MainActivity.kt): `app/src/main/java/com/blacklanebot/MainActivity.kt`
- [Bot settings](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BotConfig.kt): `app/src/main/java/com/blacklanebot/BotConfig.kt`

### Offer detection

- [Notification listener](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BlacklaneNotificationListener.kt): `app/src/main/java/com/blacklanebot/BlacklaneNotificationListener.kt`
- [Screen scanner](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt): `app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt`

### Filtering and acceptance

- [Offer filters](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/OfferParser.kt): `app/src/main/java/com/blacklanebot/OfferParser.kt`

### Runtime support

- [Trial gate](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/TrialManager.kt): `app/src/main/java/com/blacklanebot/TrialManager.kt`
- [Activity log](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BotLogger.kt): `app/src/main/java/com/blacklanebot/BotLogger.kt`
- [Reboot receiver](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/BootReceiver.kt): `app/src/main/java/com/blacklanebot/BootReceiver.kt`

### Mock offer tooling

- [Mock notifier](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/TestNotificationHelper.kt): `app/src/main/java/com/blacklanebot/TestNotificationHelper.kt`
- [Mock offer screen](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/MockBlacklaneActivity.kt): `app/src/main/java/com/blacklanebot/MockBlacklaneActivity.kt`
- [Mock offers](https://github.com/nadiraliofficial/blacklanebot/blob/main/app/src/main/java/com/blacklanebot/MockOffer.kt): `app/src/main/java/com/blacklanebot/MockOffer.kt`

### Other components

- **Phone user**
- **Blacklane app**
- **Android system**

## Connections

- Phone user → Setup UI: configures (evidence: `app/src/main/java/com/blacklanebot/MainActivity.kt`)
- Setup UI → Bot settings: reads and saves (evidence: `app/src/main/java/com/blacklanebot/MainActivity.kt`)
- Setup UI → Trial gate: initializes and checks (evidence: `app/src/main/java/com/blacklanebot/MainActivity.kt`)
- Android system → Notification listener: delivers notifications (evidence: `README.md`)
- Notification listener → Bot settings: checks package (evidence: `app/src/main/java/com/blacklanebot/BlacklaneNotificationListener.kt`)
- Notification listener → Trial gate: checks expiry (evidence: `app/src/main/java/com/blacklanebot/BlacklaneNotificationListener.kt`)
- Notification listener → Screen scanner: signals offer (evidence: `app/src/main/java/com/blacklanebot/BlacklaneNotificationListener.kt`)
- Notification listener → Activity log: logs events (evidence: `app/src/main/java/com/blacklanebot/BlacklaneNotificationListener.kt`)
- Screen scanner → Android system: opens notification shade (evidence: `app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt`)
- Screen scanner → Blacklane app: scans screen (evidence: `README.md`)
- Screen scanner → Bot settings: loads time window (evidence: `app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt`)
- Screen scanner → Trial gate: checks expiry (evidence: `app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt`)
- Screen scanner → Offer filters: checks offer text (evidence: `app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt`)
- Offer filters → Bot settings: uses location lists (evidence: `app/src/main/java/com/blacklanebot/OfferParser.kt`)
- Screen scanner → Blacklane app: taps acceptance (evidence: `app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt`)
- Screen scanner → Activity log: logs decisions (evidence: `app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt`)
- Screen scanner → Setup UI: broadcasts result (evidence: `app/src/main/java/com/blacklanebot/BlacklaneAccessibilityService.kt`)
- Setup UI → Activity log: displays and clears log (evidence: `app/src/main/java/com/blacklanebot/MainActivity.kt`)
- Android system → Reboot receiver: sends boot event (evidence: `README.md`)
- Mock notifier → Mock offers: generates offers (evidence: `app/src/main/java/com/blacklanebot/TestNotificationHelper.kt`)
- Mock notifier → Mock offer screen: launches screen (evidence: `app/src/main/java/com/blacklanebot/TestNotificationHelper.kt`)
- Mock offer screen → Mock offers: renders offers (evidence: `app/src/main/java/com/blacklanebot/MockBlacklaneActivity.kt`)
- Mock notifier → Screen scanner: signals service (evidence: `app/src/main/java/com/blacklanebot/TestNotificationHelper.kt`)
