# f0x1d/logfox architecture

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

- Interactive diagram: https://gitdiagram.com/f0x1d/logfox
- Repository: https://github.com/f0x1d/logfox

## Overview

LogFox is an Android LogCat reader. The main user journey is to grant log-reading access through setup, start log capture, then inspect and search logs; users can also filter logs, monitor crashes/ANRs, and record or export logs. The graph separates app orchestration, log access and exploration, crash monitoring, and recordings/settings. Several feature implementations are represented at their exact tree paths but were not sampled, so their internal links are omitted; README-supported capabilities are retained.

Main entry points: [`app/src/main/kotlin/com/f0x1d/logfox/presentation/MainEffectHandler.kt`](https://github.com/f0x1d/logfox/blob/master/app/src/main/kotlin/com/f0x1d/logfox/presentation/MainEffectHandler.kt) (Main effects), [`feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/service/LoggingService.kt`](https://github.com/f0x1d/logfox/blob/master/feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/service/LoggingService.kt) (Log service), [`feature/recordings/impl/src/main/kotlin/com/f0x1d/logfox/feature/recordings/impl/data/RecordingsRepositoryImpl.kt`](https://github.com/f0x1d/logfox/blob/master/feature/recordings/impl/src/main/kotlin/com/f0x1d/logfox/feature/recordings/impl/data/RecordingsRepositoryImpl.kt) (Recording repository), [`feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/search/ui/SearchLogsBottomSheetFragment.kt`](https://github.com/f0x1d/logfox/blob/master/feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/search/ui/SearchLogsBottomSheetFragment.kt) (Search interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App orchestration"]
  node_main["Main activity<br/>[MainActivity.kt]"]
  node_main_effects["Main effects"]
  node_setup["Permission setup"]
end

subgraph group_logs["Log access and exploration"]
  node_logging_service["Log service<br/>[LoggingService.kt]"]
  node_terminal["Terminal access<br/>[UserService.kt]"]
  node_log_search["Log search"]
  node_search_ui["Search interface"]
  node_filters["Log filters"]
end

subgraph group_crashes["Crash monitoring"]
  node_crash_search["Crash search"]
  node_crash_store[("Crash storage<br/>[AppDatabase.kt]")]
end

subgraph group_records["Recording and settings"]
  node_recordings["Recording controls"]
  node_recording_data["Recording repository"]
  node_preferences["Service preferences"]
  node_database[("App database<br/>[AppDatabase.kt]")]
end

node_user(("Android user"))

node_user -->|"opens"| node_main
node_main -.->|"dispatches effects"| node_main_effects
node_main_effects -->|"starts service"| node_logging_service
node_main_effects -->|"requests setup"| node_setup
node_setup -.->|"grants access"| node_user
node_logging_service -.->|"uses access"| node_terminal
node_user -.->|"searches logs"| node_search_ui
node_search_ui -->|"sends query"| node_log_search
node_log_search -->|"returns query state"| node_search_ui
node_user -.->|"configures filters"| node_filters
node_logging_service -.->|"observes crash logs"| node_crash_search
node_crash_search -.->|"reads crash data"| node_crash_store
node_user -.->|"manages recordings"| node_recordings
node_recordings -.->|"saves or retrieves"| node_recording_data
node_recording_data -.->|"persists metadata"| node_database
node_recording_data -->|"dumps logs"| node_terminal
node_user -.->|"sets preferences"| node_preferences

click node_main "https://github.com/f0x1d/logfox/blob/master/app/src/main/kotlin/com/f0x1d/logfox/presentation/ui/activity/MainActivity.kt"
click node_main_effects "https://github.com/f0x1d/logfox/blob/master/app/src/main/kotlin/com/f0x1d/logfox/presentation/MainEffectHandler.kt"
click node_setup "https://github.com/f0x1d/logfox/blob/master/feature/setup/presentation/src/main/kotlin/com/f0x1d/logfox/feature/setup/presentation/SetupEffectHandler.kt"
click node_logging_service "https://github.com/f0x1d/logfox/blob/master/feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/service/LoggingService.kt"
click node_terminal "https://github.com/f0x1d/logfox/blob/master/feature/terminals/presentation/src/main/kotlin/com/f0x1d/logfox/feature/terminals/presentation/service/UserService.kt"
click node_log_search "https://github.com/f0x1d/logfox/blob/master/feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/search/SearchLogsEffectHandler.kt"
click node_search_ui "https://github.com/f0x1d/logfox/blob/master/feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/search/ui/SearchLogsBottomSheetFragment.kt"
click node_filters "https://github.com/f0x1d/logfox/blob/master/feature/filters/presentation/src/main/kotlin/com/f0x1d/logfox/feature/filters/presentation/list/FiltersEffectHandler.kt"
click node_crash_search "https://github.com/f0x1d/logfox/blob/master/feature/crashes/presentation/src/main/kotlin/com/f0x1d/logfox/feature/crashes/presentation/list/CrashesSearchEffectHandler.kt"
click node_crash_store "https://github.com/f0x1d/logfox/blob/master/feature/database/impl/src/main/kotlin/com/f0x1d/logfox/feature/database/impl/AppDatabase.kt"
click node_recordings "https://github.com/f0x1d/logfox/blob/master/feature/recordings/presentation/src/main/kotlin/com/f0x1d/logfox/feature/recordings/presentation/list/RecordingsEffectHandler.kt"
click node_recording_data "https://github.com/f0x1d/logfox/blob/master/feature/recordings/impl/src/main/kotlin/com/f0x1d/logfox/feature/recordings/impl/data/RecordingsRepositoryImpl.kt"
click node_preferences "https://github.com/f0x1d/logfox/blob/master/feature/preferences/presentation/src/main/kotlin/com/f0x1d/logfox/feature/preferences/presentation/service/ui/PreferencesServiceFragment.kt"
click node_database "https://github.com/f0x1d/logfox/blob/master/feature/database/impl/src/main/kotlin/com/f0x1d/logfox/feature/database/impl/AppDatabase.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_main_effects,node_setup,node_user toneBlue
class node_logging_service,node_terminal,node_log_search,node_search_ui,node_filters toneAmber
class node_crash_search,node_crash_store toneMint
class node_recordings,node_recording_data,node_preferences,node_database toneRose
```

## Components

### App orchestration

- [Main activity](https://github.com/f0x1d/logfox/blob/master/app/src/main/kotlin/com/f0x1d/logfox/presentation/ui/activity/MainActivity.kt): `app/src/main/kotlin/com/f0x1d/logfox/presentation/ui/activity/MainActivity.kt`
- [Main effects](https://github.com/f0x1d/logfox/blob/master/app/src/main/kotlin/com/f0x1d/logfox/presentation/MainEffectHandler.kt): `app/src/main/kotlin/com/f0x1d/logfox/presentation/MainEffectHandler.kt`
- [Permission setup](https://github.com/f0x1d/logfox/blob/master/feature/setup/presentation/src/main/kotlin/com/f0x1d/logfox/feature/setup/presentation/SetupEffectHandler.kt): `feature/setup/presentation/src/main/kotlin/com/f0x1d/logfox/feature/setup/presentation/SetupEffectHandler.kt`

### Log access and exploration

- [Log service](https://github.com/f0x1d/logfox/blob/master/feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/service/LoggingService.kt): `feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/service/LoggingService.kt`
- [Terminal access](https://github.com/f0x1d/logfox/blob/master/feature/terminals/presentation/src/main/kotlin/com/f0x1d/logfox/feature/terminals/presentation/service/UserService.kt): `feature/terminals/presentation/src/main/kotlin/com/f0x1d/logfox/feature/terminals/presentation/service/UserService.kt`
- [Log search](https://github.com/f0x1d/logfox/blob/master/feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/search/SearchLogsEffectHandler.kt): `feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/search/SearchLogsEffectHandler.kt`
- [Search interface](https://github.com/f0x1d/logfox/blob/master/feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/search/ui/SearchLogsBottomSheetFragment.kt): `feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/search/ui/SearchLogsBottomSheetFragment.kt`
- [Log filters](https://github.com/f0x1d/logfox/blob/master/feature/filters/presentation/src/main/kotlin/com/f0x1d/logfox/feature/filters/presentation/list/FiltersEffectHandler.kt): `feature/filters/presentation/src/main/kotlin/com/f0x1d/logfox/feature/filters/presentation/list/FiltersEffectHandler.kt`

### Crash monitoring

- [Crash search](https://github.com/f0x1d/logfox/blob/master/feature/crashes/presentation/src/main/kotlin/com/f0x1d/logfox/feature/crashes/presentation/list/CrashesSearchEffectHandler.kt): `feature/crashes/presentation/src/main/kotlin/com/f0x1d/logfox/feature/crashes/presentation/list/CrashesSearchEffectHandler.kt`
- [Crash storage](https://github.com/f0x1d/logfox/blob/master/feature/database/impl/src/main/kotlin/com/f0x1d/logfox/feature/database/impl/AppDatabase.kt): `feature/database/impl/src/main/kotlin/com/f0x1d/logfox/feature/database/impl/AppDatabase.kt`

### Recording and settings

- [Recording controls](https://github.com/f0x1d/logfox/blob/master/feature/recordings/presentation/src/main/kotlin/com/f0x1d/logfox/feature/recordings/presentation/list/RecordingsEffectHandler.kt): `feature/recordings/presentation/src/main/kotlin/com/f0x1d/logfox/feature/recordings/presentation/list/RecordingsEffectHandler.kt`
- [Recording repository](https://github.com/f0x1d/logfox/blob/master/feature/recordings/impl/src/main/kotlin/com/f0x1d/logfox/feature/recordings/impl/data/RecordingsRepositoryImpl.kt): `feature/recordings/impl/src/main/kotlin/com/f0x1d/logfox/feature/recordings/impl/data/RecordingsRepositoryImpl.kt`
- [Service preferences](https://github.com/f0x1d/logfox/blob/master/feature/preferences/presentation/src/main/kotlin/com/f0x1d/logfox/feature/preferences/presentation/service/ui/PreferencesServiceFragment.kt): `feature/preferences/presentation/src/main/kotlin/com/f0x1d/logfox/feature/preferences/presentation/service/ui/PreferencesServiceFragment.kt`
- [App database](https://github.com/f0x1d/logfox/blob/master/feature/database/impl/src/main/kotlin/com/f0x1d/logfox/feature/database/impl/AppDatabase.kt): `feature/database/impl/src/main/kotlin/com/f0x1d/logfox/feature/database/impl/AppDatabase.kt`

### Other components

- **Android user**

## Connections

- Android user → Main activity: opens
- Main activity → Main effects: dispatches effects
- Main effects → Log service: starts service (evidence: `app/src/main/kotlin/com/f0x1d/logfox/presentation/MainEffectHandler.kt`)
- Main effects → Permission setup: requests setup (evidence: `app/src/main/kotlin/com/f0x1d/logfox/presentation/MainEffectHandler.kt`)
- Permission setup → Android user: grants access (evidence: `README.md`)
- Log service → Terminal access: uses access (evidence: `README.md`)
- Android user → Search interface: searches logs
- Search interface → Log search: sends query (evidence: `feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/search/ui/SearchLogsBottomSheetFragment.kt`)
- Log search → Search interface: returns query state (evidence: `feature/logging/presentation/src/main/kotlin/com/f0x1d/logfox/feature/logging/presentation/search/SearchLogsEffectHandler.kt`)
- Android user → Log filters: configures filters (evidence: `README.md`)
- Log service → Crash search: observes crash logs (evidence: `README.md`)
- Crash search → Crash storage: reads crash data
- Android user → Recording controls: manages recordings (evidence: `README.md`)
- Recording controls → Recording repository: saves or retrieves
- Recording repository → App database: persists metadata
- Recording repository → Terminal access: dumps logs (evidence: `feature/recordings/impl/src/main/kotlin/com/f0x1d/logfox/feature/recordings/impl/data/RecordingsRepositoryImpl.kt`)
- Android user → Service preferences: sets preferences
