Skip to content

GMSSH/DBStudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—„οΈ DBStudio β€” Database Manager

A modern, web-based MySQL management tool for GMSSH. Lightweight, fast, and built for server operations.

DBStudio Icon

DBStudio is a database management plugin for the GMSSH desktop system, providing a visual database experience similar to Navicat / DBeaver, purpose-built for server administration.

πŸ“– δΈ­ζ–‡ζ–‡ζ‘£


✨ Features

Connection Management

  • πŸ” AES-256-GCM encrypted credential storage
  • πŸ”Œ Multiple concurrent connections with automatic pool recycling
  • βœ… Connection testing & one-click save

Data Operations

  • πŸ“Š Paginated data browsing (Grid View)
  • πŸ“ Inline editing β€” modify data directly in the grid
  • πŸ“‹ Form View β€” view and edit individual records vertically
  • βž• Add rows / πŸ—‘οΈ Delete rows with batch commit
  • πŸ” Safe CRUD for tables with and without primary keys

SQL Query

  • ⚑ SQL Editor powered by CodeMirror 6
  • πŸ“œ Query history with re-execution support
  • 🎯 Multi-statement execution, Ctrl+Enter shortcut

Table Structure Designer

  • πŸ—οΈ Visual structure editor (columns, indexes, foreign keys)
  • πŸ“ DDL preview with real-time diff comparison
  • πŸ”„ Auto-generated ALTER TABLE statements

Import / Export

  • πŸ“€ Database export (mysqldump compatible + pure Go fallback)
  • πŸ“₯ SQL file import with automatic database creation
  • πŸ“‘ Table-level data export (CSV / JSON / SQL formats)
  • πŸ“‹ Task management panel with real-time progress tracking

Database Overview

  • πŸ“ˆ Table/view listing with row count, size, and engine info
  • πŸ”Ž Object search & filter
  • πŸ“„ Quick DDL preview & copy

Internationalization

  • 🌐 Chinese / English dual-language support
  • πŸ”€ Auto-detects GMSSH system language

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           GMSSH Desktop (Host)          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚         Iframe (Plugin)           β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β”‚
β”‚  β”‚  β”‚   Vue 3  │◄──►│  Go Backend β”‚  β”‚  β”‚
β”‚  β”‚  β”‚ Naive UI β”‚    β”‚  JSON-RPC   β”‚  β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                            β”‚            β”‚
β”‚                    Unix Socket          β”‚
β”‚                    (app.sock)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
              β”‚    MySQL     β”‚
              β”‚   Server     β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Layer Tech Stack
Frontend Vue 3 + Naive UI + CodeMirror 6 + Pinia
Backend Go + simplejrpc-go (JSON-RPC over Unix Socket)
Communication GMSSH proxy β†’ Unix Socket β†’ JSON-RPC
Storage AES-256-GCM encrypted JSON (connection configs)

πŸ“ Project Structure

DBStudio/
β”œβ”€β”€ backend/                 # Go backend
β”‚   β”œβ”€β”€ handler/rpc/         # JSON-RPC route handlers
β”‚   β”œβ”€β”€ service/             # Business logic layer
β”‚   β”œβ”€β”€ pkg/
β”‚   β”‚   β”œβ”€β”€ config/          # Connection store (encrypted)
β”‚   β”‚   β”œβ”€β”€ db/              # Database abstraction layer
β”‚   β”‚   β”œβ”€β”€ files/           # File utilities
β”‚   β”‚   └── rpcutil/         # RPC utilities
β”‚   β”œβ”€β”€ i18n/                # Backend i18n
β”‚   β”œβ”€β”€ Makefile             # Build script
β”‚   └── main.go              # Entry point
β”‚
β”œβ”€β”€ www/                     # Vue frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # Core components
β”‚   β”‚   β”œβ”€β”€ views/           # Page layouts
β”‚   β”‚   β”œβ”€β”€ stores/          # Pinia state management
β”‚   β”‚   β”œβ”€β”€ styles/          # CSS design system
β”‚   β”‚   β”œβ”€β”€ i18n/            # Frontend i18n
β”‚   β”‚   └── utils/           # API client & SDK wrappers
β”‚   └── vite.config.js
β”‚
└── docs/                    # Design docs
    └── designs/             # Design specs (tokens, components)

πŸš€ Getting Started

Prerequisites

  • Go β‰₯ 1.21
  • Node.js β‰₯ 18 + pnpm
  • GMSSH desktop system (runtime environment)

Development

# 1. Frontend dev server
cd www
pnpm install
pnpm dev          # http://localhost:5173

# 2. Backend dev server
cd backend
go mod tidy
go run main.go

Build & Package

cd backend

make help         # Show all build targets
make amd64        # Build linux/amd64
make arm64        # Build linux/arm64
make package      # Build frontend + dual-arch packages (tar.gz)

Build output structure:

build/linux-amd64/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ bin/      # Backend binary + config + i18n
β”‚   └── www/      # Frontend static files
β”œβ”€β”€ data/         # Runtime data
β”œβ”€β”€ logs/         # Logs
└── tmp/          # Temporary files

πŸ”Œ GMSSH Integration

DBStudio runs as a GMSSH external application and communicates with the host via:

// Frontend communicates with GMSSH through window.$gm
window.$gm.request(url, options)   // API request proxy
window.$gm.execShell({ cmd })      // Remote command execution
window.$gm.chooseFile(callback)    // File picker
window.$gm.message.success(msg)    // UI feedback
window.$gm.userName                // Current logged-in user

πŸ“Έ Screenshots

Coming soon


🀝 Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork this repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit your changes: git commit -m 'feat: add some feature'
  4. Push to the branch: git push origin feature/your-feature
  5. Open a Pull Request

Development Guidelines

  • Backend: Layered architecture handler β†’ service β†’ pkg, i18n error messages
  • Frontend: Follow design specs under docs/designs/ (tokens, typography, spacing)
  • Commits: Use Conventional Commits

πŸ“„ License

MIT Β© GMSSH


Built with ❀️ for the GMSSH ecosystem

About

πŸš€A modern, web-based MySQL management tool for GMSSH β€” visual database operations, inline editing, SQL editor, import/export, and table designer. Built with Vue 3 + Go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors