Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Universal Database Workbench

A modern, cloud-ready database management and visual design platform built with NestJS, GraphQL, React, and Vite. Workbench provides a comprehensive solution for managing multiple database types with intuitive schema visualization, data exploration, and real-time team collaboration features.

The Next-Generation Alternative to MySQL Workbench, DBeaver, and Adminer β€” Built for modern development teams and deployment pipelines.

πŸš€ Features

  • Multi-Database Support: Seamless integration with PostgreSQL, MySQL, and MSSQL
  • Visual Schema Designer: Interactive diagram-based schema creation and modification
  • Data Browser: Powerful table data exploration and manipulation
  • Real-time Notifications: WebSocket-based event system for collaborative updates
  • Multi-Workspace Support: Organize projects into isolated workspaces with team management
  • Identity & Access Management: Role-based access control and team permissions
  • Feature Flags: Dynamic feature toggle system for controlled rollouts
  • Connection Management: Secure database connection handling with encryption
  • Schema Inspector: Detailed schema analysis and validation tools
  • SQL Engine: Advanced query execution and result streaming
  • πŸ€– AI Agent Support: Model Context Protocol (MCP) integration for autonomous database management by Claude and other AI agents
  • Agent Tools: 30+ tools for schema discovery, query execution, performance analysis, and automation

πŸ† Why Workbench? (vs. MySQL Workbench, DBeaver, Adminer)

At a Glance

MySQL Workbench    β†’ Desktop application for MySQL only
DBeaver            β†’ Heavy Java-based tool, not web-first
Adminer            β†’ Lightweight but lacks team features
Workbench (Ours)   β†’ 🎯 Modern, collaborative, multi-database, open-source

The Real Difference

Feature Workbench MySQL Workbench DBeaver Adminer
Multi-Database Support βœ… PG, MySQL, MSSQL ⚠️ MySQL only βœ… 30+ databases βœ… Multiple
Real-time Collaboration βœ… Team workspaces ❌ Single user ❌ No ❌ No
Visual Schema Designer βœ… Interactive diagrams βœ… Basic ER diagrams βœ… Basic ❌ No
Cloud/Web-Based βœ… Full SaaS ready ❌ Desktop only ⚠️ Limited βœ… Web-based
Team Management βœ… Built-in RBAC ❌ No ❌ No ⚠️ Basic
API-First Architecture βœ… GraphQL API ❌ No ❌ No ❌ No
Open Source βœ… Yes ❌ No βœ… Yes βœ… Yes
Modern Tech Stack βœ… React, Node.js ❌ Legacy C++ ⚠️ Java ⚠️ PHP
Real-time Updates βœ… WebSocket support ❌ No ❌ No ❌ No
Feature Flags βœ… Built-in ❌ No ❌ No ❌ No
TypeScript/Type Safety βœ… End-to-end ❌ No ❌ No ❌ No
Extensible API βœ… GraphQL ❌ No ⚠️ Limited ❌ REST only
Self-Hostable βœ… Docker included ⚠️ Limited βœ… Yes βœ… Yes
Active Development βœ… Actively maintained ⚠️ Slower updates βœ… Very active ⚠️ Slower

Key Advantages

🌐 True Cloud-Native Architecture

Unlike MySQL Workbench's desktop-only approach, Workbench is built as a web application that works anywhere:

  • No installation required β€” just open in browser
  • Instant updates without user intervention
  • Works on Windows, Mac, Linux, iOS, Android
  • Perfect for remote teams and distributed development

πŸ‘₯ Built-in Team Collaboration

MySQL Workbench: Single-user desktop application
Workbench: Native workspace and team support

  • Share connections and schemas with team members
  • Role-based access control (RBAC)
  • Activity tracking and notifications
  • Real-time schema change notifications
  • Invite teammates with permission levels

πŸ“± Multi-Database Management

MySQL Workbench: MySQL only
Workbench: PostgreSQL, MySQL, and MSSQL

  • Switch between databases without leaving application
  • Same interface for all databases
  • Unified schema designer across databases
  • Query translation and optimization

⚑ Modern, Fast Architecture

  • Built with React + Vite (not legacy desktop frameworks)
  • GraphQL API for efficient data fetching
  • Real-time updates via WebSockets
  • Type-safe end-to-end (TypeScript everywhere)
  • Lightning-fast UI with hot-reload development

πŸ”Œ Extensible via GraphQL API

  • Full REST-like API access via GraphQL
  • Build custom tools and integrations
  • Programmatic schema management
  • Ideal for CI/CD pipelines and automation

πŸš€ SaaS/Self-Hosted Flexibility

  • Self-host with Docker (included docker-compose.yml)
  • Deploy to any cloud (AWS, Azure, GCP, Heroku, etc.)
  • Zero vendor lock-in
  • Full source code transparency

πŸ” Enterprise Security

  • JWT-based authentication
  • Row-level security with workspace isolation
  • Encrypted credential storage
  • CORS and input validation
  • Self-hosting for compliance requirements

Perfect For...

βœ… Development Teams β€” Collaborate on database schema design
βœ… Remote/Distributed Teams β€” Access from anywhere
βœ… Multi-Database Environments β€” Single tool for multiple databases
βœ… DevOps/Automation β€” API-first design for CI/CD integration
βœ… Startups β€” Open source, self-hostable, scalable
βœ… Enterprises β€” Full control with self-hosting option
βœ… Cloud-Native Applications β€” Built for modern deployments


πŸ“ Project Structure

workbench/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ api/                    # NestJS GraphQL Backend
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ modules/       # Feature modules
β”‚   β”‚   β”‚   β”œβ”€β”€ core/          # Core services
β”‚   β”‚   β”‚   β”œβ”€β”€ common/        # Shared utilities
β”‚   β”‚   β”‚   └── main.ts        # Entry point
β”‚   β”‚   └── prisma/            # Database schema
β”‚   └── web/                    # React Frontend
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ components/    # React components
β”‚       β”‚   β”œβ”€β”€ context/       # Context providers
β”‚       β”‚   β”œβ”€β”€ graphql/       # GraphQL queries
β”‚       β”‚   β”œβ”€β”€ stores/        # State management
β”‚       β”‚   └── routes/        # Page routes
β”‚       └── vite.config.ts     # Vite configuration
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ db-drivers/            # Multi-database driver package
β”‚   β”‚   └── src/
β”‚   β”‚       β”œβ”€β”€ postgres/      # PostgreSQL implementation
β”‚   β”‚       β”œβ”€β”€ mysql/         # MySQL implementation
β”‚   β”‚       └── mssql/         # MSSQL implementation
β”‚   └── shared-types/          # Shared TypeScript types
└── docker/                     # Docker configurations

πŸ› οΈ Tech Stack

Backend

  • Runtime: Node.js with TypeScript
  • Framework: NestJS 11
  • API: GraphQL with Apollo Server
  • Database ORM: Prisma 6
  • Authentication: JWT with Passport
  • Security: bcryptjs for password hashing
  • Real-time: WebSocket support via Apollo Server

Frontend

  • Framework: React 18
  • Build Tool: Vite 6
  • Styling: Tailwind CSS 4
  • State Management: Zustand
  • GraphQL Client: Apollo Client
  • Editor: Monaco Editor
  • UI Components: Radix UI, custom shadcn-inspired components
  • Data Tables: TanStack React Table
  • Diagrams: Dagre for graph layouts

Infrastructure

  • Monorepo Tool: Turbo
  • Package Manager: pnpm
  • Containerization: Docker & Docker Compose
  • Version Control: Git

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ and pnpm 10+
  • Docker & Docker Compose
  • PostgreSQL, MySQL, or MSSQL for target databases

Installation

  1. Clone the repository

    git clone <repository-url>
    cd workbench
  2. Install dependencies

    pnpm install
  3. Set up environment

    # Create .env files in apps/api
    cp apps/api/.env.example apps/api/.env
  4. Start Docker services

    docker-compose up -d
  5. Initialize database

    pnpm db:generate
    pnpm db:migrate
  6. Start development servers

    pnpm dev

The application will be available at:

πŸ“š Documentation

πŸ”§ Available Commands

Development

# Start all services in development mode
pnpm dev

# Watch and rebuild
pnpm build

# Run tests
pnpm test

# Lint code
pnpm lint

Database

# Generate Prisma client
pnpm db:generate

# Run migrations
pnpm db:migrate

# Open Prisma Studio
pnpm db:studio

Workspace Operations

# Filter commands to specific workspace
pnpm --filter api build
pnpm --filter web dev

# View task graph
turbo graph

πŸ“¦ Core Packages

@workbench/db-drivers

Multi-database abstraction layer supporting:

  • PostgreSQL via pg
  • MySQL via mysql2
  • MSSQL via tedious

Features:

  • Connection pooling
  • Query execution
  • Error handling
  • Type safety

@workbench/shared-types

Shared TypeScript types and interfaces used across frontend and backend:

  • GraphQL schema types
  • API response models
  • Domain entities
  • Utility types

πŸ—οΈ Architecture Highlights

  • Modular Design: Feature-based module organization in the API
  • GraphQL-First: Type-safe API layer with full schema introspection
  • Separation of Concerns: Clear boundaries between data, business logic, and presentation
  • Real-time Updates: WebSocket support for live notifications
  • Scalable Database: Prisma enables easy database migration and evolution

πŸ” Security

  • JWT Authentication: Secure token-based authentication
  • CORS Protection: Configured CORS for frontend domain
  • Input Validation: DTO-based request validation with class-validator
  • Password Hashing: bcryptjs for secure password storage
  • Connection Security: Encrypted database credentials

πŸš€ Deployment

Production Build

# Build all packages
pnpm build

# API production start
node apps/api/dist/main

# Web production preview
pnpm --filter web preview

Docker Deployment

docker-compose up --build

πŸ’‘ Use Cases

Scenario 1: Distributed Development Team

A startup with developers across 3 continents needs to collaborate on database schema design.

Without Workbench:

  • Use MySQL Workbench (desktop only) β€” not web-accessible
  • Email schema files back and forth
  • Merge conflicts and version control nightmares
  • No real-time collaboration

With Workbench:

  • βœ… Team members access same workspace from browser
  • βœ… Real-time notifications of schema changes
  • βœ… Role-based permissions (Junior Dev can view, Senior Lead can approve)
  • βœ… Complete audit trail of who changed what

Scenario 2: Multi-Database Migration

Enterprise needs to migrate from MySQL to PostgreSQL while maintaining MySQL for legacy systems.

Without Workbench:

  • Use different tools for MySQL and PostgreSQL
  • Learn different interfaces and workflows
  • Manual query translation between databases
  • No unified schema visualization

With Workbench:

  • βœ… Single interface for both MySQL and PostgreSQL
  • βœ… Side-by-side schema comparison
  • βœ… Query execution on both databases simultaneously
  • βœ… Automatic schema synchronization

Scenario 3: CI/CD Pipeline Integration

DevOps team wants to automate database schema deployments.

Without Workbench:

  • Limited API access, must use CLI tools
  • Manual migration scripts
  • No version control integration
  • Complex bash scripting

With Workbench:

  • βœ… Full GraphQL API for automation
  • βœ… Feature flags for gradual rollouts
  • βœ… Programmatic schema management
  • βœ… Perfect for Infrastructure-as-Code

Scenario 4: Client Database Management

SaaS company manages customer databases and needs secure, multi-tenant access.

Without Workbench:

  • Give direct database access (security risk!)
  • Each customer needs their own tools
  • Complex permission management
  • No audit trail

With Workbench:

  • βœ… Workspace isolation per customer
  • βœ… Role-based access control
  • βœ… Complete audit logging
  • βœ… Safe, permission-gated access

🀝 Contributing

See CONTRIBUTING.md for guidelines on:

  • Code standards
  • Commit conventions
  • Pull request process
  • Development workflow

πŸ“ License

[Add your license here]

πŸ“§ Support & Community


🌟 Key Highlights

Aspect Benefit
Cost Open source, self-hostable (no subscription fees)
Speed Modern tech stack ensures lightning-fast performance
Team Ready Built-in collaboration, no additional tools needed
Multi-Database Manage PostgreSQL, MySQL, MSSQL from one place
Secure Full control with self-hosting option
Extensible GraphQL API for custom integrations
Modern Active development, continuous improvements

Universal Database Workbench β€” The open-source, web-based alternative to MySQL Workbench for modern development teams.

Made by CrewDigital | Universal Database Workbench v0.1.0

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages