Admin UI
Web-based interface for database management.
Overview
The Postbase Admin UI provides a visual interface for:
- Browsing database schemas
- Viewing and editing data
- Executing SQL queries
- Managing migrations
Starting the UI
# From postbase directory
pnpm --filter @postbase/ui devFeatures
Dashboard
The dashboard shows:
- Connected databases
- Quick stats (tables, size, connections)
- Recent activity
Schema Browser
Navigate your database structure:
📁 public
├── 📋 users
│ ├── id (serial)
│ ├── email (varchar)
│ ├── name (varchar)
│ └── created_at (timestamp)
├── 📋 posts
│ ├── id (serial)
│ ├── user_id (integer)
│ └── content (text)
└── 📋 commentsClick any table to view its structure and data.
Data Viewer
Browse and edit table data:
| id | name | created_at | |
|---|---|---|---|
| 1 | alice@example.com | Alice | 2026-01-25 10:30 |
| 2 | bob@example.com | Bob | 2026-01-25 11:00 |
Features:
- Pagination - Navigate large datasets
- Sorting - Click column headers
- Filtering - Filter by column values
- Inline editing - Double-click to edit
- Add/Delete rows - CRUD operations
Schema Editor
Create and modify tables visually:
Create Table
- Click "New Table"
- Enter table name
- Add columns with types
- Configure constraints (PK, NOT NULL, UNIQUE)
- Click "Create"
Modify Table
- Select table from browser
- Click "Structure" tab
- Add/edit/remove columns
- Manage indexes
- Configure foreign keys
Supported Column Types
| Type | Description |
|---|---|
serial | Auto-incrementing integer |
integer | 32-bit integer |
bigint | 64-bit integer |
varchar(n) | Variable-length string |
text | Unlimited text |
boolean | true/false |
timestamp | Date and time |
jsonb | JSON data |
uuid | UUID |
SQL Editor
Execute arbitrary SQL:
SELECT
u.name,
COUNT(p.id) as post_count
FROM users u
LEFT JOIN posts p ON p.user_id = u.id
GROUP BY u.id
ORDER BY post_count DESC
LIMIT 10;Features:
- Monaco editor - VS Code-like experience
- Syntax highlighting - PostgreSQL-aware
- Auto-completion - Table and column names
- Multiple queries - Run multiple statements
- Export results - CSV/JSON export
Keyboard shortcuts:
Ctrl+Enter/Cmd+Enter- Execute queryCtrl+Shift+Enter- Execute selected textCtrl+S/Cmd+S- Save to history
Migration Manager
View and manage migrations:
Applied Migrations
| Name | Applied | Checksum |
|---|---|---|
| 20260125_create_users | Jan 25 10:30 | abc123... |
| 20260125_create_posts | Jan 25 10:31 | def456... |
Pending Migrations
| Name | Status |
|---|---|
| 20260126_add_indexes | Pending |
Actions:
- Apply All - Run all pending migrations
- Apply One - Run specific migration
- Rollback - Revert last migration
Configuration
Theme
Toggle dark/light mode in Settings.
Connection
View and copy connection details:
Host: localhost
Port: 5432
Database: myapp
User: postgres
Password: postgresPreferences
- Default schema
- Results per page
- Editor font size
- Auto-refresh interval
Screenshots
Dashboard
View all your databases at a glance.
Schema Browser
Navigate tables, views, and functions in a tree structure.
Data Viewer
Edit data inline with pagination and filtering.
SQL Editor
Execute queries with syntax highlighting and auto-completion.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+K | Quick search |
Ctrl+N | New query tab |
Ctrl+Enter | Execute query |
Ctrl+S | Save query |
Escape | Close modal |