Keep one Postgres connection string in your app while flipping between feature-branch databases
Restore a teammate's pg_dump snapshot to reproduce a bug locally
Take a snapshot before a migration so you can roll back cleanly
Run quick SQL from a web console against any managed environment
Needs Docker plus port 5432 free on the host, and there is no auth so it must be kept on localhost or a trusted network.
RelayDB is a developer tool that makes working with PostgreSQL on a local machine less painful for a team. The pitch is that everyone's application always connects to the same fixed address, postgresql://postgres:postgres@localhost:5432/app, and RelayDB sits behind that address and quietly switches which actual database is on the other end. It is meant for development only, not as a production database service or an admin panel. The core machinery is a TCP router that listens on the standard PostgreSQL port and forwards connections to whichever environment is currently marked active. Each environment is a real postgres:16 Docker container with its own isolated Docker volume, all attached to a shared private network so the managed containers do not need to expose ports on the host. From the web UI or the API the developer can create, start, stop, delete, or pick the active environment; when the active target is changed RelayDB closes existing connections so the app reconnects into the new database. Snapshots are the second big feature. A snapshot is produced with pg_dump and stored in a dedicated relaydb_snapshots volume, separate from any individual database, so deleting an environment does not wipe out its frozen states. Snapshots can be listed globally and restored with pg_restore into any managed environment, not just the one they came from. The README walks through three workflows this enables: reproducing a teammate's bug by restoring their snapshot, testing a migration with a safe rollback point, and switching between feature branches that each need their own data without changing the app's connection string. The UI also exposes a SQL console that runs statements against the selected container and returns columns, rows, row count, command status, and database errors, which the author positions as a quick way to inspect or set up an environment without leaving the dashboard. The stack is React, TypeScript, Vite, Tailwind and Zustand on the frontend, FastAPI with the Docker SDK for Python and psycopg on the backend, an asyncio TCP router as the data plane, and Docker Compose to run everything. Getting started is docker compose up --build, with a fallback environment variable if the host already uses port 5432. The README lists the API endpoints for environments, SQL execution, and snapshots, and is explicit about what is not implemented yet: no auth, no RBAC, no cloud storage, no Kubernetes, no branching, and no realtime replication.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.