← projects
$ pgscope
Open-source, read-only PostgreSQL monitoring tool — live dashboard, index/query insights, and replay, without ever executing anything beyond SELECT against system catalogs.
- →Built with a hexagonal Go backend (domain -> application -> infrastructure -> presentation) and a React/TypeScript frontend, enforced via golangci-lint depguard rules so the domain layer can never import infrastructure or pgx directly.
- →Hard architectural boundary: pgscope only ever runs read-only queries against Postgres system catalogs and stat views (pg_stat_*, pg_locks, pg_stat_statements) — it never writes, kills, or resets anything on the monitored database.
- →Live dashboard streams active sessions, lock waits, and blocking chains in real time over SSE, rendered as a graph view that clusters related sessions (hub/fan-in nodes, multi-hop waiting chains) so contention is visible at a glance.
- →Insights panel surfaces actionable findings straight from stats: duplicate indexes, unused indexes (gated on a stats-reset-aware observation window), missing-index candidates on high-write tables, slowest queries via pg_stat_statements, and largest tables.
- →Replay feature snapshots session/lock state over time so a past incident (e.g. a blocking chain that already resolved) can be scrubbed through after the fact, instead of only being visible live.
- →Cookie-based auth (HttpOnly, Secure, SameSite), per-IP rate limiting with configurable budgets, and automatic temporary IP bans after repeated invalid/scanner-style requests, all sitting in front of a single-operator tool with no execution surface to abuse.
- →Shipped with a production docker-compose template and a separate local-dev compose file that joins an existing Postgres via an external Docker network, plus GitHub Actions CI (Go and frontend, path-filtered) and branch protection rulesets.
GoReactTypeScriptPostgreSQLHexagonal ArchitectureMonitoringDockerCI/CDSecurity