# skltn-ez/streak-plus architecture

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

- Interactive diagram: https://gitdiagram.com/skltn-ez/streak-plus
- Repository: https://github.com/skltn-ez/streak-plus

## Overview

Streak is a private, on-device habit tracker with native Android and iOS integrations and desktop runners. The principal user workflow—log habits, then review streaks, grids, and statistics—is documented, but its Flutter/Dart implementation is absent from the supplied tree, so the graph focuses on evidenced native entry points, widgets, and focus support rather than inventing the app’s core data pipeline. The README documents broader tracking, insights, reminders, customization, and focus capabilities; their internal implementation paths are not available here.

Main entry points: [`android/app/src/main/kotlin/com/streak/app/MainActivity.kt`](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/MainActivity.kt) (Android app bridge), [`android/app/src/main/kotlin/com/streak/app/WidgetActionWorker.kt`](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetActionWorker.kt) (Widget action worker), [`android/app/src/main/kotlin/com/streak/app/WidgetActionReceiver.kt`](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetActionReceiver.kt) (Widget action receiver), [`android/app/src/main/kotlin/com/streak/app/FocusService.kt`](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/FocusService.kt) (Focus service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_native_entry["Native app entry"]
  node_android_app["Android app bridge<br/>[MainActivity.kt]"]
  node_ios_app["iOS app delegate<br/>[AppDelegate.swift]"]
end

subgraph group_focus["Focus sessions"]
  node_focus_service["Focus service<br/>[FocusService.kt]"]
  node_focus_state["Focus state<br/>[FocusState.kt]"]
  node_focus_bridge["Focus bridge<br/>[FocusBridge.kt]"]
  node_ios_focus["Live focus"]
end

subgraph group_widgets["Widgets and actions"]
  node_widget_config["Widget configuration<br/>[WidgetConfig.kt]"]
  node_widget_config_ui["Widget setup UI"]
  node_widget_action["Widget action receiver"]
  node_widget_worker["Widget action worker"]
  node_action_queue["Pending action queue"]
  node_widget_families["Android widget families"]
  node_heatmap["Heatmap renderer<br/>[HeatmapRenderer.kt]"]
  node_glance["Glance updates<br/>[GlanceWidgets.kt]"]
end

subgraph group_platform["Platform surfaces"]
  node_ios_payload["Widget payload<br/>[Payload.swift]"]
  node_ios_widgets["iOS widget family"]
  node_linux_runner["Linux desktop runner<br/>[my_application.cc]"]
  node_windows_runner["Windows desktop runner<br/>[main.cpp]"]
end

node_person(("Streak user"))

node_person -->|"opens app"| node_android_app
node_person -.->|"opens app"| node_ios_app
node_person -.->|"acts on widget"| node_widget_action
node_android_app -->|"attaches bridge"| node_focus_bridge
node_android_app -->|"handles config"| node_widget_config
node_android_app -->|"handles preview"| node_widget_config_ui
node_android_app -->|"routes actions"| node_widget_action
node_focus_service -->|"reads and saves"| node_focus_state
node_focus_service -->|"enqueues events"| node_focus_bridge
node_ios_app -->|"handles focus calls"| node_ios_focus
node_widget_action -.->|"dispatches work"| node_widget_worker
node_widget_worker -->|"checks actions"| node_action_queue
node_widget_worker -->|"refreshes content"| node_heatmap
node_widget_worker -->|"updates widgets"| node_glance
node_heatmap -.->|"renders shared data"| node_ios_payload
node_ios_widgets -->|"reads payload"| node_ios_payload
node_person -.->|"launches desktop"| node_linux_runner
node_person -.->|"launches desktop"| node_windows_runner

click node_android_app "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/MainActivity.kt"
click node_ios_app "https://github.com/skltn-ez/streak-plus/blob/main/ios/Runner/AppDelegate.swift"
click node_focus_service "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/FocusService.kt"
click node_focus_state "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/FocusState.kt"
click node_focus_bridge "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/FocusBridge.kt"
click node_ios_focus "https://github.com/skltn-ez/streak-plus/blob/main/ios/Runner/FocusLiveActivity.swift"
click node_widget_config "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetConfig.kt"
click node_widget_config_ui "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetConfigActivity.kt"
click node_widget_action "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetActionReceiver.kt"
click node_widget_worker "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetActionWorker.kt"
click node_action_queue "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetActionQueue.kt"
click node_widget_families "https://github.com/skltn-ez/streak-plus/tree/main/android/app/src/main/kotlin/com/streak/app"
click node_heatmap "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/HeatmapRenderer.kt"
click node_glance "https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/GlanceWidgets.kt"
click node_ios_payload "https://github.com/skltn-ez/streak-plus/blob/main/ios/StreakWidgets/Payload.swift"
click node_ios_widgets "https://github.com/skltn-ez/streak-plus/blob/main/ios/StreakWidgets/StreakWidgets.swift"
click node_linux_runner "https://github.com/skltn-ez/streak-plus/blob/main/linux/runner/my_application.cc"
click node_windows_runner "https://github.com/skltn-ez/streak-plus/blob/main/windows/runner/main.cpp"

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_android_app,node_ios_app,node_person toneBlue
class node_focus_service,node_focus_state,node_focus_bridge,node_ios_focus toneAmber
class node_widget_config,node_widget_config_ui,node_widget_action,node_widget_worker,node_action_queue,node_widget_families,node_heatmap,node_glance toneMint
class node_ios_payload,node_ios_widgets,node_linux_runner,node_windows_runner toneRose
```

## Components

### Native app entry

- [Android app bridge](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/MainActivity.kt): `android/app/src/main/kotlin/com/streak/app/MainActivity.kt`
- [iOS app delegate](https://github.com/skltn-ez/streak-plus/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`

### Focus sessions

- [Focus service](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/FocusService.kt): `android/app/src/main/kotlin/com/streak/app/FocusService.kt`
- [Focus state](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/FocusState.kt): `android/app/src/main/kotlin/com/streak/app/FocusState.kt`
- [Focus bridge](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/FocusBridge.kt): `android/app/src/main/kotlin/com/streak/app/FocusBridge.kt`
- [Live focus](https://github.com/skltn-ez/streak-plus/blob/main/ios/Runner/FocusLiveActivity.swift): `ios/Runner/FocusLiveActivity.swift`

### Widgets and actions

- [Widget configuration](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetConfig.kt): `android/app/src/main/kotlin/com/streak/app/WidgetConfig.kt`
- [Widget setup UI](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetConfigActivity.kt): `android/app/src/main/kotlin/com/streak/app/WidgetConfigActivity.kt`
- [Widget action receiver](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetActionReceiver.kt): `android/app/src/main/kotlin/com/streak/app/WidgetActionReceiver.kt`
- [Widget action worker](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetActionWorker.kt): `android/app/src/main/kotlin/com/streak/app/WidgetActionWorker.kt`
- [Pending action queue](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/WidgetActionQueue.kt): `android/app/src/main/kotlin/com/streak/app/WidgetActionQueue.kt`
- [Android widget families](https://github.com/skltn-ez/streak-plus/tree/main/android/app/src/main/kotlin/com/streak/app): `android/app/src/main/kotlin/com/streak/app`
- [Heatmap renderer](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/HeatmapRenderer.kt): `android/app/src/main/kotlin/com/streak/app/HeatmapRenderer.kt`
- [Glance updates](https://github.com/skltn-ez/streak-plus/blob/main/android/app/src/main/kotlin/com/streak/app/GlanceWidgets.kt): `android/app/src/main/kotlin/com/streak/app/GlanceWidgets.kt`

### Platform surfaces

- [Widget payload](https://github.com/skltn-ez/streak-plus/blob/main/ios/StreakWidgets/Payload.swift): `ios/StreakWidgets/Payload.swift`
- [iOS widget family](https://github.com/skltn-ez/streak-plus/blob/main/ios/StreakWidgets/StreakWidgets.swift): `ios/StreakWidgets/StreakWidgets.swift`
- [Linux desktop runner](https://github.com/skltn-ez/streak-plus/blob/main/linux/runner/my_application.cc): `linux/runner/my_application.cc`
- [Windows desktop runner](https://github.com/skltn-ez/streak-plus/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`

### Other components

- **Streak user**

## Connections

- Streak user → Android app bridge: opens app
- Streak user → iOS app delegate: opens app
- Streak user → Widget action receiver: acts on widget
- Android app bridge → Focus bridge: attaches bridge (evidence: `android/app/src/main/kotlin/com/streak/app/MainActivity.kt`)
- Android app bridge → Widget configuration: handles config (evidence: `android/app/src/main/kotlin/com/streak/app/MainActivity.kt`)
- Android app bridge → Widget setup UI: handles preview (evidence: `android/app/src/main/kotlin/com/streak/app/MainActivity.kt`)
- Android app bridge → Widget action receiver: routes actions (evidence: `android/app/src/main/kotlin/com/streak/app/MainActivity.kt`)
- Focus service → Focus state: reads and saves (evidence: `android/app/src/main/kotlin/com/streak/app/FocusService.kt`)
- Focus service → Focus bridge: enqueues events (evidence: `android/app/src/main/kotlin/com/streak/app/FocusService.kt`)
- iOS app delegate → Live focus: handles focus calls (evidence: `ios/Runner/AppDelegate.swift`)
- Widget action receiver → Widget action worker: dispatches work
- Widget action worker → Pending action queue: checks actions (evidence: `android/app/src/main/kotlin/com/streak/app/WidgetActionWorker.kt`)
- Widget action worker → Heatmap renderer: refreshes content (evidence: `android/app/src/main/kotlin/com/streak/app/WidgetActionWorker.kt`)
- Widget action worker → Glance updates: updates widgets (evidence: `android/app/src/main/kotlin/com/streak/app/WidgetActionWorker.kt`)
- Heatmap renderer → Widget payload: renders shared data
- iOS widget family → Widget payload: reads payload
- Streak user → Linux desktop runner: launches desktop
- Streak user → Windows desktop runner: launches desktop
