# aristote94/smith-android architecture

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

- Interactive diagram: https://gitdiagram.com/aristote94/smith-android
- Repository: https://github.com/aristote94/smith-android

## Overview

SMITH is an offline Android icon pack with a home dashboard and Glance widget. The user opens the dashboard to see demo home metrics and app tiles; selecting an installed tile launches its app. The screen and widget share the repository contract, while the icon-pack catalog supplies the app entries. The README documents launcher compatibility and deterministic demo data. Some widget and icon-pack wiring is only partially sampled, so unverified relationships are omitted or marked dashed.

Main entry points: [`app/src/main/kotlin/fr/smith/android/ui/home/HomeViewModel.kt`](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/HomeViewModel.kt) (Home view model), [`app/src/main/kotlin/fr/smith/android/MainActivity.kt`](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/MainActivity.kt) (Main activity), [`app/src/main/kotlin/fr/smith/android/domain/repository/HomeRepository.kt`](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/domain/repository/HomeRepository.kt) (Home repository), [`app/src/main/kotlin/fr/smith/android/ui/home/HomeScreen.kt`](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/HomeScreen.kt) (Home screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_surfaces["App surfaces"]
  node_main_activity["Main activity<br/>[MainActivity.kt]"]
  node_home_vm["Home view model<br/>[HomeViewModel.kt]"]
  node_home_state["Home UI state<br/>[HomeUiState.kt]"]
  node_home_screen["Home screen<br/>[HomeScreen.kt]"]
  node_house_card["House card<br/>[HouseCard.kt]"]
  node_app_tile["App tile<br/>[AppTile.kt]"]
  node_widget["Home widget<br/>[SmithWidget.kt]"]
end

subgraph group_home_data["Home data"]
  node_container["App container<br/>[AppContainer.kt]"]
  node_repository["Home repository<br/>[HomeRepository.kt]"]
  node_demo_repository["Demo data source"]
  node_snapshot["Home snapshot<br/>[HomeSnapshot.kt]"]
  node_format["Value formatting<br/>[HomeFormat.kt]"]
end

subgraph group_icon_pack["Icon pack"]
  node_catalog["Icon catalog<br/>[IconPackCatalog.kt]"]
  node_app_launcher["App launcher<br/>[AppLauncher.kt]"]
  node_icon_assets["Icon assets"]
  node_launcher_config["Launcher mappings<br/>[appfilter.xml]"]
end

node_user(("User"))
node_android_system(("Android system"))

node_user -->|"opens"| node_main_activity
node_main_activity -->|"creates"| node_home_vm
node_main_activity -->|"renders"| node_home_screen
node_home_vm -->|"produces"| node_home_state
node_home_screen -->|"renders"| node_house_card
node_home_screen -->|"renders"| node_app_tile
node_main_activity -->|"launches via"| node_app_launcher
node_home_vm -->|"gets dependencies"| node_container
node_container -->|"constructs"| node_demo_repository
node_container -->|"provides"| node_repository
node_home_vm -->|"observes"| node_repository
node_widget -->|"observes"| node_repository
node_repository -->|"emits"| node_snapshot
node_home_vm -->|"maps entries"| node_catalog
node_house_card -->|"displays metrics"| node_snapshot
node_house_card -->|"formats values"| node_format
node_widget -->|"formats time"| node_format
node_catalog -->|"references icons"| node_icon_assets
node_android_system -.->|"hosts"| node_widget
node_android_system -.->|"reads mappings"| node_launcher_config

click node_main_activity "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/MainActivity.kt"
click node_home_vm "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/HomeViewModel.kt"
click node_home_state "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/HomeUiState.kt"
click node_home_screen "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/HomeScreen.kt"
click node_house_card "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/components/HouseCard.kt"
click node_app_tile "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/components/AppTile.kt"
click node_widget "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/widget/SmithWidget.kt"
click node_container "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/di/AppContainer.kt"
click node_repository "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/domain/repository/HomeRepository.kt"
click node_demo_repository "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/data/demo/DemoHomeRepository.kt"
click node_snapshot "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/domain/model/HomeSnapshot.kt"
click node_format "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/core/format/HomeFormat.kt"
click node_catalog "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/iconpack/IconPackCatalog.kt"
click node_app_launcher "https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/iconpack/AppLauncher.kt"
click node_icon_assets "https://github.com/aristote94/smith-android/tree/main/app/src/main/res/drawable"
click node_launcher_config "https://github.com/aristote94/smith-android/blob/main/app/src/main/res/xml/appfilter.xml"

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_activity,node_home_vm,node_home_state,node_home_screen,node_house_card,node_app_tile,node_widget,node_user toneBlue
class node_container,node_repository,node_demo_repository,node_snapshot,node_format toneAmber
class node_catalog,node_app_launcher,node_icon_assets,node_launcher_config toneMint
class node_android_system toneIndigo
```

## Components

### App surfaces

- [Main activity](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/MainActivity.kt): `app/src/main/kotlin/fr/smith/android/MainActivity.kt`
- [Home view model](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/HomeViewModel.kt): `app/src/main/kotlin/fr/smith/android/ui/home/HomeViewModel.kt`
- [Home UI state](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/HomeUiState.kt): `app/src/main/kotlin/fr/smith/android/ui/home/HomeUiState.kt`
- [Home screen](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/HomeScreen.kt): `app/src/main/kotlin/fr/smith/android/ui/home/HomeScreen.kt`
- [House card](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/components/HouseCard.kt): `app/src/main/kotlin/fr/smith/android/ui/home/components/HouseCard.kt`
- [App tile](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/ui/home/components/AppTile.kt): `app/src/main/kotlin/fr/smith/android/ui/home/components/AppTile.kt`
- [Home widget](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/widget/SmithWidget.kt): `app/src/main/kotlin/fr/smith/android/widget/SmithWidget.kt`

### Home data

- [App container](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/di/AppContainer.kt): `app/src/main/kotlin/fr/smith/android/di/AppContainer.kt`
- [Home repository](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/domain/repository/HomeRepository.kt): `app/src/main/kotlin/fr/smith/android/domain/repository/HomeRepository.kt`
- [Demo data source](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/data/demo/DemoHomeRepository.kt): `app/src/main/kotlin/fr/smith/android/data/demo/DemoHomeRepository.kt`
- [Home snapshot](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/domain/model/HomeSnapshot.kt): `app/src/main/kotlin/fr/smith/android/domain/model/HomeSnapshot.kt`
- [Value formatting](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/core/format/HomeFormat.kt): `app/src/main/kotlin/fr/smith/android/core/format/HomeFormat.kt`

### Icon pack

- [Icon catalog](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/iconpack/IconPackCatalog.kt): `app/src/main/kotlin/fr/smith/android/iconpack/IconPackCatalog.kt`
- [App launcher](https://github.com/aristote94/smith-android/blob/main/app/src/main/kotlin/fr/smith/android/iconpack/AppLauncher.kt): `app/src/main/kotlin/fr/smith/android/iconpack/AppLauncher.kt`
- [Icon assets](https://github.com/aristote94/smith-android/tree/main/app/src/main/res/drawable): `app/src/main/res/drawable`
- [Launcher mappings](https://github.com/aristote94/smith-android/blob/main/app/src/main/res/xml/appfilter.xml): `app/src/main/res/xml/appfilter.xml`

### Other components

- **User**
- **Android system**

## Connections

- User → Main activity: opens (evidence: `app/src/main/kotlin/fr/smith/android/MainActivity.kt`)
- Main activity → Home view model: creates (evidence: `app/src/main/kotlin/fr/smith/android/MainActivity.kt`)
- Main activity → Home screen: renders (evidence: `app/src/main/kotlin/fr/smith/android/MainActivity.kt`)
- Home view model → Home UI state: produces (evidence: `app/src/main/kotlin/fr/smith/android/ui/home/HomeViewModel.kt`)
- Home screen → House card: renders (evidence: `app/src/main/kotlin/fr/smith/android/ui/home/HomeScreen.kt`)
- Home screen → App tile: renders (evidence: `app/src/main/kotlin/fr/smith/android/ui/home/HomeScreen.kt`)
- Main activity → App launcher: launches via (evidence: `app/src/main/kotlin/fr/smith/android/MainActivity.kt`)
- Home view model → App container: gets dependencies (evidence: `app/src/main/kotlin/fr/smith/android/ui/home/HomeViewModel.kt`)
- App container → Demo data source: constructs (evidence: `app/src/main/kotlin/fr/smith/android/di/AppContainer.kt`)
- App container → Home repository: provides (evidence: `app/src/main/kotlin/fr/smith/android/di/AppContainer.kt`)
- Home view model → Home repository: observes (evidence: `app/src/main/kotlin/fr/smith/android/ui/home/HomeViewModel.kt`)
- Home widget → Home repository: observes (evidence: `app/src/main/kotlin/fr/smith/android/widget/SmithWidget.kt`)
- Home repository → Home snapshot: emits (evidence: `app/src/main/kotlin/fr/smith/android/domain/repository/HomeRepository.kt`)
- Home view model → Icon catalog: maps entries (evidence: `app/src/main/kotlin/fr/smith/android/ui/home/HomeViewModel.kt`)
- House card → Home snapshot: displays metrics (evidence: `app/src/main/kotlin/fr/smith/android/ui/home/components/HouseCard.kt`)
- House card → Value formatting: formats values (evidence: `app/src/main/kotlin/fr/smith/android/ui/home/components/HouseCard.kt`)
- Home widget → Value formatting: formats time (evidence: `app/src/main/kotlin/fr/smith/android/widget/SmithWidget.kt`)
- Icon catalog → Icon assets: references icons (evidence: `app/src/main/kotlin/fr/smith/android/iconpack/IconPackCatalog.kt`)
- Android system → Home widget: hosts
- Android system → Launcher mappings: reads mappings
