# namidaco/namida architecture

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

- Interactive diagram: https://gitdiagram.com/namidaco/namida
- Repository: https://github.com/namidaco/namida

## Overview

Namida is a Flutter music and video player; the README describes local-library indexing, playback, YouTube streaming and downloads, lyrics, history, and synchronization. The supplied tree and excerpts cover platform-specific Android bridges and desktop Flutter hosts, not the Dart feature implementation, so the graph focuses on those visible runtime components. Android’s activity connects Flutter calls to native services; widget configuration and rendering form a separate Android feature. Desktop nodes show only app hosting. Relationships are limited to excerpted calls or SOURCE INDEX references.

Main entry points: [`android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt`](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt) (Main activity), [`android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzSechsPrototypeMkII.kt`](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzSechsPrototypeMkII.kt) (Widget renderer), [`android/app/src/main/kotlin/com/msob7y/namida/glance/NamidaWidgetConfig.kt`](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/NamidaWidgetConfig.kt) (Widget settings), [`android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzReciever.kt`](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzReciever.kt) (Widget receiver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_android["Android platform bridge"]
  node_activity["Main activity"]
  node_tagger["Audio tagger<br/>[FAudioTagger.kt]"]
  node_events["Event channel"]
  node_picker["File picker<br/>[FileSysPicker.kt]"]
  node_storage["Storage paths<br/>[StorageUtils.kt]"]
  node_saf["SAF access<br/>[SafUtils.kt]"]
  node_lyric["Lyric publisher"]
  node_crash["Crash recorder"]
end

subgraph group_widgets["Android widgets"]
  node_widget_config_activity["Widget editor"]
  node_widget_config[("Widget settings")]
  node_widget["Widget renderer"]
  node_widget_colors["Widget colors"]
  node_image["Artwork wrapper<br/>[ImageWrapper.kt]"]
  node_receiver["Widget receiver<br/>[SchwarzReciever.kt]"]
end

subgraph group_desktop["Desktop hosts"]
  node_linux_app["Linux app host<br/>[my_application.cc]"]
  node_linux_entry["Linux entrypoint<br/>[main.cc]"]
  node_win_entry["Windows entrypoint<br/>[main.cpp]"]
  node_flutter_window["Flutter window<br/>[flutter_window.cpp]"]
  node_win_window["Win32 window<br/>[win32_window.h]"]
end

node_flutter(("Flutter engine"))

node_activity -->|"uses paths"| node_storage
node_activity -->|"builds picker"| node_saf
node_activity -->|"invokes tagging"| node_tagger
node_activity -->|"publishes lyrics"| node_lyric
node_activity -->|"installs recorder"| node_crash
node_activity -->|"routes picker"| node_picker
node_tagger -->|"streams events"| node_events
node_picker -->|"uses storage"| node_storage
node_widget_config_activity -->|"loads settings"| node_widget_config
node_widget -->|"reads settings"| node_widget_config
node_widget -->|"builds palette"| node_widget_colors
node_widget -->|"decodes artwork"| node_image
node_receiver -->|"updates widget"| node_widget
node_receiver -->|"uses settings"| node_widget_config
node_linux_entry -->|"starts app"| node_linux_app
node_win_entry -->|"creates window"| node_flutter_window
node_flutter_window -->|"inherits window"| node_win_window

click node_activity "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt"
click node_tagger "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/FAudioTagger.kt"
click node_events "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/BetterEventChannel.kt"
click node_picker "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/FileSysPicker.kt"
click node_storage "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/StorageUtils.kt"
click node_saf "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/SafUtils.kt"
click node_lyric "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/SuperLyricPublisher.kt"
click node_crash "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/ProcessExitReporter.kt"
click node_widget_config_activity "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzConfigActivity.kt"
click node_widget_config "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/NamidaWidgetConfig.kt"
click node_widget "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzSechsPrototypeMkII.kt"
click node_widget_colors "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/NamidaWidgetColors.kt"
click node_image "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/ImageWrapper.kt"
click node_receiver "https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzReciever.kt"
click node_linux_app "https://github.com/namidaco/namida/blob/main/linux/runner/my_application.cc"
click node_linux_entry "https://github.com/namidaco/namida/blob/main/linux/runner/main.cc"
click node_win_entry "https://github.com/namidaco/namida/blob/main/windows/runner/main.cpp"
click node_flutter_window "https://github.com/namidaco/namida/blob/main/windows/runner/flutter_window.cpp"
click node_win_window "https://github.com/namidaco/namida/blob/main/windows/runner/win32_window.h"

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_tagger,node_events,node_picker,node_storage,node_saf,node_lyric,node_crash toneBlue
class node_widget_config_activity,node_widget_config,node_widget,node_widget_colors,node_image,node_receiver toneAmber
class node_linux_app,node_linux_entry,node_win_entry,node_flutter_window,node_win_window toneMint
class node_flutter toneIndigo
```

## Components

### Android platform bridge

- [Main activity](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt): `android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt`
- [Audio tagger](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/FAudioTagger.kt): `android/app/src/main/kotlin/com/msob7y/namida/FAudioTagger.kt`
- [Event channel](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/BetterEventChannel.kt): `android/app/src/main/kotlin/com/msob7y/namida/BetterEventChannel.kt`
- [File picker](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/FileSysPicker.kt): `android/app/src/main/kotlin/com/msob7y/namida/FileSysPicker.kt`
- [Storage paths](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/StorageUtils.kt): `android/app/src/main/kotlin/com/msob7y/namida/StorageUtils.kt`
- [SAF access](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/SafUtils.kt): `android/app/src/main/kotlin/com/msob7y/namida/SafUtils.kt`
- [Lyric publisher](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/SuperLyricPublisher.kt): `android/app/src/main/kotlin/com/msob7y/namida/SuperLyricPublisher.kt`
- [Crash recorder](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/ProcessExitReporter.kt): `android/app/src/main/kotlin/com/msob7y/namida/ProcessExitReporter.kt`

### Android widgets

- [Widget editor](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzConfigActivity.kt): `android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzConfigActivity.kt`
- [Widget settings](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/NamidaWidgetConfig.kt): `android/app/src/main/kotlin/com/msob7y/namida/glance/NamidaWidgetConfig.kt`
- [Widget renderer](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzSechsPrototypeMkII.kt): `android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzSechsPrototypeMkII.kt`
- [Widget colors](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/NamidaWidgetColors.kt): `android/app/src/main/kotlin/com/msob7y/namida/glance/NamidaWidgetColors.kt`
- [Artwork wrapper](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/ImageWrapper.kt): `android/app/src/main/kotlin/com/msob7y/namida/glance/ImageWrapper.kt`
- [Widget receiver](https://github.com/namidaco/namida/blob/main/android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzReciever.kt): `android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzReciever.kt`

### Desktop hosts

- [Linux app host](https://github.com/namidaco/namida/blob/main/linux/runner/my_application.cc): `linux/runner/my_application.cc`
- [Linux entrypoint](https://github.com/namidaco/namida/blob/main/linux/runner/main.cc): `linux/runner/main.cc`
- [Windows entrypoint](https://github.com/namidaco/namida/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window](https://github.com/namidaco/namida/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Win32 window](https://github.com/namidaco/namida/blob/main/windows/runner/win32_window.h): `windows/runner/win32_window.h`

### Other components

- **Flutter engine**

## Connections

- Main activity → Storage paths: uses paths (evidence: `android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt`)
- Main activity → SAF access: builds picker (evidence: `android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt`)
- Main activity → Audio tagger: invokes tagging (evidence: `android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt`)
- Main activity → Lyric publisher: publishes lyrics (evidence: `android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt`)
- Main activity → Crash recorder: installs recorder (evidence: `android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt`)
- Main activity → File picker: routes picker (evidence: `android/app/src/main/kotlin/com/msob7y/namida/NamidaMainActivity.kt`)
- Audio tagger → Event channel: streams events (evidence: `android/app/src/main/kotlin/com/msob7y/namida/FAudioTagger.kt`)
- File picker → Storage paths: uses storage (evidence: `android/app/src/main/kotlin/com/msob7y/namida/FileSysPicker.kt`)
- Widget editor → Widget settings: loads settings (evidence: `android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzConfigActivity.kt`)
- Widget renderer → Widget settings: reads settings (evidence: `android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzSechsPrototypeMkII.kt`)
- Widget renderer → Widget colors: builds palette (evidence: `android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzSechsPrototypeMkII.kt`)
- Widget renderer → Artwork wrapper: decodes artwork (evidence: `android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzSechsPrototypeMkII.kt`)
- Widget receiver → Widget renderer: updates widget (evidence: `android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzReciever.kt`)
- Widget receiver → Widget settings: uses settings (evidence: `android/app/src/main/kotlin/com/msob7y/namida/glance/SchwarzReciever.kt`)
- Linux entrypoint → Linux app host: starts app (evidence: `linux/runner/main.cc`)
- Windows entrypoint → Flutter window: creates window (evidence: `windows/runner/main.cpp`)
- Flutter window → Win32 window: inherits window
