Skip to content
gianmegantaraPublic

About

PostgreSQL database GUI (Tauri/React) for Wayland desktops — built for Omarchy

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

pgmasta

A DBeaver-style PostgreSQL client, built as a native Wayland desktop app for Omarchy (Arch + Hyprland). Tauri 2 + React/TypeScript frontend, tokio-postgres backend — no Java, no XWayland.

Features

  • Connections — save/test connections; passwords live in the OS keyring, with an encrypted-file fallback (Hyprland often has no keyring daemon)
  • Schema browser — databases → schemas → tables/views → columns, lazy
  • SQL editor — Monaco with schema-aware autocomplete (tables, columns via aliases, functions, enum values, keywords), Ctrl+Enter to run, error positions highlighted
  • Table browser — double-click a table: paginated data, server-side sort, modal cell editor (type-aware validation, SQL NULL toggle), row insert and multi-row delete (read-only badge for tables without a primary key)
  • Exports — CSV/JSON streamed from the server via COPY (zero buffering)
  • SSH tunnels — in-process libssh2 bridge, TOFU host-key fingerprints, password and key-file auth
  • ER diagrams — right-click a schema: elkjs-laid-out SVG with crow's-foot edges, self-reference loops, pan/zoom, SVG export

Running from source

# Rust toolchain: `sudo pacman -S rustup && rustup default stable`
# or rootless:  curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
npm install
npm run tauri dev

Testing

# Frontend unit tests (stores, SQL context parser, geometry, …)
npm test

# Rust unit tests (no server needed)
cd src-tauri && cargo test

# Integration tests against a real Postgres (docker):
docker run --name pgmasta-pg -e POSTGRES_PASSWORD=pgmasta \
  -e POSTGRES_DB=pgmasta -p 127.0.0.1:5432:5432 -d postgres:17-alpine
PGPASSWORD=pgmasta psql -h 127.0.0.1 -U postgres -f scripts/testdata.sql
PGMASTA_TEST_DSN=postgres://postgres:pgmasta@127.0.0.1:5432/pgmasta cargo test

# SSH tunnel tests against a rootless test sshd (no root needed):
scripts/sshd-test-setup.sh
PGMASTA_TEST_SSH=1 cargo test --test ssh_tunnel

Packaging

  • packaging/aur/PKGBUILD — source build (pgmasta)
  • packaging/aur-bin/PKGBUILD — prebuilt binary (pgmasta-bin), fed by the pgmasta-x86_64.tar.gz attached to GitHub releases
  • .github/workflows/release.yml — AppImage/deb/rpm via tauri-action on tags

Hyprland / Wayland notes

  • The app is a native Wayland window (hyprctl clients shows xwayland: 0). Do not set GDK_BACKEND — auto-detection already prefers Wayland.
  • Fractional scaling: the Linux stack is webkit2gtk-4.1/GTK3, which lacks wp-fractional-scale — at 1.25/1.5× text renders slightly softer than GTK4 apps. No clean fix; avoid tiny font sizes.
  • NVIDIA: if you see slow/blurry rendering, the usual workaround is WEBKIT_DISABLE_COMPOSITING_MODE=1 (we don't set it ourselves).
  • Config lives in ~/.config/pgmasta/ (connections, encrypted secrets).

Notes on the design

  • Every query result cell travels as a string (Postgres text protocol) — no decode failures, numeric precision preserved end-to-end.
  • DML parameters are sent as explicit text with casts resolved from pg_catalog server-side; client-supplied type strings are never interpolated into SQL.
  • AG Grid is used strictly within its MIT Community feature set.

About

PostgreSQL database GUI (Tauri/React) for Wayland desktops — built for Omarchy

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages