# mostafaxs1/artcraft-android architecture

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

- Interactive diagram: https://gitdiagram.com/mostafaxs1/artcraft-android
- Repository: https://github.com/mostafaxs1/artcraft-android

## Overview

ArtCraft Android ports creative applications for Android and includes a launcher for discovering, installing, launching, and updating them. The user workflow runs from launcher catalog selection through installation and app launch into an adapted creative app, with Android file, input, and system integrations supporting use. The README also documents a hardware-accelerated video capability. Relationships among launcher modules are limited to those shown in excerpts or the source index; the adapter and video internals were not sampled.

Main entry points: [`launcher/crates/ui-egui/src/app.rs`](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/crates/ui-egui/src/app.rs) (Launcher interface), [`adapters/clothcraft/java/com/artcraft/clothcraft/ClothCraftActivity.java`](https://github.com/mostafaxs1/artcraft-android/blob/main/adapters/clothcraft/java/com/artcraft/clothcraft/ClothCraftActivity.java) (App activities), [`launcher/apps/artcraft-launcher-android/src/backend.rs`](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/src/backend.rs) (Android backend), [`launcher/apps/artcraft-launcher-android/src/app.rs`](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/src/app.rs) (Android launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher"]
  node_launcher_ui["Launcher interface<br/>[app.rs]"]
  node_launcher_views["Launcher views<br/>[views.rs]"]
  node_launcher_model["Launcher model<br/>[model.rs]"]
  node_android_app["Android launcher<br/>[app.rs]"]
  node_android_backend["Android backend<br/>[backend.rs]"]
  node_catalog["App catalog<br/>[catalog.rs]"]
  node_bridge["Platform bridge<br/>[bridge.rs]"]
end

subgraph group_runtime["Android runtime"]
  node_launcher_input["Launcher text input"]
  node_saf_activity["SAF activity support<br/>[SafActivity.java]"]
end

subgraph group_apps["Creative apps"]
  node_app_adapters["Android app adapters"]
  node_adapter_activity["App activities"]
  node_adapter_rust["App Rust adapters<br/>[lib.rs]"]
  node_saf_bridge["SAF Rust bridge<br/>[saf.rs]"]
  node_mcp_http["MCP HTTP support"]
end

subgraph group_media["Video engine"]
  node_video_engine["Hardware video engine"]
end

node_user(("Android user"))
node_android_system["Android system APIs"]
node_mediacodec["Android MediaCodec"]
node_software_decode["CPU decode fallback"]
node_github["GitHub releases"]

node_user -->|"browses apps"| node_launcher_ui
node_launcher_ui -->|"renders views"| node_launcher_views
node_launcher_ui -->|"uses state"| node_launcher_model
node_launcher_ui -->|"sends commands"| node_android_backend
node_android_app -->|"starts worker"| node_android_backend
node_android_backend -->|"uses catalog"| node_catalog
node_android_backend -->|"uses bridge"| node_bridge
node_android_app -->|"polls IME"| node_launcher_input
node_user -->|"opens launcher"| node_android_app
node_launcher_ui -->|"launches apps"| node_app_adapters
node_app_adapters -->|"provides activities"| node_adapter_activity
node_adapter_activity -.->|"runs app runtime"| node_adapter_rust
node_adapter_activity -.->|"uses SAF"| node_saf_bridge
node_adapter_activity -.->|"serves MCP"| node_mcp_http
node_saf_activity -->|"uses document APIs"| node_android_system
node_adapter_activity -->|"integrates platform"| node_android_system
node_video_engine -->|"decodes with"| node_mediacodec
node_video_engine -->|"falls back"| node_software_decode
node_user -->|"checks releases"| node_github

click node_launcher_ui "https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/crates/ui-egui/src/app.rs"
click node_launcher_views "https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/crates/ui-egui/src/views.rs"
click node_launcher_model "https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/crates/ui-egui/src/model.rs"
click node_android_app "https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/src/app.rs"
click node_android_backend "https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/src/backend.rs"
click node_catalog "https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/src/catalog.rs"
click node_bridge "https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/src/bridge.rs"
click node_launcher_input "https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/android/app/src/main/java/com/artcraft/launcher/ArtCraftInputView.java"
click node_saf_activity "https://github.com/mostafaxs1/artcraft-android/blob/main/templates/android/SafActivity.java"
click node_app_adapters "https://github.com/mostafaxs1/artcraft-android/tree/main/adapters"
click node_adapter_activity "https://github.com/mostafaxs1/artcraft-android/blob/main/adapters/clothcraft/java/com/artcraft/clothcraft/ClothCraftActivity.java"
click node_adapter_rust "https://github.com/mostafaxs1/artcraft-android/blob/main/adapters/clothcraft/src/lib.rs"
click node_saf_bridge "https://github.com/mostafaxs1/artcraft-android/blob/main/adapters/clothcraft/src/saf.rs"
click node_video_engine "https://github.com/mostafaxs1/artcraft-android/tree/main/templates/filmcraft"

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_launcher_ui,node_launcher_views,node_launcher_model,node_android_app,node_android_backend,node_catalog,node_bridge,node_user toneBlue
class node_launcher_input,node_saf_activity toneAmber
class node_app_adapters,node_adapter_activity,node_adapter_rust,node_saf_bridge,node_mcp_http,node_android_system toneMint
class node_video_engine toneRose
class node_mediacodec,node_software_decode,node_github toneIndigo
```

## Components

### Launcher

- [Launcher interface](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/crates/ui-egui/src/app.rs): `launcher/crates/ui-egui/src/app.rs`
- [Launcher views](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/crates/ui-egui/src/views.rs): `launcher/crates/ui-egui/src/views.rs`
- [Launcher model](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/crates/ui-egui/src/model.rs): `launcher/crates/ui-egui/src/model.rs`
- [Android launcher](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/src/app.rs): `launcher/apps/artcraft-launcher-android/src/app.rs`
- [Android backend](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/src/backend.rs): `launcher/apps/artcraft-launcher-android/src/backend.rs`
- [App catalog](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/src/catalog.rs): `launcher/apps/artcraft-launcher-android/src/catalog.rs`
- [Platform bridge](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/src/bridge.rs): `launcher/apps/artcraft-launcher-android/src/bridge.rs`

### Android runtime

- [Launcher text input](https://github.com/mostafaxs1/artcraft-android/blob/main/launcher/apps/artcraft-launcher-android/android/app/src/main/java/com/artcraft/launcher/ArtCraftInputView.java): `launcher/apps/artcraft-launcher-android/android/app/src/main/java/com/artcraft/launcher/ArtCraftInputView.java`
- [SAF activity support](https://github.com/mostafaxs1/artcraft-android/blob/main/templates/android/SafActivity.java): `templates/android/SafActivity.java`

### Creative apps

- [Android app adapters](https://github.com/mostafaxs1/artcraft-android/tree/main/adapters): `adapters`
- [App activities](https://github.com/mostafaxs1/artcraft-android/blob/main/adapters/clothcraft/java/com/artcraft/clothcraft/ClothCraftActivity.java): `adapters/clothcraft/java/com/artcraft/clothcraft/ClothCraftActivity.java`
- [App Rust adapters](https://github.com/mostafaxs1/artcraft-android/blob/main/adapters/clothcraft/src/lib.rs): `adapters/clothcraft/src/lib.rs`
- [SAF Rust bridge](https://github.com/mostafaxs1/artcraft-android/blob/main/adapters/clothcraft/src/saf.rs): `adapters/clothcraft/src/saf.rs`
- **MCP HTTP support**

### Video engine

- [Hardware video engine](https://github.com/mostafaxs1/artcraft-android/tree/main/templates/filmcraft): `templates/filmcraft`

### Other components

- **Android user**
- **Android system APIs**
- **Android MediaCodec**
- **CPU decode fallback**
- **GitHub releases**

## Connections

- Android user → Launcher interface: browses apps
- Launcher interface → Launcher views: renders views (evidence: `launcher/crates/ui-egui/src/app.rs`)
- Launcher interface → Launcher model: uses state (evidence: `launcher/crates/ui-egui/src/app.rs`)
- Launcher interface → Android backend: sends commands (evidence: `launcher/crates/ui-egui/src/app.rs`)
- Android launcher → Android backend: starts worker (evidence: `launcher/apps/artcraft-launcher-android/src/app.rs`)
- Android backend → App catalog: uses catalog (evidence: `launcher/apps/artcraft-launcher-android/src/backend.rs`)
- Android backend → Platform bridge: uses bridge (evidence: `launcher/apps/artcraft-launcher-android/src/backend.rs`)
- Android launcher → Launcher text input: polls IME (evidence: `launcher/apps/artcraft-launcher-android/android/app/src/main/java/com/artcraft/launcher/ArtCraftInputView.java`)
- Android user → Android launcher: opens launcher
- Launcher interface → Android app adapters: launches apps
- Android app adapters → App activities: provides activities
- App activities → App Rust adapters: runs app runtime
- App activities → SAF Rust bridge: uses SAF
- App activities → MCP HTTP support: serves MCP
- SAF activity support → Android system APIs: uses document APIs
- App activities → Android system APIs: integrates platform
- Hardware video engine → Android MediaCodec: decodes with
- Hardware video engine → CPU decode fallback: falls back
- Android user → GitHub releases: checks releases
