# xmrtdao/mobilemonero architecture

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

- Interactive diagram: https://gitdiagram.com/xmrtdao/mobilemonero
- Repository: https://github.com/xmrtdao/mobilemonero

## Overview

MobileMonero is documented as an XMRT DAO fleet coordination hub, combining agent messaging, two mesh layers, cloud workers, and a dashboard. The principal workflow is an agent or cloud participant sending a fleet message through a relay or mesh and other agents receiving it; the README also documents heartbeat, task dispatch, discovery, and status capabilities. The graph preserves the separately substantial Jobby agent modules identified in the source index. Some worker and Jobby relationships are not shown in excerpts, so their connections are omitted rather than inferred.

Main entry points: [`relay/jobby/tools.mjs`](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/tools.mjs) (Jobby tools), [`src/App.tsx`](https://github.com/xmrtdao/mobilemonero/blob/main/src/App.tsx) (DAO dashboard), [`relay/jobby/store.mjs`](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/store.mjs) (Jobby persistence), [`mesh/mesh-node.py`](https://github.com/xmrtdao/mobilemonero/blob/main/mesh/mesh-node.py) (HTTP P2P node)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mesh["Fleet mesh"]
  node_gossip["Gossipsub mesh<br/>[mesh-router.mjs]"]
  node_httpmesh["HTTP P2P node<br/>[mesh-node.py]"]
  node_rustmesh["Rust mesh node<br/>[main.rs]"]
  node_meshbridge["Mesh cloud bridge"]
end

subgraph group_relay["Relays and workers"]
  node_vex["Vex relay<br/>[server.js]"]
  node_hermesmesh["Hermes mesh bridge<br/>[hermes-mesh.mjs]"]
  node_hermesworker["Hermes fleet worker<br/>[index.js]"]
  node_apigateway["API gateway<br/>[index.js]"]
  node_aigateway["AI gateway<br/>[index.js]"]
  node_fleetstatus["Fleet status<br/>[index.js]"]
  node_ticker["Price ticker<br/>[index.js]"]
  node_offline["Offline sync<br/>[index.js]"]
  node_inbox["Inbox worker<br/>[index.js]"]
end

subgraph group_dashboard["Hub dashboard"]
  node_dashboard["DAO dashboard<br/>[App.tsx]"]
  node_meshview["Mesh view<br/>[Mesh.tsx]"]
  node_settings["Settings view<br/>[Settings.tsx]"]
  node_ollama["Local AI chat<br/>[ollama-chat.ts]"]
  node_dashboardentry["Dashboard entry<br/>[main.tsx]"]
end

subgraph group_jobby["Jobby agent"]
  node_jobbytools["Jobby tools<br/>[tools.mjs]"]
  node_browser["Browser agent access<br/>[browser.mjs]"]
  node_dossier["Dossier edits<br/>[dossier.mjs]"]
  node_claim["Client claims<br/>[claim.mjs]"]
  node_merge["Dossier merging<br/>[dossier-merge.mjs]"]
  node_reconcile["Client reconciliation<br/>[reconcile.mjs]"]
  node_tracks["Job tracks<br/>[tracks.mjs]"]
  node_jobbychat["Jobby chat<br/>[chat.mjs]"]
  node_jobbystore["Jobby persistence<br/>[store.mjs]"]
  node_mailbox["Mailbox helpers<br/>[mailbox.mjs]"]
  node_google["Google Workspace<br/>[google.mjs]"]
  node_googlestore["Google account store<br/>[google-store.mjs]"]
end

node_agent(("Fleet agents"))
node_pg[("PostgreSQL")]

node_agent -->|"sends tasks"| node_vex
node_vex -->|"routes mesh requests"| node_gossip
node_agent -->|"publishes topics"| node_gossip
node_agent -->|"broadcasts fallback"| node_httpmesh
node_httpmesh -->|"bridges to cloud"| node_meshbridge
node_agent -->|"discovers peers"| node_rustmesh
node_agent -->|"sends fleet messages"| node_hermesworker
node_dashboardentry -->|"renders"| node_dashboard
node_dashboard -->|"renders"| node_meshview
node_dashboard -->|"renders"| node_settings
node_dashboard -.->|"offers local chat"| node_ollama
node_jobbytools -->|"checks and recovers"| node_browser
node_jobbytools -->|"edits dossiers"| node_dossier
node_jobbytools -->|"handles claims"| node_claim
node_jobbytools -->|"reconciles clients"| node_reconcile
node_jobbytools -->|"uses tracks"| node_tracks
node_jobbytools -.->|"serves chat"| node_jobbychat
node_jobbytools -->|"uses persistence"| node_jobbystore
node_jobbytools -->|"calls Workspace"| node_google
node_reconcile -->|"merges dossiers"| node_merge
node_jobbystore -->|"uses helpers"| node_mailbox
node_google -->|"loads account state"| node_googlestore
node_jobbystore -->|"reads and writes"| node_pg
node_googlestore -->|"reads and writes"| node_pg

click node_gossip "https://github.com/xmrtdao/mobilemonero/blob/main/relay/lib/mesh-router.mjs"
click node_httpmesh "https://github.com/xmrtdao/mobilemonero/blob/main/mesh/mesh-node.py"
click node_rustmesh "https://github.com/xmrtdao/mobilemonero/blob/main/mesh/src/main.rs"
click node_meshbridge "https://github.com/xmrtdao/mobilemonero/blob/main/mesh/mesh-fleet-bridge.py"
click node_vex "https://github.com/xmrtdao/mobilemonero/blob/main/relay/server.js"
click node_hermesmesh "https://github.com/xmrtdao/mobilemonero/blob/main/relay/hermes-mesh.mjs"
click node_hermesworker "https://github.com/xmrtdao/mobilemonero/blob/main/workers/hermes/src/index.js"
click node_apigateway "https://github.com/xmrtdao/mobilemonero/blob/main/workers/api-gateway/src/index.js"
click node_aigateway "https://github.com/xmrtdao/mobilemonero/blob/main/workers/ai-gateway/src/index.js"
click node_fleetstatus "https://github.com/xmrtdao/mobilemonero/blob/main/workers/fleet-status/src/index.js"
click node_ticker "https://github.com/xmrtdao/mobilemonero/blob/main/workers/1d-price-ticker/src/index.js"
click node_offline "https://github.com/xmrtdao/mobilemonero/blob/main/workers/2b-offline-sync/src/index.js"
click node_inbox "https://github.com/xmrtdao/mobilemonero/blob/main/workers/inbox/src/index.js"
click node_dashboard "https://github.com/xmrtdao/mobilemonero/blob/main/src/App.tsx"
click node_meshview "https://github.com/xmrtdao/mobilemonero/blob/main/src/tabs/Mesh.tsx"
click node_settings "https://github.com/xmrtdao/mobilemonero/blob/main/src/tabs/Settings.tsx"
click node_ollama "https://github.com/xmrtdao/mobilemonero/blob/main/src/lib/ollama-chat.ts"
click node_jobbytools "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/tools.mjs"
click node_browser "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/browser.mjs"
click node_dossier "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/dossier.mjs"
click node_claim "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/claim.mjs"
click node_merge "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/dossier-merge.mjs"
click node_reconcile "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/reconcile.mjs"
click node_tracks "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/tracks.mjs"
click node_jobbychat "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/chat.mjs"
click node_jobbystore "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/store.mjs"
click node_mailbox "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/mailbox.mjs"
click node_google "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/google.mjs"
click node_googlestore "https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/google-store.mjs"
click node_dashboardentry "https://github.com/xmrtdao/mobilemonero/blob/main/src/main.tsx"

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_gossip,node_httpmesh,node_rustmesh,node_meshbridge toneBlue
class node_vex,node_hermesmesh,node_hermesworker,node_apigateway,node_aigateway,node_fleetstatus,node_ticker,node_offline,node_inbox,node_pg toneAmber
class node_dashboard,node_meshview,node_settings,node_ollama,node_dashboardentry toneMint
class node_jobbytools,node_browser,node_dossier,node_claim,node_merge,node_reconcile,node_tracks,node_jobbychat,node_jobbystore,node_mailbox,node_google,node_googlestore toneRose
class node_agent toneIndigo
```

## Components

### Fleet mesh

- [Gossipsub mesh](https://github.com/xmrtdao/mobilemonero/blob/main/relay/lib/mesh-router.mjs): `relay/lib/mesh-router.mjs`
- [HTTP P2P node](https://github.com/xmrtdao/mobilemonero/blob/main/mesh/mesh-node.py): `mesh/mesh-node.py`
- [Rust mesh node](https://github.com/xmrtdao/mobilemonero/blob/main/mesh/src/main.rs): `mesh/src/main.rs`
- [Mesh cloud bridge](https://github.com/xmrtdao/mobilemonero/blob/main/mesh/mesh-fleet-bridge.py): `mesh/mesh-fleet-bridge.py`

### Relays and workers

- [Vex relay](https://github.com/xmrtdao/mobilemonero/blob/main/relay/server.js): `relay/server.js`
- [Hermes mesh bridge](https://github.com/xmrtdao/mobilemonero/blob/main/relay/hermes-mesh.mjs): `relay/hermes-mesh.mjs`
- [Hermes fleet worker](https://github.com/xmrtdao/mobilemonero/blob/main/workers/hermes/src/index.js): `workers/hermes/src/index.js`
- [API gateway](https://github.com/xmrtdao/mobilemonero/blob/main/workers/api-gateway/src/index.js): `workers/api-gateway/src/index.js`
- [AI gateway](https://github.com/xmrtdao/mobilemonero/blob/main/workers/ai-gateway/src/index.js): `workers/ai-gateway/src/index.js`
- [Fleet status](https://github.com/xmrtdao/mobilemonero/blob/main/workers/fleet-status/src/index.js): `workers/fleet-status/src/index.js`
- [Price ticker](https://github.com/xmrtdao/mobilemonero/blob/main/workers/1d-price-ticker/src/index.js): `workers/1d-price-ticker/src/index.js`
- [Offline sync](https://github.com/xmrtdao/mobilemonero/blob/main/workers/2b-offline-sync/src/index.js): `workers/2b-offline-sync/src/index.js`
- [Inbox worker](https://github.com/xmrtdao/mobilemonero/blob/main/workers/inbox/src/index.js): `workers/inbox/src/index.js`

### Hub dashboard

- [DAO dashboard](https://github.com/xmrtdao/mobilemonero/blob/main/src/App.tsx): `src/App.tsx`
- [Mesh view](https://github.com/xmrtdao/mobilemonero/blob/main/src/tabs/Mesh.tsx): `src/tabs/Mesh.tsx`
- [Settings view](https://github.com/xmrtdao/mobilemonero/blob/main/src/tabs/Settings.tsx): `src/tabs/Settings.tsx`
- [Local AI chat](https://github.com/xmrtdao/mobilemonero/blob/main/src/lib/ollama-chat.ts): `src/lib/ollama-chat.ts`
- [Dashboard entry](https://github.com/xmrtdao/mobilemonero/blob/main/src/main.tsx): `src/main.tsx`

### Jobby agent

- [Jobby tools](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/tools.mjs): `relay/jobby/tools.mjs`
- [Browser agent access](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/browser.mjs): `relay/jobby/browser.mjs`
- [Dossier edits](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/dossier.mjs): `relay/jobby/dossier.mjs`
- [Client claims](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/claim.mjs): `relay/jobby/claim.mjs`
- [Dossier merging](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/dossier-merge.mjs): `relay/jobby/dossier-merge.mjs`
- [Client reconciliation](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/reconcile.mjs): `relay/jobby/reconcile.mjs`
- [Job tracks](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/tracks.mjs): `relay/jobby/tracks.mjs`
- [Jobby chat](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/chat.mjs): `relay/jobby/chat.mjs`
- [Jobby persistence](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/store.mjs): `relay/jobby/store.mjs`
- [Mailbox helpers](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/mailbox.mjs): `relay/jobby/mailbox.mjs`
- [Google Workspace](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/google.mjs): `relay/jobby/google.mjs`
- [Google account store](https://github.com/xmrtdao/mobilemonero/blob/main/relay/jobby/google-store.mjs): `relay/jobby/google-store.mjs`

### Other components

- **Fleet agents**
- **PostgreSQL**

## Connections

- Fleet agents → Vex relay: sends tasks
- Vex relay → Gossipsub mesh: routes mesh requests
- Fleet agents → Gossipsub mesh: publishes topics
- Fleet agents → HTTP P2P node: broadcasts fallback
- HTTP P2P node → Mesh cloud bridge: bridges to cloud
- Fleet agents → Rust mesh node: discovers peers
- Fleet agents → Hermes fleet worker: sends fleet messages
- Dashboard entry → DAO dashboard: renders (evidence: `src/main.tsx`)
- DAO dashboard → Mesh view: renders (evidence: `src/App.tsx`)
- DAO dashboard → Settings view: renders (evidence: `src/App.tsx`)
- DAO dashboard → Local AI chat: offers local chat
- Jobby tools → Browser agent access: checks and recovers (evidence: `relay/jobby/tools.mjs`)
- Jobby tools → Dossier edits: edits dossiers (evidence: `relay/jobby/tools.mjs`)
- Jobby tools → Client claims: handles claims (evidence: `relay/jobby/tools.mjs`)
- Jobby tools → Client reconciliation: reconciles clients (evidence: `relay/jobby/tools.mjs`)
- Jobby tools → Job tracks: uses tracks (evidence: `relay/jobby/tools.mjs`)
- Jobby tools → Jobby chat: serves chat
- Jobby tools → Jobby persistence: uses persistence (evidence: `relay/jobby/tools.mjs`)
- Jobby tools → Google Workspace: calls Workspace (evidence: `relay/jobby/tools.mjs`)
- Client reconciliation → Dossier merging: merges dossiers (evidence: `relay/jobby/reconcile.mjs`)
- Jobby persistence → Mailbox helpers: uses helpers (evidence: `relay/jobby/store.mjs`)
- Google Workspace → Google account store: loads account state (evidence: `relay/jobby/google.mjs`)
- Jobby persistence → PostgreSQL: reads and writes (evidence: `relay/jobby/store.mjs`)
- Google account store → PostgreSQL: reads and writes (evidence: `relay/jobby/google-store.mjs`)
