Repo: github.com/waikyaw9999/mydbtool
mydbtool is a practical MVP inspired by DBeaver — a workbench for engineers to manage MongoDB, PostgreSQL, MySQL, and Microsoft SQL Server connections. Browse schemas or collections, preview rows, and run SQL or Mongo find/aggregate queries.
SSH tunnels, ER diagrams, import/export wizards, and multi-user cloud sync are intentionally out of scope.
Why I built it
I wanted a focused local tool for day-to-day database work: save encrypted connections, explore the object tree, preview data, run capped queries, and do basic DDL without leaving one UI — available both in the browser and as a packaged desktop app.
Stack
- App: Next.js App Router + React (TypeScript)
- Desktop: Electron shell hosting the Next.js Node server (no static export)
- Drivers:
pg,mysql2,mssql(tedious),mongodb - Security: AES-256-GCM password encryption, short-lived per-request DB connections, Electron
contextIsolation/ nonodeIntegration - Local ops: optional Docker Compose stack for demo engines
Highlights
- Four engines in one workbench (Postgres, MySQL, SQL Server, MongoDB)
- Object tree with create / rename / drop for databases, tables, columns, and collections
- Row preview (first 100, load more) with types when the engine provides them
- SQL editor and Mongo find/aggregate tabs; results capped (default 100, max 500)
- Per-connection read-only mode; destructive actions require explicit confirm
- Dark / light theme (follows system preference on first visit)
- Electron packaging for macOS / Windows / Linux installers
Run it
Browser:
npm installcp .env.example .env.local(setCONNECTIONS_SECRET)npm run dev→ http://localhost:3000
Desktop: npm run electron:dev (or electron:build for installers).
Safety note
Treat this as a local / trusted-network tool. The desktop build binds the Next.js server to 127.0.0.1 only. Do not expose it to the public internet without additional authentication in front.
Contact: waikyaw9999@gmail.com