# githubofhimanshu/universal-mobile-runtime architecture

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

- Interactive diagram: https://gitdiagram.com/githubofhimanshu/universal-mobile-runtime
- Repository: https://github.com/githubofhimanshu/universal-mobile-runtime

## Overview

The tree describes a desktop-first Android/iOS runtime with package inspection, backend capability negotiation, session control, and a desktop shell. The README calls the project pre-implementation, so treat these components as a work-in-progress rather than evidence of broad compatibility. Major documented ecosystem safeguards and support reporting are represented; unsampled subsystem links are omitted unless the excerpts or index show them.

Main entry points: [`crates/umr-distribution/src/catalog.rs`](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/catalog.rs) (Catalog and verification), [`crates/umr-orchestrator/src/lib.rs`](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-orchestrator/src/lib.rs) (Runtime orchestrator), [`crates/umr-core/src/backend.rs`](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-core/src/backend.rs) (Backend negotiation), [`apps/desktop-shell/src/main.ts`](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/apps/desktop-shell/src/main.ts) (Desktop interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop shell"]
  node_shell["Desktop interface<br/>[main.ts]"]
  node_viewport["App viewport<br/>[viewport.ts]"]
  node_rpcclient["RPC client<br/>[rpc-client.ts]"]
  node_shellfeatures["Library and diagnostics"]
end

subgraph group_control["Runtime control"]
  node_rpcserver["HTTP RPC server<br/>[server.rs]"]
  node_rpchandler["RPC request handler<br/>[handler.rs]"]
  node_protocol["RPC protocol<br/>[protocol.rs]"]
  node_orchestrator["Runtime orchestrator<br/>[lib.rs]"]
  node_sessions["Session manager<br/>[session.rs]"]
  node_capabilities["Backend negotiation<br/>[backend.rs]"]
  node_metadata["Package metadata<br/>[metadata.rs]"]
end

subgraph group_intake["Package intake"]
  node_intakecli["Inspection worker<br/>[main.rs]"]
  node_intake["Package inspection<br/>[lib.rs]"]
end

subgraph group_execution["Execution backends"]
  node_android["Android backend<br/>[backend.rs]"]
  node_androidpackage[("Android package manager<br/>[package_manager.rs]")]
  node_reference["Reference Android runtime<br/>[runner.rs]"]
  node_storage[("App storage sandbox<br/>[storage.rs]")]
  node_ios["iOS backend<br/>[lib.rs]"]
  node_iosremote["Remote iOS stream<br/>[remote_stream.rs]"]
end

subgraph group_ecosystem["Distribution safeguards"]
  node_distribution[("Catalog and verification<br/>[catalog.rs]")]
  node_publisher["Publisher provenance<br/>[publisher.rs]"]
  node_license["License compliance<br/>[license.rs]"]
  node_privacy["Remote consent gate<br/>[privacy.rs]"]
  node_support["Support reports<br/>[support_report.rs]"]
end

node_user(("Desktop user"))

node_user -->|"uses"| node_shell
node_shell -.->|"sends requests"| node_rpcclient
node_viewport -->|"sends input"| node_rpcclient
node_shell -.->|"presents"| node_shellfeatures
node_rpcserver -->|"dispatches requests"| node_rpchandler
node_rpchandler -->|"parses messages"| node_protocol
node_rpchandler -->|"invokes operations"| node_orchestrator
node_orchestrator -.->|"runs worker"| node_intakecli
node_intakecli -->|"inspects package"| node_intake
node_orchestrator -.->|"manages sessions"| node_sessions
node_orchestrator -.->|"negotiates backends"| node_capabilities
node_capabilities -->|"matches requirements"| node_metadata
node_capabilities -.->|"selects backend"| node_android
node_capabilities -.->|"selects backend"| node_ios
node_android -.->|"manages installs"| node_androidpackage
node_reference -.->|"uses sandbox"| node_storage
node_distribution -->|"verifies provenance"| node_publisher
node_distribution -->|"checks licensing"| node_license
node_distribution -->|"gates remote use"| node_privacy
node_distribution -->|"generates reports"| node_support
node_ios -.->|"supports remote stream"| node_iosremote

click node_shell "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/apps/desktop-shell/src/main.ts"
click node_viewport "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/apps/desktop-shell/src/components/viewport.ts"
click node_rpcclient "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/apps/desktop-shell/src/rpc-client.ts"
click node_shellfeatures "https://github.com/githubofhimanshu/universal-mobile-runtime/tree/main/apps/desktop-shell/src/components"
click node_rpcserver "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-ipc/src/server.rs"
click node_rpchandler "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-ipc/src/handler.rs"
click node_protocol "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-ipc/src/protocol.rs"
click node_orchestrator "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-orchestrator/src/lib.rs"
click node_sessions "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-orchestrator/src/session.rs"
click node_capabilities "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-core/src/backend.rs"
click node_metadata "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-core/src/metadata.rs"
click node_intakecli "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-intake-worker/src/main.rs"
click node_intake "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-intake-worker/src/lib.rs"
click node_android "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-android/src/backend.rs"
click node_androidpackage "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-android/src/package_manager.rs"
click node_reference "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-reference/src/runner.rs"
click node_storage "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-reference/src/storage.rs"
click node_ios "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-ios/src/lib.rs"
click node_iosremote "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-ios/src/remote_stream.rs"
click node_distribution "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/catalog.rs"
click node_publisher "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/publisher.rs"
click node_license "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/license.rs"
click node_privacy "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/privacy.rs"
click node_support "https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/support_report.rs"

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_shell,node_viewport,node_rpcclient,node_shellfeatures,node_user toneBlue
class node_rpcserver,node_rpchandler,node_protocol,node_orchestrator,node_sessions,node_capabilities,node_metadata toneAmber
class node_intakecli,node_intake toneMint
class node_android,node_androidpackage,node_reference,node_storage,node_ios,node_iosremote toneRose
class node_distribution,node_publisher,node_license,node_privacy,node_support toneIndigo
```

## Components

### Desktop shell

- [Desktop interface](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/apps/desktop-shell/src/main.ts): `apps/desktop-shell/src/main.ts`
- [App viewport](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/apps/desktop-shell/src/components/viewport.ts): `apps/desktop-shell/src/components/viewport.ts`
- [RPC client](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/apps/desktop-shell/src/rpc-client.ts): `apps/desktop-shell/src/rpc-client.ts`
- [Library and diagnostics](https://github.com/githubofhimanshu/universal-mobile-runtime/tree/main/apps/desktop-shell/src/components): `apps/desktop-shell/src/components`

### Runtime control

- [HTTP RPC server](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-ipc/src/server.rs): `crates/umr-ipc/src/server.rs`
- [RPC request handler](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-ipc/src/handler.rs): `crates/umr-ipc/src/handler.rs`
- [RPC protocol](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-ipc/src/protocol.rs): `crates/umr-ipc/src/protocol.rs`
- [Runtime orchestrator](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-orchestrator/src/lib.rs): `crates/umr-orchestrator/src/lib.rs`
- [Session manager](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-orchestrator/src/session.rs): `crates/umr-orchestrator/src/session.rs`
- [Backend negotiation](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-core/src/backend.rs): `crates/umr-core/src/backend.rs`
- [Package metadata](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-core/src/metadata.rs): `crates/umr-core/src/metadata.rs`

### Package intake

- [Inspection worker](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-intake-worker/src/main.rs): `crates/umr-intake-worker/src/main.rs`
- [Package inspection](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-intake-worker/src/lib.rs): `crates/umr-intake-worker/src/lib.rs`

### Execution backends

- [Android backend](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-android/src/backend.rs): `crates/umr-backend-android/src/backend.rs`
- [Android package manager](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-android/src/package_manager.rs): `crates/umr-backend-android/src/package_manager.rs`
- [Reference Android runtime](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-reference/src/runner.rs): `crates/umr-backend-reference/src/runner.rs`
- [App storage sandbox](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-reference/src/storage.rs): `crates/umr-backend-reference/src/storage.rs`
- [iOS backend](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-ios/src/lib.rs): `crates/umr-backend-ios/src/lib.rs`
- [Remote iOS stream](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-backend-ios/src/remote_stream.rs): `crates/umr-backend-ios/src/remote_stream.rs`

### Distribution safeguards

- [Catalog and verification](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/catalog.rs): `crates/umr-distribution/src/catalog.rs`
- [Publisher provenance](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/publisher.rs): `crates/umr-distribution/src/publisher.rs`
- [License compliance](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/license.rs): `crates/umr-distribution/src/license.rs`
- [Remote consent gate](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/privacy.rs): `crates/umr-distribution/src/privacy.rs`
- [Support reports](https://github.com/githubofhimanshu/universal-mobile-runtime/blob/main/crates/umr-distribution/src/support_report.rs): `crates/umr-distribution/src/support_report.rs`

### Other components

- **Desktop user**

## Connections

- Desktop user → Desktop interface: uses
- Desktop interface → RPC client: sends requests
- App viewport → RPC client: sends input (evidence: `apps/desktop-shell/src/components/viewport.ts`)
- Desktop interface → Library and diagnostics: presents
- HTTP RPC server → RPC request handler: dispatches requests (evidence: `crates/umr-ipc/src/server.rs`)
- RPC request handler → RPC protocol: parses messages (evidence: `crates/umr-ipc/src/handler.rs`)
- RPC request handler → Runtime orchestrator: invokes operations (evidence: `crates/umr-ipc/src/handler.rs`)
- Runtime orchestrator → Inspection worker: runs worker
- Inspection worker → Package inspection: inspects package (evidence: `crates/umr-intake-worker/src/main.rs`)
- Runtime orchestrator → Session manager: manages sessions
- Runtime orchestrator → Backend negotiation: negotiates backends
- Backend negotiation → Package metadata: matches requirements (evidence: `crates/umr-core/src/backend.rs`)
- Backend negotiation → Android backend: selects backend
- Backend negotiation → iOS backend: selects backend
- Android backend → Android package manager: manages installs
- Reference Android runtime → App storage sandbox: uses sandbox
- Catalog and verification → Publisher provenance: verifies provenance (evidence: `crates/umr-distribution/src/lib.rs`)
- Catalog and verification → License compliance: checks licensing (evidence: `crates/umr-distribution/src/lib.rs`)
- Catalog and verification → Remote consent gate: gates remote use (evidence: `crates/umr-distribution/src/lib.rs`)
- Catalog and verification → Support reports: generates reports (evidence: `crates/umr-distribution/src/lib.rs`)
- iOS backend → Remote iOS stream: supports remote stream
