📊 PG Dashboard
PG Dashboard is a plug-and-play PostgreSQL dashboard middleware for Express.
It maps a PostgreSQL database at runtime and serves a bundled React interface for browsing relations, building reports, exporting rows, running opt-in CRUD actions, and executing opt-in stored functions.
Project Links
- GitHub: https://github.com/raulcabralc/pg-dashboard
- npm: https://www.npmjs.com/package/pg-dashboard
- Issues: https://github.com/raulcabralc/pg-dashboard/issues
The package is meant to be mounted inside an existing Express app, similar to how Swagger UI is mounted:
app.use(
"/admin/db",
pgDashboard({ connectionString: process.env.DATABASE_URL }),
);
What It Solves
Most admin panels require predefined models, schemas, or generated resources. PG Dashboard reads PostgreSQL metadata dynamically and builds the UI from the live database structure.
It is useful for internal tools, demos, development environments, support dashboards, and controlled admin routes.
Design Goals
- Keep the host project isolated from dashboard internals.
- Avoid SQL injection when building dynamic SQL.
- Work with plain Express and
pg. - Ship the frontend as static assets inside the npm package.
- Keep mutation features opt-in.
Important Warning
PG Dashboard is powerful. It can expose database data and, if enabled, mutate rows or execute stored functions.
Do not expose it publicly without authentication and authorization middleware.