1.7 KiB
Clients
A client is anything that drives the server. Every client speaks the same gRPC service (see Architecture): it sends commands (browse the library, change the queue, control playback) and subscribes to the update stream that pushes the current queue, play state, track position, output level and mute, capture progress, and the frequency spectrum as they change. Nothing is polled — each client redraws from the pushed updates, so several clients driving one server always agree on what is playing.
Because the contract is one shared service, the clients are the same program wearing different skins. They differ only in how you interact with them, not in what they can do.
direction: right
server: crabidy-server {
shape: rectangle
}
tui: cbd-tui (terminal)
web: cbd-web (browser)
cbd: cbd (server + TUI)
cli: CLI subcommands
tui -> server: gRPC
web -> server: gRPC-web
cli -> server: gRPC (one-shot)
cbd -> server: localhost gRPC
- Terminal UI — cbd-tui — the ratatui/crossterm terminal client, driven by vim-style keys.
- Web client — cbd-web — a Leptos/WASM browser client with the same functionality, served by the server itself.
- The cbd bundle — server and terminal client in one process for the single-machine case.
- Command line — every binary is also a clap CLI;
the
library/queue/globalsubcommands are a scriptable remote control.
All clients authenticate the same way, using the role name as the basic-auth user (see Roles and authorization). Connection defaults live in each client's own config file (see Configuration).