Skip to content

feat(distribution): Flathub (Flatpak) GUI path #232

Description

@cevheri

Final acceptance (local Flatpak E2E)

Done bar for the packaging work here. Store listing can come after.

  • build/install locally with org.flatpak.Builder (flathub-build --install or equivalent)
  • flatpak run org.libredb.Studio starts the GUI
  • walk the main screens (login/workspace, connections, editor, results)
  • add a sample PostgreSQL connection over TCP
  • run a query (e.g. SELECT 1) and see rows in the results grid
  • leave a short note or screenshot on this issue

Context

We already ship Docker, Helm, npx, Homebrew, .deb/.rpm and Snap (server daemon). Flathub is still missing. Snap-style headless wont fly there. Flathub wants sandboxed graphical desktop apps; console software is rejected.

Related: epic #108, desktop spike #115, recommendation in docs/DESKTOP_WRAPPER_SPIKE.md. Flathub is listed there as follow-up after a Tauri GUI + AppImage.

Blocked by: desktop wrapper PoC + AppImage on GitHub Releases. If that follow-up issue isnt open yet, open/link it first. This issue does not implement the wrapper itself.

Approach

Ship a real desktop shell (Tauri v2 sidecar per the spike; Electron only if WebKitGTK/Monaco fails on Linux). Publish AppImage from release CI. Flatpak manifest pulls that AppImage like Beekeeper does (type: file, unpack, install desktop/metainfo/icons), with x-checker-data pointed at GitHub Releases.

Proposed app id: org.libredb.Studio (verify via libredb.org). Fallback only if needed: io.github.libredb.libredb-studio.

Reference packaging: https://github.com/flathub/io.beekeeperstudio.Studio/blob/master/io.beekeeperstudio.Studio.yml

Trying to rebuild the whole Next.js app offline on Flathub is a bad fit. Reusing the release AppImage matches what similar SQL IDEs already do.

Rough finish-args: network, wayland + fallback-x11, dri, ipc. Prefer portals for files; document any host overrides (local sqlite is a known Flatpak pain, same as Beekeeper).

First login on Flatpak uses the desktop wrapper auth handoff (no password-from-logs UX). Bootstrap file/log remains fallback only.

Decided: Flatpak/desktop path uses STORAGE_PROVIDER=sqlite (same idea as the snap), with STORAGE_SQLITE_PATH under the Flatpak data dir so connections survive restarts. Wrapper should set that on sidecar launch. Tabs still live in the webview localStorage profile.

CI / automation (two places)

Upstream (libredb/libredb-studio):

  • smoke-build the manifest with flatpak/flatpak-github-actions/flatpak-builder@v6 in a privileged ghcr.io/flathub-infra/flatpak-github-actions container
  • native matrix: ubuntu-24.04 (x86_64) + ubuntu-24.04-arm (aarch64)
  • uploads a .flatpak artifact for sanity checks
  • does not publish to Flathub; do not wire flat-manager at Flathub

Flathub app repo (flathub/org.libredb.Studio after merge):

Docs for the actions themselves: https://github.com/flatpak/flatpak-github-actions

Work bits

  • desktop wrapper + AppImage release artifact (blocker)
  • flatpak manifest template in-repo (optional, source of truth ends up on Flathub)
  • local Builder build + flatpak-builder-lint on manifest/repo
  • upstream flatpak-builder@v6 smoke CI (both arches)
  • local E2E above
  • Flathub submission PR (maintainer opens it by hand per Flathub docs)
  • domain verification token at https://libredb.org/.well-known/org.flathub.VerifiedApps.txt
  • docs/DISTRIBUTION.md Flathub section + distribution/channels.yaml entry

Out of scope

  • packaging the Snap daemon as a Flatpak
  • console-application metainfo
  • deploying to Flathub via flat-manager from this repo

Refs

Metadata

Metadata

Assignees

Labels

deploymentPaaS / one-click deployment platform integrations and listingsenhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions