Skip to content

0026 catalog delivery

github-actions[bot] edited this page Nov 18, 2026 · 1 revision

The catalog reaches the app as a snapshot plus updates, and the website through the API

Status: accepted · Implementation: planned · Date: 2026-11-18

From LibreLifts ADR 0028, which is planned there and not built. The website's new host gets its own record.

Context

Reference data will live in Postgres (0014). It is the same rows for everyone, it changes rarely, and the app has to have it with no connection, on the first launch. Personal data reaches the device through sync (0019), but sending the catalog the same way would push shared rows through a mechanism built for one person's rows.

Decision

  • Each release of the app carries a snapshot of the catalog. Until the catalog is in Postgres, that snapshot is packages/data itself (0023).
  • Later, the app asks the API what has changed since the version it has, and applies it. With no connection it uses what it has.
  • The catalog then sits in its own read-only tables on the device, apart from personal data, and is not part of sync.
  • Media is not in the snapshot.
  • The website's catalog pages are rendered on request from the API, behind a cache. Product pages, docs and blog stay prerendered.

Consequences

  • The app shows the catalog offline from the first launch.
  • A person's log refers to catalog records by id, so a record that is later changed or withdrawn is never deleted outright, only marked.
  • The website can no longer be only static files once the catalog is live. It needs a host that can render on request, and GitHub Pages cannot.
  • Until then, editing the catalog means a new release of the app.

LibreBars

Clone this wiki locally