# abhi245y/ola-dash-sdk architecture

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

- Interactive diagram: https://gitdiagram.com/abhi245y/ola-dash-sdk
- Repository: https://github.com/abhi245y/ola-dash-sdk

## Overview

Ola Dash SDK is an Android scooter dashboard with runtime-loadable Slint themes and owner-enabled, display-only plugins. The primary workflow receives vehicle-parser callbacks through the Java bridge, transfers values to the Rust host, and renders the theme with host-owned safety UI; a theme’s trunk request is routed back through a safety gate. The README also documents plugin data, optional stock-media and passcode-unlock capabilities, session/CAN logging, and desktop theme preview. Some subsystems are documented but not fully represented in the supplied source excerpts, so those links are marked unverified.

Main entry points: [`host/src/lib.rs`](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/lib.rs) (Rust Slint Host), [`host/java/dev/olatool/dash/VehicleBridge.java`](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/VehicleBridge.java) (Vehicle Bridge), [`host/java/dev/olatool/dash/MainActivity.java`](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/MainActivity.java) (Android Activity), [`host/java/dev/olatool/dash/plugin/PluginHost.java`](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/plugin/PluginHost.java) (Plugin Host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_vehicle["Vehicle Interface"]
  node_vehicle_sdk["Vehicle Callback SDK"]
  node_bridge["Vehicle Bridge<br/>[VehicleBridge.java]"]
end

subgraph group_host["Host Runtime"]
  node_host_activity["Android Activity<br/>[MainActivity.java]"]
  node_rust_host["Rust Slint Host<br/>[lib.rs]"]
  node_safety["Safety Overlay<br/>[lib.rs]"]
  node_trunk_gate["Trunk Request Gate<br/>[TrunkGate.java]"]
  node_unlock["Unlock Controller"]
  node_profile["Profile Service Client"]
end

subgraph group_extensions["Themes And Plugins"]
  node_theme_load["Theme Loading<br/>[theme_root.rs]"]
  node_theme_options["Theme Options<br/>[theme_options.rs]"]
  node_theme_settings["Theme Settings<br/>[settings.rs]"]
  node_theme_switch["Theme Switching<br/>[theme_switch.rs]"]
  node_plugin_host["Plugin Host<br/>[PluginHost.java]"]
  node_stock_media["Built-in Media"]
  node_example_plugin["Example Plugin"]
  node_theme["Runtime Theme"]
end

subgraph group_support["Preview And Support"]
  node_trace["Session And CAN Logs<br/>[Trace.java]"]
  node_sim["Desktop Theme Preview<br/>[main.rs]"]
end

node_rider(("Scooter Rider"))
node_parser["Vehicle Parser"]
node_plugin_apks["Plugin APKs"]

node_parser -->|"sends callbacks"| node_bridge
node_bridge -.->|"implements callbacks"| node_vehicle_sdk
node_bridge -->|"passes JNI values"| node_rust_host
node_bridge -->|"logs callbacks"| node_trace
node_rider -.->|"uses dashboard"| node_host_activity
node_host_activity -->|"starts bridge"| node_bridge
node_rust_host -->|"loads theme"| node_theme_load
node_rust_host -->|"draws above theme"| node_safety
node_theme_load -->|"interprets at runtime"| node_theme
node_theme_options -->|"uses shared settings"| node_theme_settings
node_rust_host -.->|"configures options"| node_theme_options
node_rust_host -.->|"switches themes"| node_theme_switch
node_theme -->|"requests trunk"| node_rust_host
node_rust_host -->|"dispatches actions"| node_host_activity
node_host_activity -->|"forwards request"| node_bridge
node_bridge -.->|"checks conditions"| node_trunk_gate
node_plugin_host -->|"binds enabled plugins"| node_plugin_apks
node_plugin_apks -->|"publishes data"| node_plugin_host
node_host_activity -->|"starts host"| node_plugin_host
node_host_activity -->|"routes keypad input"| node_unlock
node_unlock -->|"authenticates passcode"| node_profile
node_plugin_host -->|"coordinates media"| node_stock_media
node_sim -->|"previews with mock data"| node_theme

click node_vehicle_sdk "https://github.com/abhi245y/ola-dash-sdk/tree/main/sdk/vehicle-interface/java/com/olaelectric/vehicleinterface"
click node_bridge "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/VehicleBridge.java"
click node_trace "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/Trace.java"
click node_host_activity "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/MainActivity.java"
click node_rust_host "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/lib.rs"
click node_theme_load "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/theme_root.rs"
click node_theme_options "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/theme_options.rs"
click node_theme_settings "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/settings.rs"
click node_theme_switch "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/theme_switch.rs"
click node_safety "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/lib.rs"
click node_trunk_gate "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/TrunkGate.java"
click node_plugin_host "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/plugin/PluginHost.java"
click node_stock_media "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/plugin/StockMediaService.java"
click node_example_plugin "https://github.com/abhi245y/ola-dash-sdk/blob/main/plugins/example-sysinfo/src/dev/olatool/dash/plugin/sysinfo/SysinfoService.java"
click node_unlock "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/UnlockController.java"
click node_profile "https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/ProfileService.java"
click node_sim "https://github.com/abhi245y/ola-dash-sdk/blob/main/sim/src/main.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_vehicle_sdk,node_bridge toneBlue
class node_host_activity,node_rust_host,node_safety,node_trunk_gate,node_unlock,node_profile toneAmber
class node_theme_load,node_theme_options,node_theme_settings,node_theme_switch,node_plugin_host,node_stock_media,node_example_plugin,node_theme toneMint
class node_trace,node_sim toneRose
class node_rider,node_parser,node_plugin_apks toneIndigo
```

## Components

### Vehicle Interface

- [Vehicle Callback SDK](https://github.com/abhi245y/ola-dash-sdk/tree/main/sdk/vehicle-interface/java/com/olaelectric/vehicleinterface): `sdk/vehicle-interface/java/com/olaelectric/vehicleinterface`
- [Vehicle Bridge](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/VehicleBridge.java): `host/java/dev/olatool/dash/VehicleBridge.java`

### Host Runtime

- [Android Activity](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/MainActivity.java): `host/java/dev/olatool/dash/MainActivity.java`
- [Rust Slint Host](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/lib.rs): `host/src/lib.rs`
- [Safety Overlay](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/lib.rs): `host/src/lib.rs`
- [Trunk Request Gate](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/TrunkGate.java): `host/java/dev/olatool/dash/TrunkGate.java`
- [Unlock Controller](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/UnlockController.java): `host/java/dev/olatool/dash/UnlockController.java`
- [Profile Service Client](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/ProfileService.java): `host/java/dev/olatool/dash/ProfileService.java`

### Themes And Plugins

- [Theme Loading](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/theme_root.rs): `host/src/theme_root.rs`
- [Theme Options](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/theme_options.rs): `host/src/theme_options.rs`
- [Theme Settings](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/settings.rs): `host/src/settings.rs`
- [Theme Switching](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/src/theme_switch.rs): `host/src/theme_switch.rs`
- [Plugin Host](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/plugin/PluginHost.java): `host/java/dev/olatool/dash/plugin/PluginHost.java`
- [Built-in Media](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/plugin/StockMediaService.java): `host/java/dev/olatool/dash/plugin/StockMediaService.java`
- [Example Plugin](https://github.com/abhi245y/ola-dash-sdk/blob/main/plugins/example-sysinfo/src/dev/olatool/dash/plugin/sysinfo/SysinfoService.java): `plugins/example-sysinfo/src/dev/olatool/dash/plugin/sysinfo/SysinfoService.java`
- **Runtime Theme**

### Preview And Support

- [Session And CAN Logs](https://github.com/abhi245y/ola-dash-sdk/blob/main/host/java/dev/olatool/dash/Trace.java): `host/java/dev/olatool/dash/Trace.java`
- [Desktop Theme Preview](https://github.com/abhi245y/ola-dash-sdk/blob/main/sim/src/main.rs): `sim/src/main.rs`

### Other components

- **Scooter Rider**
- **Vehicle Parser**
- **Plugin APKs**

## Connections

- Vehicle Parser → Vehicle Bridge: sends callbacks
- Vehicle Bridge → Vehicle Callback SDK: implements callbacks (evidence: `host/java/dev/olatool/dash/VehicleBridge.java`)
- Vehicle Bridge → Rust Slint Host: passes JNI values
- Vehicle Bridge → Session And CAN Logs: logs callbacks (evidence: `host/java/dev/olatool/dash/VehicleBridge.java`)
- Scooter Rider → Android Activity: uses dashboard
- Android Activity → Vehicle Bridge: starts bridge (evidence: `host/java/dev/olatool/dash/MainActivity.java`)
- Rust Slint Host → Theme Loading: loads theme (evidence: `host/src/lib.rs`)
- Rust Slint Host → Safety Overlay: draws above theme (evidence: `host/src/lib.rs`)
- Theme Loading → Runtime Theme: interprets at runtime
- Theme Options → Theme Settings: uses shared settings (evidence: `host/src/theme_options.rs`)
- Rust Slint Host → Theme Options: configures options (evidence: `host/src/lib.rs`)
- Rust Slint Host → Theme Switching: switches themes (evidence: `host/src/lib.rs`)
- Runtime Theme → Rust Slint Host: requests trunk
- Rust Slint Host → Android Activity: dispatches actions (evidence: `host/java/dev/olatool/dash/MainActivity.java`)
- Android Activity → Vehicle Bridge: forwards request (evidence: `host/java/dev/olatool/dash/MainActivity.java`)
- Vehicle Bridge → Trunk Request Gate: checks conditions (evidence: `host/java/dev/olatool/dash/VehicleBridge.java`)
- Plugin Host → Plugin APKs: binds enabled plugins
- Plugin APKs → Plugin Host: publishes data
- Android Activity → Plugin Host: starts host (evidence: `host/java/dev/olatool/dash/MainActivity.java`)
- Android Activity → Unlock Controller: routes keypad input (evidence: `host/java/dev/olatool/dash/MainActivity.java`)
- Unlock Controller → Profile Service Client: authenticates passcode (evidence: `host/java/dev/olatool/dash/UnlockController.java`)
- Plugin Host → Built-in Media: coordinates media (evidence: `host/java/dev/olatool/dash/plugin/PluginHost.java`)
- Desktop Theme Preview → Runtime Theme: previews with mock data
