Skip to content

feat: add runtime DB switching with SSH remote support#13

Open
sparkleholic wants to merge 4 commits intoLadybugDB:masterfrom
sparkleholic:db-select
Open

feat: add runtime DB switching with SSH remote support#13
sparkleholic wants to merge 4 commits intoLadybugDB:masterfrom
sparkleholic:db-select

Conversation

@sparkleholic
Copy link
Copy Markdown

Changes

  • Add a DB menu in the sidebar that lets users switch the active database at runtime. No server restart neded. Supports file-based (directory + filename) and in-memory modes, and reloads the schema automatically after applying.
  • Add SSH remote mode: mount a remote database directory via sshfs into a local temp path and open it live (read-write, no manual sync). Supports both password auth (via sshpass) and private key file auth. The active SSH config is persisted and pre-populates the modal on re-open; switching away from SSH automatically unmounts the filesystem.
  • Add documentation in README covering runtime DB switching and SSH remote mode requirements (macOS: macFUSE + SSHFS; Linux: sshfs package).

Test

  • Open DB menu, switch between file and in-memory modes
  • Configure SSH remote with password auth (sshpass installed)
  • Configure SSH remote with private key auth

Add a "DB" sidebar menu that lets users switch the active database
without restarting the server. Supports file-based (directory + filename)
and in-memory modes. The server reconfigures the live connection pool
and the UI reloads the schema automatically after applying.
Add a "Remote (SSH)" option to the DB configuration modal. The server
mounts the remote directory via sshfs into a local temp path and opens
the database from there, so the connection is live (read-write, no
manual sync needed). Supports password auth (requires sshpass) and
private key file auth. The active SSH config (minus password) is
returned by GET /api/db and pre-populates the modal on re-open.
Switching away from SSH mode automatically unmounts the filesystem.
@adsharma
Copy link
Copy Markdown
Contributor

@sparkleholic - have you looked into https://github.com/LadybugDB/bugscope?

These type of features may fit in more naturally there. It also doesn't have the REST API bottleneck. The main use case for this repo is a hard requirement to be browser based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants