Bobine team documentation
bobine-collaboration
Documentation and work tracking shared by the Bobine team.
Status, Roadmap, Decisions, Rules
Read online: docs.bobine.fit
Backup copy: GitLab
Start here
Read docs/overview.md, then docs/status.md. The roadmap lists the work left; the work folder holds the plan of each work package in progress. COLLABORATION.md holds the rules every change follows, in every repository.
Contents
| Path | Content |
|---|---|
| docs/overview.md | what Bobine is, how it is built, the behaviors that must not break |
| docs/repositories.md | every repository, what it holds, how it is protected |
| docs/status.md | current state, pending decisions, what is not verified |
| docs/roadmap.md | work left, in order |
| docs/decisions.md | decisions in force, one line each |
| docs/releases/ | one page per published Stable release |
| docs/maintainer.md | what only the maintainer can do |
| docs/work/ | plans of the work packages in progress |
| docs/procedures/ | how to do one task, one file each |
| docs/reference/ | lasting technical facts, one file per subject |
| notes/ | meeting notes |
Working together
Ask, propose or report through an issue. Change a document through a pull request, one subject each. See CONTRIBUTING.md.
Repositories
| Repository | Content |
|---|---|
| application | |
| website, bobine.fit | |
| package repositories, packages.bobine.fit | |
| Homebrew tap | |
| security contact page, security.bobine.fit |
License
MIT: LICENSE. Report a vulnerability as described in SECURITY.md.
Overview
Bobine is offline-first video playout, member kiosk, coach console and club radio for gyms and studios. One machine on the local network drives the screens and the sound of the rooms: pre-recorded classes, a coach screen, a cinema mode, a radio and signage loops, scheduled or driven by hand. No account, no telemetry. It ships for Linux, Windows, macOS, Android and Android TV, with a command line, bobine, that does everything the interface does. License: AGPL-3.0.
How it is built
| Part | Content |
|---|---|
| backend | Python, one Uvicorn process and SQLite; domain packages under backend/app (playback, radio, signage, scheduling, outputs, catalog, updates, inputs, network, storage) |
| frontend | Next.js exported as static files and served by the backend; one folder per page under components/, shared helpers under lib/ |
| command line | bobine, a pure HTTP client declared as data under cli/specs/, standard library only |
| native components | Rust crates run as child processes speaking bounded line-delimited JSON: media (metadata, covers, video probe), devices (screens, audio, remotes and gamepads), projector (screen window) |
| Android | a Kotlin shell around a WebView, with the backend embedded through Chaquopy |
| media tools | ffmpeg and ffprobe, bundled per platform |
Every route has its bobine command, or a recorded reason why not. Bounds and shared lists live in api/contract.py; errors read {code, message} with 404, 409 and 422; lists take limit and offset and return X-Total-Count. A route or command change regenerates the reference in docs/reference of the Bobine repository, copied to the website.
Outputs and screens
Three fixed, isolated outputs: Wired (cable), Network 1 (network) and Network 2 (network_2). Each has one active mode at a time: classes (kiosk), cinema, radio or signage; the coach screen exists on Wired only. A device is set once to /screen/?output=ID and follows the mode of its output.
Behaviors that must not break
| Area | Rule |
|---|---|
| Video position | follows the server clock, never a screen report; playbackRate correction (plus or minus 5 percent) on mirror screens only, the primary screen stays at exactly 1.0; one seek beyond 2 s of drift, never periodic seeks |
| Sound | on /radio, native audio without an AudioContext while the sound settings are neutral; a video sound goes through Web Audio only when its output sound is not neutral; one safety limiter with a soft ceiling |
| Schedule | a class follows wall-clock time and is never restarted after a manual stop, a replacement, a cancellation or a manual playback |
| Browsers | feature detection, never the user agent; every stream route answers Range, If-Range, 416 and ETag; no /api route returns HTML; the original video is never modified |
| Updates | Stable compares versions, Beta and Canary compare commits; SHA-256 required; a scheduled update waits for the end of playback; no automatic rollback |
| Configuration | JSON export and import per family, uid as identity, atomic apply, dry run by default, prune only on request |
| Network | port 1903, fallback 1904 to 1913; mDNS name bobine.local, then bobine-2 to bobine-9; every action goes through REST, never WebSocket alone |
| Privacy | zero telemetry, enforced by a test |
Trust model
Bobine trusts the local network and has no accounts or passwords. Clients outside the private networks are refused, even behind a proxy, unless allowed by BOBINE_ALLOWED_NETWORKS; untrusted hosts are refused, so DNS rebinding reads and writes nothing; writes and WebSockets are accepted from the same origin only. Access from outside the local network is outside the model and would require an authentication decided by the maintainer. Details: reference/threat-model.md.
Channels
Stable is a tag VX.Y.Z; Beta and Canary are rolling tags rebuilt from main. Every code push to main publishes a Canary; a documentation-only commit builds nothing. VERSION in the Bobine repository is the single source of the version.
Status
Last update: 2026-12-05. Checked against Bobine main at 129fbb60 (pull request 517).
Bobine 6.0.0 is the latest Stable, released on 2026-11-29: three isolated outputs with the radio as a mode of each, visuals, timeline previews. It passed the test suite and an isolated test server; it was not validated in full on real hardware. See releases/6.0.0.md. main is at 7.0.0 and publishes Beta on demand and Canary on every code push; 6.0.1 was never published. The APT, DNF and pacman repositories and the Homebrew cask serve 6.0.0; the GitLab copies of every repository are in service.
Next
- Performance: L9, an in-memory store per API route in the persistent layout, then A8, a Cargo workspace with a shared protocol crate. See work/performance.md and work/responsiveness.md.
- Features: M6 (one SQLite FTS5 search engine), M7 (parity inventory of every button, field and gesture against routes and commands), M15 (notifications), M16 (system tray), field reports T18 to T20 and T23. See roadmap.md and work/field-reports.md.
- Channels: the winget pull request, an AUR package prepared without pushing, a study of Termux and Crostini.
- Hardware validation of everything marked not validated below.
- A full audit, then a redesign of the interface with the maintainer.
Breaking changes waiting for 7.0.0
A resumed upload that conflicts (409) answers {“detail”: {“code”: “offset_mismatch”, “message”, “offset”, “size”}} instead of offset at the root. The WebSocket event command_rejected carries code and message instead of reason. Two radio windows of the same output can no longer overlap (409 schedule_overlap, configuration import refused). They go into the 7.0.0 release notes, with the default wait between two classes, 10 s in 6.0.0 and 0 s on main.
Pending decisions
None open on the application. Windows Authenticode and macOS Developer ID signing and notarization: later. The winget pull request microsoft/winget-pkgs#472096 for 6.0.0 still waits at Microsoft.
Not verified on real hardware
| Item | Proof so far |
|---|---|
| native remote and gamepad input on Windows and macOS | unit tests, CI build |
| USB or IR remote on Linux | virtual uinput gamepad, udevadm test |
| physical gamepad on Android TV | none: adb injection does not create a gamepad |
| mDNS name probing between two Android devices | multicast resolution on a desktop with the same wheel |
| Android image decoding on two devices | emulator |
| native video probe timing on a TV | desktop measurement |
| TV screen kept on during a class (T24) | diagnostic shipped |
Known defects
app/utils/watcher.py emits library_change without notify_library: storyboards wait for the next restart. The Windows ffmpeg build is pinned in packaging/windows/ffmpeg.lock.json and is renewed at the end of each month.
Roadmap
Work left, in order. A finished item leaves this page; what remains to test goes to maintainer.md.
| Order | Work | Where |
|---|---|---|
| 1 | Performance: L9 (route store, prefetch on hover or idle), A8 (Cargo workspace native/ with a shared protocol crate); A10 waits for hardware | work/performance.md, work/responsiveness.md |
| 2 | M6: one search engine on SQLite FTS5 (folding, bm25 ranking, facets, highlighting), the interface holds no search logic; one table of cases shared by pytest and node –test | Bobine |
| 3 | M7: tooled parity inventory of buttons, fields and gestures against routes and bobine, HEAD and /ws/playback included | Bobine |
| 4 | M15: notifications from a server catalog of events, native channels on Windows, Freedesktop, macOS and Android, logged fallback | Bobine |
| 5 | M16: system tray with icons generated from the logo, translated quick actions, live state on the three desktop systems, a throwaway profile for kiosk mode | Bobine |
| 6 | Field reports T18 (no absolute path in the API), T19 (video conversion on Android), T20 (USB access per volume), T23 (audio and video offset on a TV) | work/field-reports.md |
| 7 | Channels: winget, AUR prepared without pushing, Termux and Crostini studied | Bobine |
| 8 | Hardware validation on real devices | procedures/hardware-validation.md |
| 9 | Full audit, then interface and experience redesign with the maintainer (icons, logo, interface) | maintainer |
Decisions
Decisions in force, one line each. P is product, T is technical. A replaced decision is removed; its replacement says so.
Product
| Number | Decision | Set aside |
|---|---|---|
| P2 | Trusted local network: no PIN, session or pairing; command line without a token; writes from the same origin, host checked | PIN, command line token |
| P3 | Trusted Wi-Fi: any client address of the local networks is accepted, VPN included; another origin is refused | private ranges only |
| P4 | Archive extraction without a size cap; .7z only if a wheel exists on every profile | a cap, a partial native reader |
| P5 | Android Wi-Fi lock WIFI_MODE_FULL_LOW_LATENCY | HIGH_PERF |
| P6 | No Service Worker: memory cache and client navigation | Service Worker, inactive over plain HTTP on an IP |
| P8 | bobine.local without a port: a port 80 listener in the process on Windows and macOS, not on Linux or Android | system NAT |
| P9 | Full JSON export and import per family (command line, API, interface); machine settings apart | a single file |
| P10 | Parity of interface, command line and API; an outside agent uses HTTP without Origin | |
| P11 | Language set in Settings, applied at start | hot reload |
| P12 | Simplified interface mode (hides coach, metrics, logs), in JSON and command line too | a separate light build |
| P13 | System tray on Windows, macOS and Linux: quick actions with API and command parity, icon without background | a reduced menu |
| P14 | Cinema: title and description without a frame at the top left; themes without gradients | centered frame, gradients |
| P15 | bobine-packages, BobineWeb and homebrew-bobine published for reading only | AGPL |
| P19 | Wi-Fi left to the native system settings | managing Wi-Fi from Bobine |
| P22 | Minimal bobine.fit in French and English: home, commands, API, legal, security, install.ps1; GitHub and GitLab marks in header and footer | blog, extra documentation |
| P23 | Signage plays in the web engine (preload, double buffer); conversion at import (WebP or PNG, MP4) | a native Rust player |
| P25 | Favicon and web manifest per channel; right-click shortcuts from one list (app/quick_actions.py) | a favicon per screen |
| P26 | Visuals apart from coach backgrounds, on one core (app/media_assets/): /api/backgrounds and /api/visuals | visuals inside coach backgrounds |
| P27 | Devices page lists devices only (audio, Bluetooth); sound, mixing and equalizer live in Settings, Sound | a Sound view under Devices |
| P28 | Timeline preview from a background JPEG mosaic (storyboard on key frames, one tile per 10 s at least, 240 at most); double press left or right jumps chapters | a second decoding player |
| P29 | AVIF and HEIC without a new dependency: ffmpeg 7.1 or later on desktop, ImageDecoder on Android | pillow-heif |
| P30 | Settings as a tree on the right (General, Playback, System); no delay between two classes by default | tabs, a tree on the left |
| P31 | Updates: none scheduled on Android and TV; macOS checks codesign –verify –deep –strict, then installs through an administrator prompt | silent rsync |
| P32 | Three fixed isolated outputs (Wired, Network 1, Network 2), one active mode each (classes, cinema, signage, radio; coach on Wired only), one radio per output; /api/outputs, bobine output, /screen/?output= | a separate radio, video and radio at once |
| P33 | Versions X.Y.Z under the OpenSSL policy, never going back; title Bobine X.Y.Z (YYYY-MM-DD) set by CI, tags and packages without date | a date in the number, restarting at 1.0.0 |
| P34 | A public GitLab backup copy per repository (branches, tags, releases), pushed from GitHub Actions, named on one line at the top of each README | a GitLab runner, a paid pull mirror |
| P35 | Android without Pillow: ImageDecoder, Bitmap.compress, Canvas, ffmpeg for TIFF, TGA, PCX, PNM, QOI, SGI, DDS, JPEG 2000; ICNS and DIB refused; APNG shown still | Pillow wheels of our own |
| P36 | zeroconf on Android as a pure wheel built by Gradle from a SHA-256 checked source archive | staying on 0.39.4 |
Technical
| Number | Decision | Set aside |
|---|---|---|
| T1 | One Uvicorn process and SQLite; a Rust backend only through a formal work package | separate services, Redis |
| T2 | Domain packages without compatibility facades | re-exports |
| T3 | Class recovery from ScheduledLaunch and the last missed occurrence | a persistent APScheduler job store |
| T4 | Errors as {code, message}; bobine exits 2 on invalid input, 4 on a refused state, 5 on not found | |
| T5 | Lists: optional limit and offset, total in X-Total-Count | an enveloped response |
| T6 | Playback and radio states as open models with a typed state | strict typing of every field |
| T7 | Command line declared as data; reference exported and copied under a parity check | hand-written subcommands |
| T8 | Pull requests run targeted Linux checks; main builds everything (Canary) | macOS and Windows outside main |
| T9 | Zero telemetry; NTP kept | turning NTP off |
| T10 | Commits, pull request titles and branches in English | French |
| T11 | Media work in lanes: one heavy lane (encoding, already multi-core), light lanes clamp(cores/2, 1, 4); order: requested import, then web version, then background work | one worker, every core |
Releases
One page per published Stable release: the title as published, the UTC date, the public notes, the pull requests included, and the checks made, hardware included or the reason it was not done. Beta and canary are rolling channels built from main and get no page.
| Release | Date |
|---|---|
| 6.0.0 | 2026-11-29 |
Bobine 6.0.0 (2026-11-29)
Published on 2026-11-29 at 16:52 UTC from tag V6.0.0 (commit 6e717860). Release page: https://github.com/FantasmaGlad/Bobine/releases/tag/V6.0.0. It follows 5.2.2.
Notes
The published notes are in French; this is their English text.
Outputs
Three isolated outputs: Wired, Network 1 and Network 2. Each has its player, radio, schedule and settings; they never affect one another.
The radio becomes a mode of each output, like kiosk, cinema and signage: one mode shown at a time. Switching to Radio restarts the radio of the output; leaving it pauses it.
Schedule: one row per output. A radio window is scheduled like a class, by choosing Radio; existing radio windows join the row of their output when the database is upgraded.
Upgrading from 5.2.2: the network radio becomes the radio of Network 2, with its schedule, reminder rules, ambience, sound, mixing and audio output; Network 2 shows the radio so devices already set keep playing. A reminder rule aimed at both radios is copied to the Wired radio and to the Network 2 radio.
One screen address per output: /screen?output=cable, /screen?output=network or /screen?output=network_2 opens the current mode of the output and follows its changes. It is the address to set once on each device.
Breaking changes
HTTP and WebSocket API: the state, displayed mode and commands of an output move under /api/outputs (GET /api/outputs, GET /api/outputs/{output}, PUT /api/outputs/{output}/mode, POST /api/outputs/{output}/playback/{action}, POST /api/outputs/{output}/radio/{action}). /api/playback/state, /api/radio/state, /api/settings/display-output, POST /api/playback/{channel}/{action} and POST /api/radio/{output}/{action} are removed; the radio alias and the old radio_* lanes on /api/schedule are refused.
Screen addresses and pages: screens read only ?output=, the old ?channel= is ignored; devices set to an old address must be pointed to /screen?output=. The /playlists and /audio-playlists pages are removed, replaced by /library and /library/coach.
Configuration files: one schedule file per output (schedule/cable.json, schedule/network.json, schedule/network-2.json); a 5.x schedule export no longer applies its radio windows (schedule/radio-*.json refused).
bobine command: bobine output list, get, mode, playback and radio replace bobine display, bobine playback and bobine radio.
Reminders: the target both no longer exists; a rule aims at one radio.
Machine file: an unknown key, including a key removed in an earlier version, is refused instead of ignored.
Visuals
A Visuals space (Library, Visuals): images, GIFs and short videos to show, apart from the coach’s animated backgrounds; import by button, drag and drop, archive or watched folder.
A Visual mode on each output: the loop is edited in the output’s dashboard (order, duration of each image, whole video or chosen duration), with import in place.
Formats: PNG, JPEG, WebP and GIF as they are; AVIF, HEIC, BMP, TIFF, APNG, JPEG 2000 and others converted at import; WMV, FLV, MPEG, TS, 3GP and OGV videos converted to MP4. HEIC needs ffmpeg 7.1 or later on a computer.
bobine visuals (list, import, rename, delete) and bobine signage (loop of an output).
Playback
A full-width seek bar; chapter title and a picture preview of the targeted moment above the bar, in kiosk and cinema, with the remote too.
Double press on left or right: previous or next chapter. Long press: accelerated seek.
A full-screen pause screen shared by kiosk and cinema, without a progress bar.
A modular sound chain without wobble or clipping: native playback without a Web Audio graph while sound, mixing and routing are neutral, dynamic bypass of inactive stages, a single limiter with a soft ceiling and no overshoot, and a steady playback rate on the primary screen.
Performance
A more responsive server: database access no longer blocks the server, and settings are read and saved in one request. Measured on a Chromecast with Google TV during a burst of settings writes: median response time of the real-time channel from 120 to 16 ms, saving a setting from 150 to 78 ms.
Imports first: video work is spread over several cores (half of them, from 1 to 4, one encoding at a time); an import goes before the timeline previews generated in the background. Measured on a computer: an import queued behind twenty previews finishes in 1 s instead of 31 to 36 s.
ffmpeg watched: an encoding that stops progressing for 2 minutes is stopped; on a computer, timeline previews run at low priority.
Interface
Menu: the three outputs in direct access, then a Library (Classes, Coach, Radio, Radio reminders, Visuals); the radio of each output is driven from its dashboard, in Radio mode.
Settings as a tree on the right (General, Playback, System); sound and mixing of each output are grouped in Settings, Sound.
Page transitions without a cut; page sub-views in the address (?vue=).
Devices reduced to devices (audio outputs and Bluetooth).
10 s between two classes by default, always adjustable by configuration file, command and API.
Distribution
The APT, DNF and pacman repositories serve only the bobine package; the Homebrew tap keeps only the bobine cask.
The download counter of bobine.fit and the README counts installers, packages and APKs downloaded, without checksums, signatures or automated checks.
Reliability
Android and Android TV: permissions asked one after another at first start (notifications, Bluetooth and nearby devices, installing updates outside the Play Store, battery exemption, drawing over other apps for autonomous start and HDMI), with a fallback that works on TV.
macOS update: signature checked, then the application replaced through the administrator prompt, as on the other systems.
A video conversion that produces no frame is refused instead of importing an unreadable file.
Advisory RUSTSEC-2026-0594 fixed (cookie 0.18.3); host check and security headers on every response; inputs and subprocesses bounded.
Pull requests
Bobine 180 to 416 (235 commits since V5.2.2): isolated outputs and radio per output, removal of compatibility older than 6.0.0 (373 to 384), visuals and signage, timeline storyboards, the sound chain, database off the event loop and one-request settings (391 to 395), media lanes and the ffmpeg watchdog (396 to 402), Android permissions, Dependabot updates.
Checks
CI run of the V6.0.0 tag push, all green: backend on Python 3.11, 3.12 and 3.13 and on the Android profile (Pydantic 1, Python 3.11 and 3.13); frontend build; Firefox smoke tests; media component on Linux x86_64 and ARM64, Windows x64 and ARM64, macOS, and its fuzzing; devices component; dependency audit; .deb amd64 and arm64, DNF and pacman packages for x86_64 and aarch64, the DNF aarch64 package installed and started on Fedora; Windows x64 and ARM64 installers; macOS image; install.ps1; Android build and signature, phone and TV APKs started on an x86_64 emulator; Linux packages signed and published; release copied to GitLab. 20 files with SHA256SUMS and its signature.
Hardware checklist: not run in full for 6.0.0. The last full run was on 5.1.2.
Repositories
Every repository lives under github.com/FantasmaGlad, with a public backup copy under gitlab.com/FantasmaGlad pushed by its mirror workflow. Merged branches are deleted; main takes changes through pull requests only and refuses force pushes and deletion.
| Repository | Content | License |
|---|---|---|
| Bobine | application: backend, frontend, Android, Rust components, packaging, CI; required check ci-ok | AGPL-3.0 |
| BobineWeb | the bobine.fit website, static Vite and React pages rendered at build time; required check ci-ok | read only |
| bobine-packages | signed APT, DNF and pacman repositories on gh-pages, the packages.bobine.fit portal on main, the daily download count on the compteurs branch | read only |
| homebrew-bobine | Homebrew tap with the bobine cask | read only |
| bobine-security | the security.bobine.fit disclosure page, its key and security.txt, checked against the copies on bobine.fit | read only |
| bobine-collaboration | this documentation, published at docs.bobine.fit | MIT |
Read only means the source is public for reading; no license grants reuse.
How the pieces connect
Bobine CI builds every installer and package. A push to main publishes the canary release; a tag VX.Y.Z publishes a Stable. The same CI prepares the signed package repositories and pushes them to bobine-packages. BobineWeb reads the latest Stable and the download count at build time and rebuilds every day. homebrew-bobine updates its cask from the latest Stable every six hours or on demand. The command and API reference is generated in Bobine and copied into BobineWeb under a parity check.
Maintainer
What only the maintainer can do: hardware, accounts and keys.
Hardware tests
The grid in procedures/hardware-validation.md runs before every Stable. The last full run was on 5.1.2; 6.0.0 has not had a full run. Items waiting for hardware are listed in status.md, under Not verified on real hardware.
Accounts and keys
Release signing for Android, the package repository key, the security contact key, the Google Play console, the Cloudflare zone of bobine.fit and the GitLab token used by the mirror workflows are held by the maintainer. A release, a channel publication, a security advisory and any write to a real device, server or account need the maintainer’s agreement.
Waiting on the maintainer
Windows Authenticode and macOS notarization: not started. Social previews of the repositories are uploaded by hand in each repository’s settings.
Documentation map
One fact lives in one file. Before you add a fact, find the file that owns it; the others link to it.
| File | Owns |
|---|---|
| overview.md | what Bobine is, how it is built, behaviors that must not break |
| repositories.md | every repository, its content and protection |
| status.md | state today, pending decisions, what is not verified |
| roadmap.md | work left, in order |
| decisions.md | decisions in force, one line each |
| releases/ | one page per published Stable: notes, pull requests, checks |
| maintainer.md | hardware tests, accounts and keys only the maintainer handles |
| work/ | one file per work package in progress |
| procedures/ | how to do one task, one file each |
| reference/ | lasting technical facts, one file per subject |
Meeting notes live in notes/.
There is no change log: git history and merged pull requests are the record. When a work package is finished, its file leaves work/, its line leaves the roadmap, and what remains to test goes to maintainer.md.
Work in progress
One file per work package in progress, named after its subject. Step identifiers (A9, L9, T18) stay the same in issues and pull request descriptions. When a package is finished, its file leaves this folder, its line leaves the roadmap, and what remains to test goes to maintainer.md. New packages start from the template.
| Package | Subject |
|---|---|
| performance.md | load, parallelism, native core, folders by theme |
| responsiveness.md | responsiveness and animation budgets on every profile |
| field-reports.md | open reports from real rooms and TV checks |
| native-inputs.md | remotes and gamepads read outside the browser |
| structure-debt.md | settings package, Android mDNS probe, API gaps |
| outputs.md | three isolated outputs, closing |
Performance: load, parallelism and native core
Status: in progress.
Goal
The fastest software possible, technical cost accepted: work spread over the cores, the database off the event loop, a native core where it pays, and folders by theme, function and sub-function in every language. More memory or computation is accepted when it makes the interface smoother, measured per profile, TV included.
Steps
| Step | Content | State |
|---|---|---|
| A1 | Database off the event loop, atomic settings writes (391, 392); TV under writes: WebSocket p50 120 to 15 ms | done |
| A1b | Settings in one request per batch, asynchronous get_db (394, 395); TV: PUT p50 220 to 78 ms | done |
| A2 | ffmpeg stopped after 120 s without progress, bounded stderr, one launcher, storyboards at background priority (396 to 398) | done |
| A3 | MediaExecutor (402): one heavy lane, 1 + clamp(nproc/2, 1, 4) threads; desktop: an import behind 20 storyboards 31 to 36 s down to 1 s | done |
| A4 | Folded search and sort keys stored per item (420); 3 820 items: search 37 to 48 ms down to 9 to 11 ms | done |
| A5 | One rule, one source: bobine without app.config 0.23 to 0.13 s (467), shared generated outputs (468), proposed media names served by POST /api/media/names (470, 471) | done |
| A6 | One broadcast socket per tab (485), serialized once per broadcast (513): 2 KB state_change at 10 clients 188 to 275 µs down to 55 to 80 µs | done |
| A7 | Native audio probe on by default (498); 140 µs per probe round trip | done |
| A8 | Cargo workspace native/ with a shared protocol crate | to do |
| A9 | Native MP4 video probe, probe_video (517): ffprobe takes 56 ms per video on a desktop and 400 ms on a TV, the native probe 1.7 ms for a 52-minute class; 28 files compared: 18 identical, 10 handed back to ffprobe, 0 mismatch | done, not measured on a TV |
| A10 | bobine-devices: screens, WASAPI, inputs on the four profiles (505 to 512) | waiting for hardware |
| S | Folders by theme, one theme per pull request before the step that touches it | to do |
Target tree
The same themes everywhere: backend/app/theme/function/, backend/tests/theme/, frontend/src/components and lib by theme and function, native/crate/src/theme/platform/, com.bobine.app.theme. Guards: no database access in async def, no subprocess outside the launchers, about 12 files per folder.
Pending decisions
Rust dependencies core-graphics and landlock; a multiplexed WebSocket contract (a published format); a full Rust backend only after RSS and CPU measurements on a TV.
Pitfalls
Read then add on a settings key is not atomic: always put_setting. A route a test calls directly keeps its async form. A Session made by the dependency serves in the threadpool only, never concurrently. Compare suite durations of main and a branch in alternating runs: the load of the machine varies by half.
Responsiveness and animations on every profile
Status: in progress.
Budgets
CPU throttled 4 times stands for a weak machine, 6 times for a TV; to confirm on hardware.
| Measure | Budget |
|---|---|
| idle page | at most 5 ms of main thread per second at 4 times, no long task, no request outside pushes |
| WebSocket during playback | at most 2 KB/s; initial state limited to subscribed outputs |
| permanent animations, gestures | transform and opacity only (tests/motionBudget.test.ts); press to frame at most 100 ms at 4 times |
| list routes, /api/health under load | at most 50 ms on a desktop |
Reference profile
Desktop, headless Chrome, CPU 6 times, 10 s idle, seeded bench, main after 472 (2026-12-03, measured): only /radio/ (15.3 ms/s of script) and /metrics/courses/ (7.5 ms/s of long tasks) went over budget; the cost is React’s render loop, no pure JavaScript computation, so WebAssembly is not justified.
Steps
| Step | Content | State |
|---|---|---|
| L4 | position computed in the leaves on /radio/ (473) and the coach (487); schedule occurrences without N+1 (486: 479 to 12 queries, two months 150 to 50 ms) | done; marquee titles off screen and a full /radio/ render per tick remain |
| L5 | /storage/ shows volumes without waiting for portable drives (488: 595 to 50 ms) | done |
| L6 | elements at load on an 800-video, 3 000-track bench: /cinema/ 14 537 to 743, /library/radio/ 30 164 to 604, /library/ 8 996 to 442 (479 to 484) | done; dialog pickers and /library/ table remain |
| L7 | tray menu read in 0.9 ms, 3.9 ms under 8 writers | closed without code |
| L9 | an in-memory store per API route in the persistent layout, shown at once, revalidated by WebSocket or visibility, never by timer; prefetch on hover or idle | to do |
| L10 | one broadcast socket per tab (485); internal links through next/link (489) | done |
| Q7 | Firefox check of loop delay during import, unstable (2 to 242 ms); instrumented (490): peaks after reloads of /api/videos and /api/media/names | open, acted on at the next overrun |
Pitfalls
Simulate a remote press with keydown then keyup, or repetition filters the next presses. Measure a windowed row with getBoundingClientRect().height, never offsetHeight. After a scripted scroll, wait three animation frames, never a bare timeout. Use a fresh browser per measured page. content-visibility: auto on 3 000 rows costs more than it saves.
Field reports and TV checks
Status: in progress. Every report is reproduced on an isolated backend before a fix, with a test that fails first.
Open reports
| ID | Kind | Report and state |
|---|---|---|
| T3 | experience | play and pause latency reported from the desktop admin panel, not reproduced at the kiosk (0.1 to 0.2 s): to reproduce from the panel |
| T4 | experience | chapter change: picture frozen 0.5 to 2.1 s on a TV, key frames 3 to 9 s apart |
| T6 | bug | switching between /cinema/, /kiosk/ and /radio/ slow or failing from the desktop panel (6 out of 6 in 0.7 s through the API): to reproduce from the panel |
| T15 | feature | input table, /api/settings/inputs, bobine inputs, Inputs page and chapter double press shipped (322, 329, 352); validation with a real TV remote and gamepad remains; native Linux path in native-inputs.md |
| T18 | security | schedule list and video replies return an absolute thumbnail_path, contrary to the rule that no response returns an internal path; decided: no absolute path in the API |
| T19 | bug | on an Amlogic Android 14 TV, ffmpeg’s h264_mediacodec returns Encoder returned EOF and writes an empty MP4; explicit failure in place (353, 364); without libx264 two ways remain: MediaCodec and MediaMuxer through Chaquopy, or openh264 (a new dependency, agreement needed) |
| T20 | Android | a USB drive seen neither by the kernel nor by sm list-disks on a TV; decided: access per volume (StorageVolume, system dialog at plug-in) without a global storage permission, after checking the port and the drive |
| T23 | critical | sound and picture about 250 ms apart on a TV built into the television, heard on site, direction not given; the video plays in one video element of the WebView with its own sound track, so the offset comes from the output path, not from drift between players; first hypothesis: a non-neutral output sound routes the video through Web Audio |
| T24 | feature | it is the television’s screen that goes to sleep, not the application; Bobine already keeps the screen on (FLAG_KEEP_SCREEN_ON on TV, screen wake lock on full-screen routes, SetThreadExecutionState on Windows, caffeinate on macOS); a diagnostic shipped (492, 493), validation on a TV remains |
Interface checks left on a TV
Shipped and green in CI under Chromium, to confirm on a real TV: accelerated repetition on long arrow presses (326), the Discover classes tab in /cinema/ (333), the shared pause screen without the clock showing through, the Coming next block with thumbnail, duration and preview (334), view transitions without flash (337), cinema selection without a box in a box (328), timeline preview on remote seek in cinema (371, 372) with the chapter banner hidden during the preview (374).
Native inputs: remotes and gamepads
Status: in progress; only hardware validation is left.
Goal
Read remotes and gamepads outside the browser: media keys arrive as Unidentified or not at all, nothing is read when the screen has no focus, and gamepad repetition does not exist in the kernel. The browser stays the default path; the native path is added where the device can be read.
Steps
| Step | Content | State |
|---|---|---|
| E1 | bobine-devices inputs: raw /dev/input/event* reads, classification by sysfs capabilities (BTN_GAMEPAD is a gamepad; remote keys without a full keyboard is a remote), hat axes turned into BTN_DPAD_*, scan every 2 s, one JSON line per event | done (505) |
| E2 | backend relay app/inputs/native_watch.py (lines bounded to 1 024 characters), translated to key:name or pad:button, broadcast native_input to loopback WebSocket clients only; frontend lib/input/native.ts through the bindings table, a 150 ms cross filter between browser and native paths | done (506) |
| E3 | udev rule packaging/linux/inputs/70-bobine-remotes.rules (uaccess on ID_INPUT_KEY without ID_INPUT_KEYBOARD, USB or Bluetooth bus or rc parent), reloaded at install by the three packages; CI check with uinput and udevadm test | done (507) |
| E4 | Windows: Raw Input on the Consumer Control collection only, never a keyboard; XInput for gamepads, four slots read every 16 ms | done (510) |
| E5 | Android: gamepad buttons only, taken by MainActivity before the WebView while the page claims the path, handed to local WebViews as bobine:native-input | done |
| E6 | macOS: IOKit HID manager limited to Consumer Control, Game Pad and Joystick devices | done (512), not validated on hardware |
Proof so far
Linux desktop: the full chain validated with a virtual uinput gamepad. The udev rule measured with udevadm test: no keyboard opened (internal, virtual, virtual Bluetooth), no power button or Video Bus; a virtual Bluetooth remote opened. Not validated with a real remote or gamepad. Windows and macOS: CI builds and unit tests only.
Pitfalls
In the Android WebView, the D-pad, media keys, channel and page keys arrive with their DOM names, so the browser path is enough; volume never reaches the page and stays with the television. Gamepad buttons arrive as Unidentified followed by Android’s fallback keys. adb injection, even input gamepad, does not create a gamepad for the Gamepad API.
Structure debt: settings package, Android mDNS, API gaps
Status: in progress; one hardware check left.
| Step | Content | State |
|---|---|---|
| D1 | settings logic in backend/app/settings/, thin routes (458, 460; identical OpenAPI) | done |
| D2 | shared multi-file reception and import jobs (459) | done |
| D3 | Android on zeroconf 0.154 as a pure wheel built by Gradle (499), probing through AddressResolverIPv4 everywhere (500); the next name, bobine-2, when another device holds bobine.local | done on a desktop with real multicast resolution, not validated on two Android devices |
| D4 | X-Total-Count on /api/logs/activity (463); WebSocket and 409 errors as {code, message} (464, 465); /api/radio/albums by a six-column projection (495, 33 to 41 ms down to 17 to 23 ms, identical output on 3 000 albums); local preferences through lib/localStore.ts (496) | done |
A SQL GROUP BY for albums was set aside: first year and non-null cover in disc and track order need window functions, never used and not verified on Android’s SQLite.
Pitfalls
Tests patch attributes by module path: a move breaks the patch without breaking the import, so the full suite runs. Raising zeroconf on Android means changing the version in android/app/requirements.txt and the SHA-256 of the source archive in android/app/build.gradle.kts together, or the build stops.
Outputs: three isolated outputs, radio included
Status: closing with the current maintenance work; nothing left to code.
Decision P32: three fixed outputs (cable, network, network_2), one active mode each (kiosk, cinema, radio, signage), playback and radio engines per output, /api/outputs, bobine output, one screen address /screen/?output=ID, a Library (/library, /library/coach, /library/radio, /library/reminders, /library/visuals), a schedule with one row per output.
| Step | Content | State |
|---|---|---|
| S6b | two radio windows with an end time on the same output no longer overlap (514); 24/7 and endless radio are not windows; 409 schedule_overlap, import refused; existing overlaps kept until edited; to announce in 7.0.0 | done |
| S7 | gap between two classes measured: 28 to 49 ms from the end of one item to the first frame of the next on a desktop, 110 to 138 ms at 40 ms latency; on a Google TV device, 430 to 540 ms of black then freezes of 235 to 654 ms, the hardware decoder being released and created again; a second preloaded video element was judged not worth its cost | closed without code; reopen if a room complains |
Set aside: a multi-process server (T1), renaming the media routes, an outputs section in config.toml. Compatibility older than 6.0.0 (?channel=, radio_* lanes, /playlists, /audio-playlists) was removed in 383.
ID: title
Status: planned, in progress, or blocked by what. Branches: one per step and repository, type/short-topic.
Goal
What is true once it is done, and why it is needed.
Done when
Checks anyone can run.
Out of scope
Steps
| Step | Content | State |
|---|
Each step ships on its own, works end to end and names its proof: unit tests, CI, emulator or real hardware.
Pitfalls
What cost time once and the rule that avoids it.
Procedures
How to do one task, one file each.
| Procedure | Task |
|---|---|
| local-checks.md | checks before a commit and tests on an isolated backend |
| release.md | publish a Stable, a Beta or a Canary |
| hardware-validation.md | the grid run on real devices before a Stable |
| maintenance.md | a full maintenance pass over the repositories |
| gitlab-mirror.md | the GitLab backup copies |
Local checks
Run from the root of the Bobine repository. Every command below runs before a commit that touches its part.
PYTHONPATH=backend backend/.venv/bin/python -m pytest backend/tests/
backend/.venv/bin/ruff check .
cd frontend && npm test && npx tsc --noEmit && npm run lint
cd frontend && npm run build
cd android && ./gradlew testMobileDebugUnitTest assembleRelease
cd media && cargo clippy --locked --all-targets -- -D warnings
cd media && cargo test --locked
python3 -m unittest discover -s scripts/ci -p 'test_*.py'
The same two cargo commands run in devices/ and projector/. The last line runs when a workflow or a file under scripts/ changes. A change to the frontend or the media path also runs the Firefox smoke tests, scripts/browser-bench/e2e_firefox.py –resume, against an isolated backend.
Isolated backend
Never stop a Bobine that serves a room or a desk. Tests run on a free port with their own data:
backend/.venv/bin/python scripts/browser-bench/run_test_backend.py 8078
It sets BOBINE_USE_XDG=1, its own XDG_DATA_HOME and BOBINE_MDNS=0, and serves frontend/out. A benchmark that changes an output’s mode sets it back afterwards. Stop the server by the PID that ss -ltnp shows for its port, never by a broad pkill.
Pitfalls
Guards that read git ls-files still see a deleted file until it is staged: git add -A before the suite. A route or command change regenerates the reference with scripts/generators/export_reference.py, then the copy in BobineWeb under src/content/reference/. A moved Next.js page needs npm run build before tsc, for the .next types. The repository path may contain a space: quote every path in scripts.
Release
| Channel | Tag | How it is published |
|---|---|---|
| Stable | VX.Y.Z, equal to VERSION; title Bobine X.Y.Z (YYYY-MM-DD) set by CI | push the tag (job release-stable); docs/releases/VX.Y.Z.md required |
| Beta | beta, single and moving | gh workflow run ci.yml –ref main -f publish_beta=true |
| Canary | canary, single and moving | every code push to main |
There is never a tag such as V7.0.0-beta.1, -canary.N or -rc.N. Beta and Canary asset names are fixed. A Stable gets a code name only when it is a landmark: one capitalized French word, never reused.
Publish a Stable
- Align VERSION with backend/app/utils/version.py, android/app/build.gradle.kts, packaging/windows/bobine.iss, packaging/linux/bobine.metainfo.xml and the links of both READMEs.
- Write docs/releases/VX.Y.Z.md; run the full checks and the hardware grid.
- Commit chore(release): X.Y.Z on main, then git tag VX.Y.Z and git push origin VX.Y.Z.
- After CI: scripts/ci/verify-release-assets.sh, check the package repositories, deploy BobineWeb (gh workflow run deploy.yml, the only way bobine.fit/install.ps1 changes), update the Homebrew cask (gh workflow run in homebrew-bobine, otherwise every six hours).
- Add the release page to this repository.
Numbers never go back
Restarting at 1.0.0 was set aside: a smaller number than the installed one is never seen as an update by the built-in updater, APT, DNF and pacman would need a permanent epoch, and winget has none. Only the Google Play versionCode, the number of commits, escapes this.
Pitfalls
main keeps one pending CI run: a documentation-only commit merged while a code run waits cancels it and no Canary is built; wait, or run ci.yml on main with publish_canary=true. Linux package runners stay on ubuntu-24.04 (glibc 2.39) because the .deb floor is glibc 2.38. Rust is installed before pip in any job that compiles Rust. A release named by an open winget pull request is never deleted. Update a .deb with apt-get install ./package, never dpkg -i alone.
Hardware validation
Run on real devices before every Stable and after any change to audio or players. CI and emulators do not replace it; an item not run is written as not validated.
Per device
| Device | Check |
|---|---|
| Android ARM tablet | the Stable APK, port 1903 fallback to 1904 and back, built-in update, Wi-Fi lock without stream cuts, HDMI presentation on /screen/?output=cable, USB drive read only |
| 32-bit Android TV | install, Python 3.11, remote (Back, chapter double press, /kiosk overlay), /screen/?output=cable in /cinema, /radio and /signage, wired sound without bass wobble, smooth pictures, update popups that disappear |
| Linux desktop (mini PC) | .deb from the APT repository, HDMI through DRM; power cut during a scheduled class, resumed at the right position |
| Windows x64 and ARM64 | installer, SmartScreen, update, DPI over several screens |
| Mac with Apple Silicon | .dmg, Gatekeeper, update through the administrator prompt and restart, the projector window |
| Linux (Debian 13, Fedora, Arch) | system tray, screen, systemctl –user, Wayland |
| every screen | light and dark themes, real contrast, tray icon |
Players and radio
| Area | Check |
|---|---|
| radio | play, pause, next, previous, seek; 5 s crossfade without gap or double sound; seek and pause during a crossfade; native playback without distortion when the sound is neutral |
| radio reminders | ducking to 15 percent, waiting for the end, trigger during a crossfade |
| resilience | 20 s network cut then resume at the same position; an unreadable track replaced by the next after 10 s |
| mixing and mirrors | volume, equalizer, mixing without click or hum; level meter on the primary screen only; a mirror screen that follows the clock |
| autoplay and lifecycle | unlock on TV when autoplay is blocked; hidden then visible tab resumes the AudioContext |
| video (/kiosk, /cinema, /grid) | A/B playback without a cut, remote and D-pad, screen wake; sound and picture in sync with a neutral and a non-neutral output sound; the television screen stays on during a class |
| endurance | 2 h without memory growth or drift; no InvalidStateError or NotAllowedError looping in logcat or the console |
Maintenance pass
Run on the maintainer’s request, advised after a Stable and before opening a work package. It covers the five product repositories and this one. A pass never changes behavior: an anomaly found becomes an entry in status.md, handled in a work package.
- Start from a clean state: every checkout on an up-to-date main, no leftover worktree or branch, open pull requests merged, closed or listed, remote branches without a pull request listed for decision.
- Measure without changing anything: function and file length, complexity, catch-all modules, one domain per file, rules written twice, hard-coded lists, dead code (vulture, knip, cargo machete, clippy), comments, internal references, English names, symbols and emoji, links (lychee), secrets in history (gitleaks), dependency audits (pip-audit, npm audit, cargo deny), GitHub settings, documentation size.
- Fix at once what is proven safe (proven dead code, comments against the rules, lint, outdated documentation). Removals of files, functions, branches or dependencies, splits and settings changes wait for the maintainer’s decision.
- One pull request per repository, or per domain in Bobine; refactors, comments and behavior changes never mixed; names after the technical object.
- A code rule worth a guard becomes a test or a lint run by the existing CI; no new workflow.
- Bring this repository in line with the facts, then close: every pull request merged green, branches removed, checkouts on main.
GitLab backup copies
Every repository has a public copy at gitlab.com/FantasmaGlad/NAME. Its mirror workflow clones the GitHub repository bare and pushes every branch and tag with –prune, on each push, branch deletion, every six hours and on demand. bobine-packages skips gh-pages, about 15 GiB, beyond the 10 GiB of a GitLab project.
Bobine copies each Stable release to GitLab after it is published, with its files, from the CI artifact so the GitHub download counter is not touched; gitlab-release.yml copies an older Stable. A release deleted on GitHub is deleted on GitLab too. GitLab projects have issues, merge requests, wiki and CI turned off. The GITLAB_TOKEN secret of each repository is a personal token of the maintainer.
A new repository needs, before its first push: the GitLab project created public, the GITLAB_TOKEN secret set, and one line at the top of its README: Backup copy: GitLab.
Reference
Lasting technical facts, one file per subject.
| File | Subject |
|---|---|
| architecture.md | how the code is split and how a split is proven |
| platforms.md | the four execution profiles and their constraints |
| threat-model.md | what is protected, what is trusted, where the boundaries are |
| media-native.md | the bobine-media component and its protocol |
| android.md | Android and Android TV builds and runtime |
| installers.md | what CI proves for each artifact and what is left to hardware |
| packages.md | signed package repositories at packages.bobine.fit |
| website.md | bobine.fit and the packages portal |
| downloads.md | how downloads are counted |
Architecture
The rules are in COLLABORATION.md, under Code hygiene and Architecture.
Backend packages
| Package | Holds |
|---|---|
| api/ | routes by domain under api/routes/, the contract (contract.py), guards, errors, static files; no business logic |
| cli/ | the bobine command, a pure HTTP client on the standard library, commands declared in cli/specs/ |
| outputs/ | the canonical table of outputs (registry.py), modes and shared metadata |
| playback/, radio/, signage/ | video and audio playback engines, radio per output, the visuals loop |
| scheduling/ | occurrences, launches, scheduled tasks, recovery after a restart |
| updates/ | GitHub lookups, versions, artifacts, Android guard, scheduled updates |
| catalog/, metrics/, media_assets/, videos/ | paged SQL catalog, metrics, the shared core of backgrounds and visuals, the video library |
| inputs/, network/, host/, paths/, process/ | input table, network and mDNS, host detection, data paths, subprocesses |
| hardware/, devices/, storage/, desktop/ | system domains, drivers per platform behind a registry |
| config_apply/, reference/ | JSON appliers per domain, export of the command and API reference |
| models/, database/ | SQLAlchemy models by domain, engine, sessions, idempotent migrations, foreign keys |
| utils/ | helpers without a domain of their own; never a new catch-all |
Splitting code
Python: a module that grows becomes a package of the same name; a service class splits into mixins (playback/, radio/, storage/service/); routes form a package, one router without prefix per module, included by init.py with the original prefix and tag, fixed paths before parameter paths. A test that patches an attribute patches it in the module that reads the name.
TypeScript: components by domain under components/domain/, hooks useX.ts beside them, pure computations in lib/ tested by node –test. React hooks without lint exceptions. Imperative logic with closures (player, socket, follower) lives in module functions on an explicit state, not in a factory of closures. Top-level branches of a component are render functions, not components, when the old code reused the same element, otherwise React unmounts and the page jumps.
Proving a split
| Change | Proof |
|---|---|
| moved CSS | no inversion in the cascade order, zero rendering difference on a bench of two isolated backends |
| components and pure functions | old source against new, states injected, seeded generator |
| hooks and effects | old and new effect bodies run with fake WebSocket, timers, clock, document, fetch and media elements; operation logs compared; sensitivity proven by two to four mutations |
| Python and Rust | AST comparison, old and new binaries compared |
The CSS cascade follows the import order of styles/index.css, without @layer or per-page CSS.
Platforms
Every system change is designed for the four profiles; a profile is validated only on real hardware.
| Profile | Package | Constraints the code does not show |
|---|---|---|
| Android and TV | APK through Chaquopy | seccomp-bpf, media on slow FUSE external storage, database on internal storage; Python 3.11 on 32-bit TVs |
| Linux desktop | deb, rpm, pacman | non-root session, X11 or Wayland, XDG tray, systemctl –user |
| Windows | Inno Setup | no console (CREATE_NO_WINDOW), self-repairing installer |
| macOS | .dmg, Apple Silicon only | LaunchAgent, caffeinate |
Every system detection has a fallback (None or a default), never a 500. Android is detected only by app.utils.android_runtime.is_android(): the 3.11 runtime of the TV does not answer Android. The Android profile runs Pydantic 1 and FastAPI 0.99 while CI runs v2: code goes through utils/_pydantic_compat, never Query(pattern=…) nor a str | bool union in a response; the backend-android-compat job runs the whole suite under that profile.
Vocabulary: an output (Wired, Network 1, Network 2; the radio is a mode of an output) is not an update channel (Stable, Beta, Canary).
Benches
Browser benches live in scripts/browser-bench/: e2e_firefox.py –resume against the isolated backend; throttle_proxy.py simulates a room Wi-Fi (4 MB/s, 30 ms); monitor.js measures loop delay and frame gaps. Limits: no GPU, Linux only, synthetic media.
Threat model
| Subject | Rule |
|---|---|
| protected | screen control, library and media, configuration, logs; the host: no write outside the data folders, no process on arbitrary input, no unverified update |
| trust | the local network, without accounts or passwords (P2, P3); api/network_guard.py refuses clients outside private networks (plus BOBINE_ALLOWED_NETWORKS), even behind a proxy; api/origin_guard.py refuses any untrusted host (403, close 1008 on WebSocket), so DNS rebinding neither reads nor writes the API; writes and WebSockets from the same origin only; exposure on an open Wi-Fi is accepted |
| outside the model | any access from outside the local network (relay, open port): it requires an authentication decided by the maintainer |
| served interface | api/security_headers.py: CSP with ‘unsafe-inline’ while the static Next export produces inline code, connect-src to the joined server, frame-ancestors ‘self’, nosniff, Referrer-Policy same-origin |
| untrusted input | chunked uploads and archives bounded; images opened by Pillow limited to accepted formats on desktop, by ImageDecoder on Android, ffmpeg reading only still-image demuxers recognized by content; audio and MP4 metadata read by the Rust media component over a bounded protocol, fuzzed in CI; storage paths resolved under their root; imported configuration checked all or nothing; an artifact installed only if its checksum is in the signed SHA256SUMS |
| native boundaries | the WebView exposes BobineNative to the page script: a script injection would reach the bridge, the CSP limits sources; each Rust component runs in its own child process with a bounded JSON protocol; no shell=True |
| publication | actions pinned by commit, Android secrets limited to the android-signing environment, SHA256SUMS signed with GPG, signed repositories, dependency audit and provenance attestation in CI |
Native media component
The Rust crate media/ builds bobine-media, a read-only inspector run as a child process of the backend. It speaks JSON-RPC 2.0 on standard input and output, one object per UTF-8 line: no network port, no shell, no audio decoding, no write. It is on by default (setting media_native, overridden by BOBINE_MEDIA_NATIVE=1 or 0); ffprobe and ffmpeg remain the fallback for anything outside its subset.
Strict subset
Any ambiguity or structure outside the list answers unsupported, ambiguous_metadata or ambiguous_cover (code -32001, no source path in messages), and the caller goes through ffprobe.
| Format | Accepted |
|---|---|
| MP3 (Layer III) | ID3v2.3 and 2.4 without duplicates; duration from Xing or Info (LAME, Lavf and Lavc delay and padding), VBRI v1 or exact CBR; refused: VBR without index, ID3v1, APE |
| FLAC | STREAMINFO, one bounded Vorbis comment block, picture blocks |
| WAV | little-endian RIFF PCM, fmt and data, LIST INFO limited to the keys ffmpeg renames |
| M4A | one progressive AAC or ALAC track, ilst atoms; mvhd duration within 1 ms of elst and mdhd |
| Ogg Vorbis, Opus | one logical stream starting at 0, ending with EOS |
| AIFF | FORM AIFF PCM; AIFF-C refused |
| MP4, M4V, MOV video | known brand, one moov read alone (32 MiB at most); avc1 track with one SPS (4:2:0, 8 or 10 bits, progressive, crop right and bottom only), constant frame step (a shorter last sample allowed), at most one plain edit per track; first sound track mp4a AAC-LC, implicit SBR and mono PS refused |
Video duration is the latest end among video and sound tracks; a track that could run past it answers ambiguous_metadata. pix_fmt follows the SPS range; a full-range nclx colr box without an SPS range is refused. The reply is a reduced ffprobe document (format.duration, video stream then audio stream), checked key by key by the backend before use.
Covers: raw embedded bytes, straight 8-bit JPEG without Adobe or CMYK, or 8-bit PNG neither interlaced nor animated, 40 Mpx at most, one image.
Protocol
| Method | Parameters | Reply |
|---|---|---|
| hello | protocol_version 1, profiles, formats, video_formats, capabilities, limits | |
| probe_audio | path, profile | status, format, metadata (nine fixed keys including duration_seconds) |
| extract_cover | path, profile | cover null (absence proven) or {mime, bytes, data_base64} |
| probe_video | path | status, format, probe; asked only when hello advertises it |
Errors: the standard -32700, -32600, -32601, -32602, and -32001 with data.reason among not_found, unreadable, unsupported, corrupt, limit_exceeded, ambiguous_metadata, ambiguous_cover.
Limits
Request 64 KiB, reply 8 MiB, cover 4 MiB, audio file 512 MiB, metadata 4 MiB, cumulative reads 16 MiB (128 MiB for an MP3 CBR without index). Video: file 1 TiB, reads 33 MiB, 4096 top-level boxes, 16 tracks, sides of 16384. Paths are absolute Unicode paths to regular files; symbolic links are refused; a file that changes during the read is refused.
Checks
cargo fmt –check, cargo clippy with warnings as errors, cargo test, a fuzz target per reader, a license check of the crate’s dependencies, and on Android an alignment check of libbobine_media.so on 16 KiB pages.
Android and Android TV
Build
Two variants, Android 14 minimum: phone (Python 3.13, arm64-v8a) and TV (Python 3.11, armeabi-v7a and arm64-v8a); x86_64 only in emulator builds. Chaquopy provides armeabi-v7a only up to Python 3.11, so the backend stays compatible with 3.11.
ffmpeg and ffprobe are bionic NDK binaries (libffmpeg.so, libffprobe.so, 16 KB pages, legacy packaging so they are extracted). A static glibc binary is killed by seccomp (SIGSYS): never try again.
versionCode is the number of commits: Android refuses a downgrade from Canary to Beta or Stable, and the backend refuses it before download. The signing key is kept outside the repository; signing secrets live only in the android-signing environment of GitHub; v4 signing is off.
Runtime
Database, logs and thumbnails on internal storage, media on external storage (the database on FUSE blocked the event loop). restart_services() exits and relies on START_STICKY, without guarantee. Clear text is allowed only to 127.0.0.1 and 127.0.0.2. The multicast lock is taken again on every network change. Back is intercepted on TV only. Volume is never reset by the page and stays with the system. On TV, MainActivity sets FLAG_KEEP_SCREEN_ON.
Some vendor skins ask, besides the battery exemption, for the battery setting of the app to be set to no restriction.
Pitfalls
| Pitfall | Rule or measure |
|---|---|
| startup | no Python or WebView before the first frame; on a Google TV device bindApplication went from 1 054 to 66 ms and launch from about 2 s to 0.4 s; WebView initialization (about 290 ms) remains on the main thread by nature |
| system animations off | every ValueAnimator stops dead: a progress indicator stays readable without motion |
| INSTALL_FAILED_USER_RESTRICTED | turn on install over USB in developer options |
| WebView debugging | on in debug builds only: on a Canary, measure with dumpsys and atrace |
Installers: what CI proves
| Artifact | CI proves | Left to hardware |
|---|---|---|
| .deb amd64, arm64 | install, /api/health, refusal on Debian 12 and Ubuntu 22.04 | tray, screen, a real desktop |
| .rpm, .pkg.tar.zst | install and start on Fedora and Arch x86_64; aarch64 pacman: archive only | a real desktop |
| .exe x64, ARM64 | silent install, /api/health, uninstall | SmartScreen, a real ARM PC |
| .dmg Apple Silicon | mount, ad hoc signature, /api/health | Gatekeeper; no Intel build |
| phone and TV APKs | ABI, 16 KB alignment, signature, start on an x86_64 emulator | ARM devices, 32-bit TV, remote |
Rules
glibc floor 2.38 (packaging/common/MIN_GLIBC): the build fails if binaries need more; a package Ubuntu 24.04 cannot start is never published. Announced distributions are tested ones: Ubuntu and Debian 13, Fedora, Arch, DNF 5 syntax. Inno Setup frees locks, purges old .pyd and .dll files and recreates at each install a firewall rule bound to the program, limited to local networks and VPNs. On Linux, configure-firewall open or close (ufw, firewalld) is called by the package scripts, private ranges, Tailscale and local IPv6 only; macOS has no rule.
Toolchains
Rust is pinned in rust-toolchain.toml. Before changing AGP, Gradle, Chaquopy, Java, Rust or Python, read the official compatibility matrices, update checksums and URLs together, keep AGP and Chaquopy within Chaquopy’s published range, and keep the Android profile (Pydantic 1) apart from desktop constraints. The four Android signing secrets go together: without any, a pull request passes without a signed artifact; a partial set fails. Compiling is not accepting: open dependency advisories and the older Android profile are assessed before every Stable.
Package repositories
packages.bobine.fit serves signed repositories from the gh-pages branch of bobine-packages: /debian (one suite per channel), /fedora and /arch, for two architectures each. Bobine CI prepares them and pushes them with a deploy key.
The key is Bobine APT Repository, RSA 4096, primary fingerprint B77D 96D7 2F84 F36A CAA3 F872 9CBF 497D 829E E15A, without expiry, a subkey signs; it is published at /bobine.gpg and is distinct from the security contact key. Packages ship the key; the keyring is refreshed only where it was installed.
Valid-Until is 365 days on Stable and Beta, 30 days on Canary; a scheduled workflow re-exports the repositories and a daily probe checks them. A channel never receives an older version. Old hostnames such as apt.bobine.fit redirect with 301, except /bobine.gpg, and are never presented as mirrors. The built-in updater does not use these repositories; it downloads the GitHub release asset.
Pitfalls
TLS stays strict behind the proxy; never switch the hostname to DNS only. verify-repo.yml exists on gh-pages and on main and must stay identical, or a publication is ignored without a visible error; publishing deletes nothing from gh-pages, so a file removed from the portal is also removed from verify-repo.yml.
Website
bobine.fit is a static site, Vite, React and TypeScript rendered to dist/ at build time, served by GitHub Pages behind a CDN. No server dependency, no cookie, no localStorage, no analytics. Decision P22 keeps it minimal: home, commands, API, legal and security pages in French and English, and install.ps1.
| Domain | Folder | Role |
|---|---|---|
| assembly | src/app/ | App, entry point, prerender |
| visual base | src/styles/ | tokens (light and dark slate, contrast of at least 7:1), reset |
| routing | src/routing/ | routes, metadata, links, not found page |
| frame | src/chrome/ | header and footer with the GitHub and GitLab marks |
| home | src/features/home/ | release data, download counts, platform table, terminal install |
| reference | src/features/reference/ | command and API reference from JSON copied from Bobine |
| legal | src/features/legal/ | legal notice and privacy |
| static build | scripts/build/ | release lookup, prerender, sitemap, robots, manifest |
CI checks: a policy script (inputs, secrets, emoji, pushed commits), ShellCheck, tsc, biome, node tests, contrast pairs, asset registry, parity of the reference with Bobine, the build and its downloads.json. After deployment, a smoke test checks the served site, install.ps1 included. The site rebuilds every day to pick up the download count.
packages.bobine.fit portal
Pages generated from bobine-packages main by scripts/build-portal.mjs and checked by scripts/check-portal.mjs: black on white, one column, one script to copy commands.
Download count
One daily count, produced by bobine-packages on its compteurs branch and served as static JSON at bobine.fit/api/downloads.json. Bobine itself sends no telemetry: only GitHub release counters and aggregated request counts of packages.bobine.fit are used.
| Source | Rule |
|---|---|
| signed repositories | GET requests answered 200 on the bobine package files of APT, DNF and pacman, signatures excluded; HEAD requests of the daily probe do not count |
| redirected channels | GET requests answered 302 on packages.bobine.fit/dl/site, /dl/homebrew and /dl/script, reported per channel without being counted twice |
| GitHub releases | published releases only; program files (installers, packages, APKs) in github.total, every asset in github.all_files; a monotonic record keeps the counts of a deleted release |
| totals | total = github.total + repositories, programs only; raw = github.all_files + repositories; bobine.fit and the README badge show total |
The count runs at 02:23 UTC; BobineWeb rebuilds at 04:17 UTC and validates the file against its schema before publishing it.
Notes
One file per meeting, named YYYY-MM-DD-topic.md: who attended, what was decided, who does what. A decision taken in a meeting also gets its line in docs/decisions.md.
Collaboration rules
These rules apply to every Bobine repository. A rule here wins over habit; the maintainer’s explicit decision wins over a rule here.
Language and writing
Everything written in a repository is in English: branch names, commits, pull requests, issues, identifiers, files, workflows, jobs, comments, logs and documentation. Translations meant for users are the only exception (interface texts, French README and site pages). An existing French name is renamed in the pull request that touches it, or in a pull request of its own; a name another repository reads or that is published is renamed readers first, without a break.
Write short, factual sentences. No filler, no superlatives, no marketing words. No emoji anywhere: code, interface, logs, command output, documentation, commits. No decorative symbols in documentation: no arrows, no dashes as punctuation; use a comma, a colon or a new sentence. A README has no horizontal scrolling: code lines of 80 characters at most, tables of three columns at most. Announce only what is shipped, and say where it was proven: unit tests, CI, emulator or real hardware.
Git
One working branch at a time, named type/short-topic. Everything goes through a pull request to main; nobody commits to main directly, and nobody force pushes, amends or rebases a pushed commit.
Commits, pull request titles and branches follow Conventional Commits, lowercase, with a scope, in the imperative, in plain ASCII: fix(playback): resync after a missed tick. Types: feat, fix, refactor, perf, test, docs, build, ci, chore, revert. The body says the root cause fixed, the mechanism added and the checks run. One commit is one coherent change: a refactor and a behavior change never share a pull request.
After a merge, the branch is deleted on the server and locally, and the local main is brought up to date. A repository keeps only main, plus gh-pages where Pages serves files and the open Dependabot branches.
Versions
Versions read X.Y.Z and follow the OpenSSL policy. MAJOR breaks a compatibility: a published API or command, a configuration or data format, a minimum system. MINOR adds without breaking. PATCH fixes bugs and security issues only. A number never goes back. Tags and package versions carry no date; a release title reads Bobine X.Y.Z (YYYY-MM-DD), the UTC day of the build.
Always agreed with the maintainer first: a release, a publication on a channel, a security advisory, a write to a real device, server or account, a new dependency, a change to a published format (API, configuration, addresses).
Pull requests
A pull request is merged only when every check of the repository passes on it. Never disable, skip, relax or retry a test, a lint rule or a threshold to get a pull request through. A failing test is resolved at its cause, in the tested code or the environment, never in the test: no changed expectation, wider tolerance, longer delay, added retry, skip, expected failure, or mock of the failing part. A test that fails now and then is a bug (race, clock, order, shared state): reproduce it, find the cause, fix it. A skip exists only for an environment (system, missing binary), with its reason, and every test runs on at least one CI runner.
Every fixed bug gets a regression test that failed before the fix. A move of code passes the full suite, and a split is proven by comparing old and new behavior. A validation that needs hardware nobody has is declared not done, never passed.
Each pull request touching the network, files, processes, uploads, updates, the native bridge or response headers answers four questions in its description: which new input, which bound, which failure and how it is logged, which test proves it.
Code hygiene
No comments: the code speaks through its names, types and tests. A comment exists only when it is essential (a standard, hardware, a third-party bug, a security invariant), as one technical English line. Kept: generated file headers, license headers, SAFETY comments, shebangs, one-line docstrings on a public API whose name does not say it all.
One task per function, about 50 lines; one file per job, about 300 lines, in the folder of its domain. Longer is accepted when it reads in one go (a flat dispatch, a data table, a sequence that delegates each step), with the reason in the pull request. Split by responsibility, never by number. Blocking limits: 80 lines for a backend function, 500 lines for a frontend file, exceptions recorded with their reason in the guard.
A lint exception names its rule and a reason no fix allows; never a global exception; a dead directive is removed.
One source per fact: search for what exists before writing, extend rather than copy. No versioned names (v2, Old, Legacy, copy) outside an external format. No dead code. Change in place and remove what is replaced, without a compatibility layer.
Architecture
A pure core, categories, implementations. Rules and calculations live in pure functions tested without network or disk; platform or technology implementations sit behind an interface, picked by a registry; no platform branch outside the registry and its implementations.
Thin edges: routes, commands and components translate only. A business rule is written once and every interface (API, bobine command, frontend, Android, site) uses it. A shared value lives in one place. Data drives lists and choices.
A reassigned variable and its readers stay in the same module. No swallowed error: a tolerated failure is logged, a failure that would leave a wrong state stops the operation. No new dependency without a written justification (need, alternatives, maintenance, license compatible with AGPL-3.0, weight on each profile) and the maintainer’s agreement.
Platforms
Bobine runs on four profiles: Android and Android TV, Linux desktop, Windows, macOS. Any change that touches the system (hardware, sleep, windowing, sound, storage, processes, network) is designed for all four. Only real hardware validates a profile; CI and emulators are named as what they are.
Security
The threat model comes before the code. Bobine trusts the local network and has no accounts; any new route, command or network opening says whether it stays inside that model. Access from outside the local network requires an authentication the maintainer decides.
Inputs are bounded at the boundary: bodies, uploads, archives, media, configuration and remote replies, by size, type, depth and path. Every path resolves under its root; nothing is written outside the data folders. Processes get argument lists, binaries by known path, a timeout and bounded output. Every served response carries security headers; an artifact is installed only after its signed checksum is checked; no response returns an internal path, a trace or a secret.
Forbidden: shell=True, os.system, eval, exec, new Function, pickle or marshal on received data, yaml.load without a safe loader, disabled TLS verification, tempfile.mktemp, SQL built from strings, innerHTML outside constants, unsafe Rust without a SAFETY comment, chmod 777.
No secret in code, tests, logs, command lines, URLs or documentation; a leaked secret is revoked at once. Dependencies are pinned to exact, locked versions; every download is checked by checksum or signature; actions are pinned by commit; workflow permissions are minimal; no secret reaches a pull request job.
Report a vulnerability privately, as described in SECURITY.md, never in a public issue.
Public repositories
Everything versioned is readable by everyone, history included: never a secret, a personal address, a local IP or an operations detail. Licenses: Bobine is AGPL-3.0; BobineWeb, bobine-packages and homebrew-bobine are published for reading only; this repository is MIT.
Public documentation stays minimal: a short README, and docs/ limited to release notes, generated reference, security and community files. Every repository has a public backup copy at gitlab.com/FantasmaGlad, pushed from GitHub Actions, named on one discreet line at the top of its README.
Working with the maintainer
No claim without proof: code, logs, a real request, a measurement. Say what is measured, what is read and what is estimated. Ask before a decision that is costly to undo. Stay in scope; write what you notice along the way in docs/status.md. A requirement that is ambiguous, contradictory or impossible as written is raised under pending decisions in docs/status.md with the options and their cost, never settled silently.
Contributing
Anyone may read this repository. Members of the Bobine team change it through pull requests to main; others propose changes through an issue first. Every change follows COLLABORATION.md.
One subject per pull request, on a branch named docs/short-topic.
Commit messages read docs(scope): what changed. The scope is the file or folder: status, roadmap, decisions, releases, procedures, reference, work.
Write plain English in short sentences and short sections, with no bold in running text and no decoration.
One fact lives in one file; the others link to it. The documentation map says which file holds what.
A new page gets its line in SUMMARY.md at the root, or the site build fails. Link to a folder, not to its README.md.
A decision gets one line in docs/decisions.md: its number, the rule, what was set aside. The discussion stays in its issue.
A meeting gets one file in notes/, named YYYY-MM-DD-topic.md: who attended, what was decided, who does what.
Never add a secret, password, token, local path or personal data. See SECURITY.md.
The site docs.bobine.fit is built by mdBook from main after each merge. To preview it, with mdBook installed:
site/build.sh /tmp/bobine-docs
Code changes go to the repository that holds the code. Its own CONTRIBUTING file says how, for example Bobine.
Security
Bobine drives the screens and sound of a room and runs a server on the local network: a flaw can expose the host or take over what the room shows. This policy covers every Bobine repository and service.
Report a vulnerability
Report it privately, never in a public issue, a pull request or a discussion: through a GitHub private report on the affected repository, for example Bobine, or by an encrypted mail to security@bobine.fit.
Fetch the key and check its fingerprint before encrypting:
gpg --locate-keys security@bobine.fit
gpg --fingerprint security@bobine.fit
23CA D324 C507 FB0F 97E6 AECA 6E4C 020E F8BD FEB2
The same key is published at security.bobine.fit and named by the signed security.txt (RFC 9116).
What to include
The version and channel of Bobine, the system and its version, the steps to reproduce, the effect, and what you expected instead. Never send media, logs or configuration that hold personal data.
What happens next
The goals are an acknowledgment within 7 days and disclosure with the fix within 90 days by default. They are goals, not promises: the project has a single maintainer. You are told when the fix is released and credited in the advisory unless you ask not to be.
Scope
The latest Stable release and the canary channel of Bobine (desktop, Android, Android TV, installers, the bobine command), the package repositories at packages.bobine.fit, the websites bobine.fit and security.bobine.fit, the Homebrew tap, the signing chain, and the workflows of every repository with their secrets.
Bobine trusts the local network and has no user accounts. Reaching its API from outside the private networks, getting local screen rights through a proxy, or a cross-origin write or WebSocket are in scope.
Out of scope: older releases, third-party services, social engineering, physical access, denial of service, mass scans, and findings with no demonstrated effect.
Good faith
Good-faith research is welcome. Test only on installations you own. Do not access, change or delete data that is not yours, and stop at the first proof of a flaw. Research that follows these rules will not be pursued.
This repository
This repository is public documentation. It never holds a secret, a password, a token, a private key, a local path of a contributor’s machine or personal data. If you find one, report it privately as above: it is revoked first, then removed from the history.