# bmaibu/android-assignment-1 architecture

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

- Interactive diagram: https://gitdiagram.com/bmaibu/android-assignment-1
- Repository: https://github.com/bmaibu/android-assignment-1

## Overview

Alphabet Launcher is an Android home-screen app for browsing and opening installed apps. The main path is device user → launcher screen → installed-app discovery and A–Z/favorites presentation → selected app launch; a swipe-up opens search. The documented interaction layer also bends and springs back the alphabet bar with haptic ticks, while the screen presents a live clock/date. The ViewModel source was not sampled, so its documented state and filtering responsibilities are shown without asserting implementation details beyond the README; default-home registration is documented in the README.

Main entry points: [`app/src/main/java/com/maibu/androidassignment/launcher/LauncherScreen.kt`](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/launcher/LauncherScreen.kt) (Launcher screen), [`app/src/main/java/com/maibu/androidassignment/MainActivity.kt`](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/MainActivity.kt) (MainActivity), [`app/src/main/java/com/maibu/androidassignment/data/AppRepository.kt`](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/data/AppRepository.kt) (App repository), [`app/src/main/java/com/maibu/androidassignment/launcher/AlphabetBar.kt`](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/launcher/AlphabetBar.kt) (A–Z bar)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Launcher orchestration"]
  node_activity["MainActivity<br/>[MainActivity.kt]"]
  node_screen["Launcher screen<br/>[LauncherScreen.kt]"]
  node_viewmodel["Launcher state"]
end

subgraph group_discovery["App discovery"]
  node_repository["App repository<br/>[AppRepository.kt]"]
  node_appmodel["Launchable app<br/>[LaunchableApp.kt]"]
end

subgraph group_interaction["Navigation interaction"]
  node_alphabet["A–Z bar<br/>[AlphabetBar.kt]"]
  node_curvemath["Curve math<br/>[CurveMath.kt]"]
end

subgraph group_presentation["Launcher presentation"]
  node_applist["App list<br/>[AppList.kt]"]
  node_approw["App row<br/>[AppRow.kt]"]
  node_clock["Clock and date<br/>[ClockView.kt]"]
  node_search["Search overlay<br/>[SearchView.kt]"]
  node_theme["Compose theme<br/>[Theme.kt]"]
end

node_user(("Device user"))
node_android["Android PackageManager"]
node_installed[("Installed apps")]
node_target_apps["Other apps"]

node_user -->|"opens home"| node_activity
node_activity -->|"sets theme"| node_theme
node_activity -->|"shows screen"| node_screen
node_screen -->|"reads and updates"| node_viewmodel
node_viewmodel -->|"requests app data"| node_repository
node_repository -->|"queries apps"| node_android
node_android -->|"returns launchables"| node_installed
node_repository -->|"creates app records"| node_appmodel
node_screen -->|"renders index"| node_alphabet
node_alphabet -->|"calculates bend"| node_curvemath
node_alphabet -->|"reports letter and touch"| node_screen
node_screen -->|"shows favorites or letter results"| node_applist
node_applist -->|"renders apps"| node_approw
node_screen -->|"shows home time"| node_clock
node_screen -->|"shows search overlay"| node_search
node_search -->|"renders results"| node_approw
node_screen -->|"launches selected app"| node_target_apps
node_search -->|"reports query and selection"| node_screen

click node_activity "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/MainActivity.kt"
click node_screen "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/launcher/LauncherScreen.kt"
click node_viewmodel "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/launcher/LauncherViewModel.kt"
click node_repository "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/data/AppRepository.kt"
click node_appmodel "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/data/LaunchableApp.kt"
click node_alphabet "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/launcher/AlphabetBar.kt"
click node_curvemath "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/launcher/CurveMath.kt"
click node_applist "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/ui/AppList.kt"
click node_approw "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/ui/AppRow.kt"
click node_clock "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/ui/ClockView.kt"
click node_search "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/ui/SearchView.kt"
click node_theme "https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/ui/theme/Theme.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_screen,node_viewmodel,node_user toneBlue
class node_repository,node_appmodel,node_installed toneAmber
class node_alphabet,node_curvemath toneMint
class node_applist,node_approw,node_clock,node_search,node_theme toneRose
class node_android,node_target_apps toneIndigo
```

## Components

### Launcher orchestration

- [MainActivity](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/MainActivity.kt): `app/src/main/java/com/maibu/androidassignment/MainActivity.kt`
- [Launcher screen](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/launcher/LauncherScreen.kt): `app/src/main/java/com/maibu/androidassignment/launcher/LauncherScreen.kt`
- [Launcher state](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/launcher/LauncherViewModel.kt): `app/src/main/java/com/maibu/androidassignment/launcher/LauncherViewModel.kt`

### App discovery

- [App repository](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/data/AppRepository.kt): `app/src/main/java/com/maibu/androidassignment/data/AppRepository.kt`
- [Launchable app](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/data/LaunchableApp.kt): `app/src/main/java/com/maibu/androidassignment/data/LaunchableApp.kt`

### Navigation interaction

- [A–Z bar](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/launcher/AlphabetBar.kt): `app/src/main/java/com/maibu/androidassignment/launcher/AlphabetBar.kt`
- [Curve math](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/launcher/CurveMath.kt): `app/src/main/java/com/maibu/androidassignment/launcher/CurveMath.kt`

### Launcher presentation

- [App list](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/ui/AppList.kt): `app/src/main/java/com/maibu/androidassignment/ui/AppList.kt`
- [App row](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/ui/AppRow.kt): `app/src/main/java/com/maibu/androidassignment/ui/AppRow.kt`
- [Clock and date](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/ui/ClockView.kt): `app/src/main/java/com/maibu/androidassignment/ui/ClockView.kt`
- [Search overlay](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/ui/SearchView.kt): `app/src/main/java/com/maibu/androidassignment/ui/SearchView.kt`
- [Compose theme](https://github.com/bmaibu/android-assignment-1/blob/main/app/src/main/java/com/maibu/androidassignment/ui/theme/Theme.kt): `app/src/main/java/com/maibu/androidassignment/ui/theme/Theme.kt`

### Other components

- **Device user**
- **Android PackageManager**
- **Installed apps**
- **Other apps**

## Connections

- Device user → MainActivity: opens home
- MainActivity → Compose theme: sets theme
- MainActivity → Launcher screen: shows screen
- Launcher screen → Launcher state: reads and updates
- Launcher state → App repository: requests app data
- App repository → Android PackageManager: queries apps
- Android PackageManager → Installed apps: returns launchables
- App repository → Launchable app: creates app records
- Launcher screen → A–Z bar: renders index
- A–Z bar → Curve math: calculates bend
- A–Z bar → Launcher screen: reports letter and touch
- Launcher screen → App list: shows favorites or letter results
- App list → App row: renders apps
- Launcher screen → Clock and date: shows home time
- Launcher screen → Search overlay: shows search overlay
- Search overlay → App row: renders results
- Launcher screen → Other apps: launches selected app
- Search overlay → Launcher screen: reports query and selection
