Phase 1 (core): KavitaClient + Config, tested & live-verified #2

Merged
365DevNet merged 0 commits from refs/pull/2/head into main 2026-07-14 11:52:34 +02:00
365DevNet commented 2026-07-14 11:48:31 +02:00 (Migrated from codeberg.org)

The portable, unit-tested core that talks to Kavita. This is the backend half of Phase 1; the inkview UI and load/unload land in a follow-up.

What's here

  • Config — JSON round-trip of Kavita base URL, API key, and selected library ids.
  • KavitaClientauthenticate (JWT via Plugin/authenticate), listLibraries, listSeries (the real POST /api/Series/v2 filter), listVolumes (volumes → chapters → files). Depends only on an injectable HttpClient, so it's fully unit-testable.
  • CurlHttpClient — libcurl transport (system curl on host, SDK curl on device).
  • Tests — 7 cases / 38 assertions over real captured Kavita JSON (doctest). scripts/test.sh runs them natively via clang++ (no Docker).
  • Integration probetools/kavita_probe.cpp + scripts/probe.sh, verified live against the real server (auth + full library walk).
  • Build — C++14 across the board (the SDK ships GCC 6.3's libstdc++, which lacks the C++17 library headers). CMake builds either host tests or the ARM device app; the full app cross-compiles.
  • Vendored: nlohmann/json 3.11.3, doctest 2.4.11.

Verification

  • ./scripts/test.sh → 7/7 passing.
  • ./scripts/probe.sh against the live server → authenticates and lists the real library/series/files.
  • ./scripts/build.shkavita-sync.app cross-compiles to ARM.

Follow-ups (rest of Phase 1)

Config persistence, download (load) / unload, and the inkview UI (config panel + library browser).

🤖 Generated with Claude Code

The portable, unit-tested core that talks to Kavita. This is the backend half of Phase 1; the inkview UI and load/unload land in a follow-up. ## What's here - **`Config`** — JSON round-trip of Kavita base URL, API key, and selected library ids. - **`KavitaClient`** — `authenticate` (JWT via `Plugin/authenticate`), `listLibraries`, `listSeries` (the real `POST /api/Series/v2` filter), `listVolumes` (volumes → chapters → files). Depends only on an injectable `HttpClient`, so it's fully unit-testable. - **`CurlHttpClient`** — libcurl transport (system curl on host, SDK curl on device). - **Tests** — 7 cases / 38 assertions over *real captured Kavita JSON* (doctest). `scripts/test.sh` runs them natively via clang++ (no Docker). - **Integration probe** — `tools/kavita_probe.cpp` + `scripts/probe.sh`, verified live against the real server (auth + full library walk). - **Build** — C++14 across the board (the SDK ships GCC 6.3's libstdc++, which lacks the C++17 library headers). CMake builds either host tests or the ARM device app; the full app cross-compiles. - Vendored: nlohmann/json 3.11.3, doctest 2.4.11. ## Verification - `./scripts/test.sh` → 7/7 passing. - `./scripts/probe.sh` against the live server → authenticates and lists the real library/series/files. - `./scripts/build.sh` → `kavita-sync.app` cross-compiles to ARM. ## Follow-ups (rest of Phase 1) Config persistence, download (load) / unload, and the inkview UI (config panel + library browser). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
365DevNet/PocketBook_Kavita_sync!2
No description provided.