Your database, on deck. — Local PostgreSQL workspace for developers.
Untitled-Master/Deck • No telemetry • Local-first
Beta — APIs and UI may change. Please open an issue for feedback.
Deck is a desktop-first PostgreSQL IDE that runs locally. Connect to any Postgres instance and browse tables, edit rows, run SQL, inspect schema and monitor health — all from a single window.
- Credentials stay in memory (
pg.Pool) and are never written to disk - One server serves both API and the built frontend
- Works fully offline with mock data when not connected
| Area | Capabilities |
|---|---|
| Connect | Connect to any PostgreSQL host/port/database with user/password. Test connection, show server version and latency, and keep the session alive. |
| Data | Browse tables, search and filter, paginate, hide/show columns, sort, select rows, double-click to edit a cell, and add or delete rows with confirmation. |
| SQL Editor | Monaco-based editor with PostgreSQL syntax, run one or many statements sequentially (like psql), see per-statement results, and keep multiple tabs. |
| Schema | Visual canvas of all tables and their relations. Drag tables, pan and zoom, and jump to a table from the explorer. |
| Health | Live connection status, database size, table and row counts, and request latency. |
| Logs | Local history of recent API requests with method, path, status and duration; expand to inspect request and response bodies. |
| Navigation | Collapsible sidebar, top bar with connection and search, and a dedicated database explorer. |
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite 6, React Router 7, Tailwind CSS 3, Monaco Editor, Lucide Icons |
| Backend | Node.js 18+, Express 5, pg 8.23 |
| Tooling | concurrently, ESLint |
- Node.js
18+andnpm - PostgreSQL
12+reachable at your chosen host and port
Default connection values pre-filled in the UI:
host=localhost port=5432 database=mydb user=postgres password=280823
# 1 — Clone
git clone https://github.com/Untitled-Master/Deck.git
cd Deck
# 2 — Install
npm install
# 3 — Run in development (API on :3001 + Vite on :5173)
npm run dev
# → http://localhost:5173
# 4 — Production build + single-port server
npm start
# → http://localhost:3001Other commands:
npm run dev:vite # Vite only
npm run dev:server # API only (node server/index.js)
npm run build # vite build → dist/
npm run preview # vite preview
npm run lint # eslintEnvironment:
PORT=3001
VITE_API_URL=http://localhost:3001
npx deckis reserved for the published package — it will run the production server afternpm run build.
-
Connect at
/connect— enter host/port/database/user/password and connect. You’ll be redirected to/. -
Data at
/— pick a table from the explorer, use the toolbar to filter/sort or toggle columns, double-click a cell to edit, select rows to delete, or use Add to insert a new row. -
SQL Editor at
/sql— open from the sidebar or the floating button in Data. Write one or many statements (;separated) and press Run. For example:INSERT INTO users VALUES (122, 'Ahmed', 100); SELECT * FROM users LIMIT 100;
You’ll see
INSERT 0 1and then theSELECTresult as a table. -
Schema at
/schema— pan by dragging the background, drag tables by their header, use the mouse wheel to zoom, or click a table in the sidebar to focus it. -
Health at
/health— check connection, latency, table counts and database size. -
Logs at
/logs— review the last 100 API calls made in this tab.
Base URL: http://localhost:3001/api — all GET endpoints return 400 when not connected.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/connect |
Connect with {host, port, database, user, password} |
POST |
/api/disconnect |
Close the current pool |
GET |
/api/status |
Connection state |
POST |
/api/query |
Execute SQL (single or multi-statement) |
GET |
/api/tables |
List tables in public |
GET |
/api/tables/:name/columns |
Columns and constraints for a table |
GET |
/api/tables/:name/relations |
Incoming/outgoing foreign keys |
GET |
/api/schema |
All tables + relations for the canvas |
GET |
/api/tables/:name/rows |
Paginated rows |
GET |
/api/health |
Simple health check |
When disconnected, the UI falls back to mock data (favorites, users, orders, products, test).
deck/
├── server/index.js # Express + pg, API + static frontend
├── src/
│ ├── components/
│ │ ├── DeckLogo.jsx
│ │ ├── PostgreSQL.jsx
│ │ ├── layout/ # TopBar, LeftNav, Sidebar
│ │ ├── editor/ # SqlEditor
│ │ └── tables/ # DataGrid, StructureView, RelationsView
│ ├── pages/ # EditorPage, SqlPage, SchemaPage, HealthPage, LogsPage, ConnectPage
│ ├── context/ # ConnectionContext
│ ├── lib/ # api.js, utils
│ └── index.css
├── vite.config.js
└── package.json
- Persistence —
localStoragefor selected table/tab, SQL tabs, schema layout and nav state;sessionStoragefor request logs. - Unified server —
server/index.jsservesdist/when it exists and falls back toindex.htmlfor SPA routes.
- Password is held only in memory and shown as
***in status — never written to disk orlocalStorage. - No telemetry or external tracking.
Issues and pull requests are welcome at Untitled-Master/Deck.
git checkout -b feat/your-feature
npm run lint
npm run build
git push origin feat/your-featureMIT — see LICENSE.