# chrisle/rbxport architecture

> Architecture diagram of the GitHub repository chrisle/rbxport, 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/chrisle/rbxport
- Repository: https://github.com/chrisle/rbxport

## Overview

rbxport is a desktop music-library manager focused on rekordbox-compatible library browsing, USB export, audio playback, and PRO DJ LINK. The main workflow runs from the React interface through typed IPC into the Tauri/Rust backend, where library and export crates implement domain operations. The graph preserves analysis, backup, device, and networking capabilities visible in the repository map. Several Rust subsystems are unsampled, so their internal links are omitted or marked unverified rather than inferred as definite calls.

Main entry points: [`src-tauri/src/commands.rs`](https://github.com/chrisle/rbxport/blob/main/src-tauri/src/commands.rs) (Backend commands), [`src/ipc/client.ts`](https://github.com/chrisle/rbxport/blob/main/src/ipc/client.ts) (IPC client), [`src/app/App.tsx`](https://github.com/chrisle/rbxport/blob/main/src/app/App.tsx) (Main interface), [`src-tauri/src/lib.rs`](https://github.com/chrisle/rbxport/blob/main/src-tauri/src/lib.rs) (Command shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app["Main interface<br/>[App.tsx]"]
  node_tracktable["Track browser<br/>[TrackTable.tsx]"]
  node_syncui["USB sync<br/>[SyncManager.tsx]"]
  node_previewui["Waveform preview"]
  node_playbackui["Deck controls<br/>[usePlayback.ts]"]
  node_ipc["IPC client<br/>[client.ts]"]
end

subgraph group_shell["Tauri backend"]
  node_shell["Command shell<br/>[lib.rs]"]
  node_commands["Backend commands<br/>[commands.rs]"]
  node_device["Device library<br/>[device_library.rs]"]
  node_preview["Preview service<br/>[preview.rs]"]
end

subgraph group_library["Library and export"]
  node_analysis["Track analysis<br/>[analysis.rs]"]
  node_db[("Library database<br/>[write.rs]")]
  node_catalog["Network catalog<br/>[catalog.rs]"]
  node_session["DB sessions<br/>[session.rs]"]
  node_usb["USB export<br/>[lib.rs]"]
  node_backup["Library backup<br/>[lib.rs]"]
end

subgraph group_media["Playback and networking"]
  node_deck["Audio engine<br/>[deck.rs]"]
  node_link["PRO DJ LINK<br/>[beacon.rs]"]
  node_prolink["Player networking<br/>[lib.rs]"]
end

node_user(("Music manager"))

node_user -->|"manages library"| node_app
node_app -.->|"requests operations"| node_ipc
node_tracktable -.->|"loads track data"| node_ipc
node_syncui -->|"requests device actions"| node_ipc
node_previewui -->|"fetches waveform"| node_ipc
node_playbackui -->|"controls decks"| node_ipc
node_ipc -->|"invokes commands"| node_shell
node_shell -->|"registers handlers"| node_commands
node_commands -.->|"accesses library"| node_db
node_commands -.->|"runs analysis"| node_analysis
node_commands -.->|"exports library"| node_usb
node_device -.->|"uses export logic"| node_usb
node_session -->|"uses catalog"| node_catalog
node_catalog -.->|"reads library"| node_db
node_commands -.->|"backs up library"| node_backup
node_commands -.->|"controls playback"| node_deck
node_commands -.->|"serves preview"| node_preview
node_commands -.->|"coordinates players"| node_link
node_link -.->|"uses protocol"| node_prolink

click node_app "https://github.com/chrisle/rbxport/blob/main/src/app/App.tsx"
click node_tracktable "https://github.com/chrisle/rbxport/blob/main/src/views/browser/TrackTable.tsx"
click node_syncui "https://github.com/chrisle/rbxport/blob/main/src/views/sync/SyncManager.tsx"
click node_previewui "https://github.com/chrisle/rbxport/blob/main/src/views/browser/WaveformPreview.tsx"
click node_playbackui "https://github.com/chrisle/rbxport/blob/main/src/store/usePlayback.ts"
click node_ipc "https://github.com/chrisle/rbxport/blob/main/src/ipc/client.ts"
click node_shell "https://github.com/chrisle/rbxport/blob/main/src-tauri/src/lib.rs"
click node_commands "https://github.com/chrisle/rbxport/blob/main/src-tauri/src/commands.rs"
click node_analysis "https://github.com/chrisle/rbxport/blob/main/src-tauri/src/analysis.rs"
click node_db "https://github.com/chrisle/rbxport/blob/main/crates/rbl-db/src/write.rs"
click node_catalog "https://github.com/chrisle/rbxport/blob/main/crates/rbl-dbserver/src/catalog.rs"
click node_session "https://github.com/chrisle/rbxport/blob/main/crates/rbl-dbserver/src/session.rs"
click node_usb "https://github.com/chrisle/rbxport/blob/main/crates/rbl-export/src/lib.rs"
click node_device "https://github.com/chrisle/rbxport/blob/main/src-tauri/src/device_library.rs"
click node_backup "https://github.com/chrisle/rbxport/blob/main/crates/rbl-backup/src/lib.rs"
click node_deck "https://github.com/chrisle/rbxport/blob/main/crates/rbl-deck/src/deck.rs"
click node_preview "https://github.com/chrisle/rbxport/blob/main/src-tauri/src/preview.rs"
click node_link "https://github.com/chrisle/rbxport/blob/main/crates/rbl-link/src/beacon.rs"
click node_prolink "https://github.com/chrisle/rbxport/blob/main/crates/rbl-prolink/src/lib.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_app,node_tracktable,node_syncui,node_previewui,node_playbackui,node_ipc toneBlue
class node_shell,node_commands,node_device,node_preview toneAmber
class node_analysis,node_db,node_catalog,node_session,node_usb,node_backup toneMint
class node_deck,node_link,node_prolink toneRose
class node_user toneIndigo
```

## Components

### Desktop interface

- [Main interface](https://github.com/chrisle/rbxport/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Track browser](https://github.com/chrisle/rbxport/blob/main/src/views/browser/TrackTable.tsx): `src/views/browser/TrackTable.tsx`
- [USB sync](https://github.com/chrisle/rbxport/blob/main/src/views/sync/SyncManager.tsx): `src/views/sync/SyncManager.tsx`
- [Waveform preview](https://github.com/chrisle/rbxport/blob/main/src/views/browser/WaveformPreview.tsx): `src/views/browser/WaveformPreview.tsx`
- [Deck controls](https://github.com/chrisle/rbxport/blob/main/src/store/usePlayback.ts): `src/store/usePlayback.ts`
- [IPC client](https://github.com/chrisle/rbxport/blob/main/src/ipc/client.ts): `src/ipc/client.ts`

### Tauri backend

- [Command shell](https://github.com/chrisle/rbxport/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Backend commands](https://github.com/chrisle/rbxport/blob/main/src-tauri/src/commands.rs): `src-tauri/src/commands.rs`
- [Device library](https://github.com/chrisle/rbxport/blob/main/src-tauri/src/device_library.rs): `src-tauri/src/device_library.rs`
- [Preview service](https://github.com/chrisle/rbxport/blob/main/src-tauri/src/preview.rs): `src-tauri/src/preview.rs`

### Library and export

- [Track analysis](https://github.com/chrisle/rbxport/blob/main/src-tauri/src/analysis.rs): `src-tauri/src/analysis.rs`
- [Library database](https://github.com/chrisle/rbxport/blob/main/crates/rbl-db/src/write.rs): `crates/rbl-db/src/write.rs`
- [Network catalog](https://github.com/chrisle/rbxport/blob/main/crates/rbl-dbserver/src/catalog.rs): `crates/rbl-dbserver/src/catalog.rs`
- [DB sessions](https://github.com/chrisle/rbxport/blob/main/crates/rbl-dbserver/src/session.rs): `crates/rbl-dbserver/src/session.rs`
- [USB export](https://github.com/chrisle/rbxport/blob/main/crates/rbl-export/src/lib.rs): `crates/rbl-export/src/lib.rs`
- [Library backup](https://github.com/chrisle/rbxport/blob/main/crates/rbl-backup/src/lib.rs): `crates/rbl-backup/src/lib.rs`

### Playback and networking

- [Audio engine](https://github.com/chrisle/rbxport/blob/main/crates/rbl-deck/src/deck.rs): `crates/rbl-deck/src/deck.rs`
- [PRO DJ LINK](https://github.com/chrisle/rbxport/blob/main/crates/rbl-link/src/beacon.rs): `crates/rbl-link/src/beacon.rs`
- [Player networking](https://github.com/chrisle/rbxport/blob/main/crates/rbl-prolink/src/lib.rs): `crates/rbl-prolink/src/lib.rs`

### Other components

- **Music manager**

## Connections

- Music manager → Main interface: manages library (evidence: `README.md`)
- Main interface → IPC client: requests operations (evidence: `src/app/App.tsx`)
- Track browser → IPC client: loads track data
- USB sync → IPC client: requests device actions (evidence: `src/views/sync/SyncManager.tsx`)
- Waveform preview → IPC client: fetches waveform (evidence: `src/views/browser/WaveformPreview.tsx`)
- Deck controls → IPC client: controls decks (evidence: `src/store/usePlayback.ts`)
- IPC client → Command shell: invokes commands (evidence: `src/ipc/client.ts`)
- Command shell → Backend commands: registers handlers (evidence: `src-tauri/src/lib.rs`)
- Backend commands → Library database: accesses library
- Backend commands → Track analysis: runs analysis
- Backend commands → USB export: exports library
- Device library → USB export: uses export logic
- DB sessions → Network catalog: uses catalog (evidence: `crates/rbl-dbserver/src/session.rs`)
- Network catalog → Library database: reads library
- Backend commands → Library backup: backs up library
- Backend commands → Audio engine: controls playback
- Backend commands → Preview service: serves preview
- Backend commands → PRO DJ LINK: coordinates players
- PRO DJ LINK → Player networking: uses protocol
