# jnsdias/wazetripper architecture

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

- Interactive diagram: https://gitdiagram.com/jnsdias/wazetripper
- Repository: https://github.com/jnsdias/wazetripper

## Overview

WazeTripper is a runtime integration added to a modified Waze app: Waze navigation events are translated into Tripper Pod display packets and sent over Bluetooth. The user can pair and configure the Pod through a floating button and panel; optional features include a GPS compass, call indicator, radar alerts, day/night mode, and trip-log export. The graph preserves the indexed runtime modules. Relationships are limited to source-index references and README statements; some integration details are not shown in the excerpts.

Main entry points: [`src/com/waze/wazetripper/TripperPanel.java`](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperPanel.java) (Control Panel), [`src/com/waze/wazetripper/TripperBridge.java`](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperBridge.java) (Bluetooth Bridge), [`src/com/waze/wazetripper/TripperNav.java`](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperNav.java) (Navigation State), [`src/com/waze/wazetripper/TripperOverlay.java`](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperOverlay.java) (Floating Button)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Waze UI"]
  node_overlay["Floating Button"]
  node_panel["Control Panel<br/>[TripperPanel.java]"]
  node_text["Panel Text<br/>[TripperText.java]"]
end

subgraph group_integration["Waze Integration"]
  node_hooks["Waze Hooks<br/>[NavHooks.java]"]
  node_bridge["Bluetooth Bridge<br/>[TripperBridge.java]"]
  node_call["Call Detection<br/>[TripperCall.java]"]
end

subgraph group_navigation["Navigation Features"]
  node_nav["Navigation State<br/>[TripperNav.java]"]
  node_compass["GPS Compass"]
  node_night["Waze Theme<br/>[TripperNight.java]"]
end

subgraph group_protocol["Pod Protocol"]
  node_protocol["Packet Encoding"]
  node_icons["Icon Data"]
end

subgraph group_state["Settings and Logs"]
  node_prefs["Preferences<br/>[TripperPrefs.java]"]
  node_logs["Trip Logs<br/>[TripperLog.java]"]
  node_version["Version Metadata<br/>[Version.java]"]
end

node_rider(("Rider"))
node_waze["Patched Waze"]
node_pod["Tripper Pod"]
node_android["Android Share"]

node_rider -->|"starts route"| node_waze
node_waze -.->|"provides events"| node_hooks
node_hooks -->|"forwards navigation"| node_nav
node_hooks -->|"records events"| node_logs
node_nav -->|"sends display data"| node_bridge
node_nav -->|"encodes maneuvers"| node_protocol
node_nav -->|"reads settings"| node_prefs
node_nav -->|"reads theme"| node_night
node_nav -->|"records trips"| node_logs
node_bridge -->|"communicates BLE"| node_pod
node_bridge -->|"queues packets"| node_protocol
node_bridge -->|"checks pairing"| node_prefs
node_bridge -.->|"handles call state"| node_call
node_call -->|"reports call state"| node_bridge
node_compass -->|"sends direction"| node_bridge
node_compass -->|"builds compass packets"| node_protocol
node_compass -->|"records status"| node_logs
node_rider -->|"opens controls"| node_overlay
node_overlay -->|"opens panel"| node_panel
node_overlay -->|"shows connection state"| node_bridge
node_overlay -->|"renders icon data"| node_icons
node_panel -->|"controls pairing"| node_bridge
node_panel -->|"updates settings"| node_prefs
node_panel -->|"loads translations"| node_text
node_panel -->|"exports trip logs"| node_logs
node_panel -->|"reads theme"| node_night
node_panel -->|"shows version"| node_version
node_panel -.->|"refreshes button"| node_overlay
node_panel -->|"shares exported log"| node_android
node_night -->|"records theme changes"| node_logs

click node_overlay "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperOverlay.java"
click node_panel "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperPanel.java"
click node_text "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperText.java"
click node_hooks "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/NavHooks.java"
click node_bridge "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperBridge.java"
click node_call "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperCall.java"
click node_nav "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperNav.java"
click node_compass "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/CompassManager.java"
click node_night "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperNight.java"
click node_protocol "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperProtocol.java"
click node_icons "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperIconData.java"
click node_prefs "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperPrefs.java"
click node_logs "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperLog.java"
click node_version "https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/Version.java"

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_overlay,node_panel,node_text toneBlue
class node_hooks,node_bridge,node_call toneAmber
class node_nav,node_compass,node_night toneMint
class node_protocol,node_icons toneRose
class node_prefs,node_logs,node_version,node_rider,node_waze,node_pod,node_android toneIndigo
```

## Components

### Waze UI

- [Floating Button](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperOverlay.java): `src/com/waze/wazetripper/TripperOverlay.java`
- [Control Panel](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperPanel.java): `src/com/waze/wazetripper/TripperPanel.java`
- [Panel Text](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperText.java): `src/com/waze/wazetripper/TripperText.java`

### Waze Integration

- [Waze Hooks](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/NavHooks.java): `src/com/waze/wazetripper/NavHooks.java`
- [Bluetooth Bridge](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperBridge.java): `src/com/waze/wazetripper/TripperBridge.java`
- [Call Detection](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperCall.java): `src/com/waze/wazetripper/TripperCall.java`

### Navigation Features

- [Navigation State](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperNav.java): `src/com/waze/wazetripper/TripperNav.java`
- [GPS Compass](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/CompassManager.java): `src/com/waze/wazetripper/CompassManager.java`
- [Waze Theme](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperNight.java): `src/com/waze/wazetripper/TripperNight.java`

### Pod Protocol

- [Packet Encoding](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperProtocol.java): `src/com/waze/wazetripper/TripperProtocol.java`
- [Icon Data](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperIconData.java): `src/com/waze/wazetripper/TripperIconData.java`

### Settings and Logs

- [Preferences](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperPrefs.java): `src/com/waze/wazetripper/TripperPrefs.java`
- [Trip Logs](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/TripperLog.java): `src/com/waze/wazetripper/TripperLog.java`
- [Version Metadata](https://github.com/jnsdias/wazetripper/blob/main/src/com/waze/wazetripper/Version.java): `src/com/waze/wazetripper/Version.java`

### Other components

- **Rider**
- **Patched Waze**
- **Tripper Pod**
- **Android Share**

## Connections

- Rider → Patched Waze: starts route (evidence: `README.md`)
- Patched Waze → Waze Hooks: provides events (evidence: `README.md`)
- Waze Hooks → Navigation State: forwards navigation (evidence: `src/com/waze/wazetripper/NavHooks.java`)
- Waze Hooks → Trip Logs: records events (evidence: `src/com/waze/wazetripper/NavHooks.java`)
- Navigation State → Bluetooth Bridge: sends display data (evidence: `src/com/waze/wazetripper/TripperNav.java`)
- Navigation State → Packet Encoding: encodes maneuvers (evidence: `src/com/waze/wazetripper/TripperNav.java`)
- Navigation State → Preferences: reads settings (evidence: `src/com/waze/wazetripper/TripperNav.java`)
- Navigation State → Waze Theme: reads theme (evidence: `src/com/waze/wazetripper/TripperNav.java`)
- Navigation State → Trip Logs: records trips (evidence: `src/com/waze/wazetripper/TripperNav.java`)
- Bluetooth Bridge → Tripper Pod: communicates BLE (evidence: `README.md`)
- Bluetooth Bridge → Packet Encoding: queues packets (evidence: `src/com/waze/wazetripper/TripperBridge.java`)
- Bluetooth Bridge → Preferences: checks pairing (evidence: `src/com/waze/wazetripper/TripperBridge.java`)
- Bluetooth Bridge → Call Detection: handles call state (evidence: `src/com/waze/wazetripper/TripperBridge.java`)
- Call Detection → Bluetooth Bridge: reports call state (evidence: `src/com/waze/wazetripper/TripperCall.java`)
- GPS Compass → Bluetooth Bridge: sends direction (evidence: `src/com/waze/wazetripper/CompassManager.java`)
- GPS Compass → Packet Encoding: builds compass packets (evidence: `src/com/waze/wazetripper/CompassManager.java`)
- GPS Compass → Trip Logs: records status (evidence: `src/com/waze/wazetripper/CompassManager.java`)
- Rider → Floating Button: opens controls (evidence: `README.md`)
- Floating Button → Control Panel: opens panel (evidence: `src/com/waze/wazetripper/TripperOverlay.java`)
- Floating Button → Bluetooth Bridge: shows connection state (evidence: `src/com/waze/wazetripper/TripperOverlay.java`)
- Floating Button → Icon Data: renders icon data (evidence: `src/com/waze/wazetripper/TripperOverlay.java`)
- Control Panel → Bluetooth Bridge: controls pairing (evidence: `src/com/waze/wazetripper/TripperPanel.java`)
- Control Panel → Preferences: updates settings (evidence: `src/com/waze/wazetripper/TripperPanel.java`)
- Control Panel → Panel Text: loads translations (evidence: `src/com/waze/wazetripper/TripperPanel.java`)
- Control Panel → Trip Logs: exports trip logs (evidence: `src/com/waze/wazetripper/TripperPanel.java`)
- Control Panel → Waze Theme: reads theme (evidence: `src/com/waze/wazetripper/TripperPanel.java`)
- Control Panel → Version Metadata: shows version (evidence: `src/com/waze/wazetripper/TripperPanel.java`)
- Control Panel → Floating Button: refreshes button (evidence: `src/com/waze/wazetripper/TripperPanel.java`)
- Control Panel → Android Share: shares exported log (evidence: `src/com/waze/wazetripper/TripperPanel.java`)
- Waze Theme → Trip Logs: records theme changes (evidence: `src/com/waze/wazetripper/TripperNight.java`)
