# rock-lab-private-limited/federaidemobile architecture

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

- Interactive diagram: https://gitdiagram.com/rock-lab-private-limited/federaidemobile
- Repository: https://github.com/rock-lab-private-limited/federaidemobile

## Overview

FederaideMobile is an Android app for running the Federaide harness locally, without cloud dependencies or subscriptions. The user interacts with the embedded harness interface in App.js; the app initializes a Termux environment, starts its Python stdio bridge, and routes harness interaction through the native module. The interface includes conversation, agent/task, keyring, and schedule controls. The sampled source confirms setup and bridge operations, but does not expose the full message protocol or implementation of those harness features, so uncertain internal wiring is omitted.

Main entry points: [`modules/termux-native/android/src/main/java/com/federaide/terminal/TermuxNativeModule.kt`](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/modules/termux-native/android/src/main/java/com/federaide/terminal/TermuxNativeModule.kt) (Termux native module), [`App.js`](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/App.js) (Harness interface), [`modules/termux-native/android/src/main/java/com/federaide/terminal/TermuxInstaller.kt`](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/modules/termux-native/android/src/main/java/com/federaide/terminal/TermuxInstaller.kt) (Environment installer), [`assets/bootstrap-aarch64.zip`](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/assets/bootstrap-aarch64.zip) (Termux bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Mobile interface"]
  node_app["Harness interface<br/>[App.js]"]
  node_chat["Conversations<br/>[App.js]"]
  node_agents["Agents and tasks<br/>[App.js]"]
  node_keyring["Keyring and schedules<br/>[App.js]"]
end

subgraph group_runtime["Local runtime"]
  node_installer["Environment installer<br/>[TermuxInstaller.kt]"]
  node_bootstrap["Termux bootstrap"]
  node_storage[("App files")]
  node_python["Python bridge"]
  node_installscript["Install script<br/>[install.sh]"]
  node_harness["Local harness"]
end

subgraph group_bridge["Native bridge"]
  node_native["Termux native module"]
end

node_user(("Mobile user"))

node_user -->|"uses"| node_app
node_app -->|"interacts with"| node_chat
node_app -->|"manages"| node_agents
node_app -->|"configures"| node_keyring
node_app -->|"calls native APIs"| node_native
node_native -->|"installs environment"| node_installer
node_installer -->|"unpacks"| node_bootstrap
node_installer -->|"writes rootfs"| node_storage
node_native -->|"copies assets"| node_storage
node_native -->|"starts bridge"| node_python
node_native -->|"copies script"| node_installscript
node_native -->|"launches process"| node_harness
node_chat -->|"sends interaction"| node_native

click node_app "https://github.com/rock-lab-private-limited/federaidemobile/blob/main/App.js"
click node_chat "https://github.com/rock-lab-private-limited/federaidemobile/blob/main/App.js"
click node_agents "https://github.com/rock-lab-private-limited/federaidemobile/blob/main/App.js"
click node_keyring "https://github.com/rock-lab-private-limited/federaidemobile/blob/main/App.js"
click node_native "https://github.com/rock-lab-private-limited/federaidemobile/blob/main/modules/termux-native/android/src/main/java/com/federaide/terminal/TermuxNativeModule.kt"
click node_installer "https://github.com/rock-lab-private-limited/federaidemobile/blob/main/modules/termux-native/android/src/main/java/com/federaide/terminal/TermuxInstaller.kt"
click node_bootstrap "https://github.com/rock-lab-private-limited/federaidemobile/blob/main/assets/bootstrap-aarch64.zip"
click node_python "https://github.com/rock-lab-private-limited/federaidemobile/blob/main/assets/mobile_bridge_termux.py"
click node_installscript "https://github.com/rock-lab-private-limited/federaidemobile/blob/main/assets/install.sh"

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_app,node_chat,node_agents,node_keyring,node_user toneBlue
class node_installer,node_bootstrap,node_storage,node_python,node_installscript,node_harness toneAmber
class node_native toneMint
```

## Components

### Mobile interface

- [Harness interface](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/App.js): `App.js`
- [Conversations](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/App.js): `App.js`
- [Agents and tasks](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/App.js): `App.js`
- [Keyring and schedules](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/App.js): `App.js`

### Local runtime

- [Environment installer](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/modules/termux-native/android/src/main/java/com/federaide/terminal/TermuxInstaller.kt): `modules/termux-native/android/src/main/java/com/federaide/terminal/TermuxInstaller.kt`
- [Termux bootstrap](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/assets/bootstrap-aarch64.zip): `assets/bootstrap-aarch64.zip`
- **App files**
- [Python bridge](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/assets/mobile_bridge_termux.py): `assets/mobile_bridge_termux.py`
- [Install script](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/assets/install.sh): `assets/install.sh`
- **Local harness**

### Native bridge

- [Termux native module](https://github.com/rock-lab-private-limited/federaidemobile/blob/main/modules/termux-native/android/src/main/java/com/federaide/terminal/TermuxNativeModule.kt): `modules/termux-native/android/src/main/java/com/federaide/terminal/TermuxNativeModule.kt`

### Other components

- **Mobile user**

## Connections

- Mobile user → Harness interface: uses
- Harness interface → Conversations: interacts with
- Harness interface → Agents and tasks: manages
- Harness interface → Keyring and schedules: configures
- Harness interface → Termux native module: calls native APIs
- Termux native module → Environment installer: installs environment
- Environment installer → Termux bootstrap: unpacks
- Environment installer → App files: writes rootfs
- Termux native module → App files: copies assets
- Termux native module → Python bridge: starts bridge
- Termux native module → Install script: copies script
- Termux native module → Local harness: launches process
- Conversations → Termux native module: sends interaction
