25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
chore(repo): polish github project layout
t8y225b845aee29e
diff --git a/.husky/pre-commit b/.husky/pre-commitindex f8b9c80a5f..a3cb5805d8 100644--- a/.husky/pre-commit+++ b/.husky/pre-commit@@ -1,4 +1,4 @@npx lint-stagedcd src-tauri && cargo fmt && git add -u .cd "$(git rev-parse --show-toplevel)/crates/dbx-core" && cargo fmt --all && git add -u .-cd "$(git rev-parse --show-toplevel)/src-web" && cargo fmt && git add -u .\ No newline at end of file+cd "$(git rev-parse --show-toplevel)/crates/dbx-web" && cargo fmt && git add -u .diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdnew file mode 100644index 0000000000..43273ef661--- /dev/null+++ b/CONTRIBUTING.md@@ -0,0 +1,71 @@+# Contributing to DBX++Thanks for helping improve DBX. This repository contains the desktop app, Rust backend, Docker service, documentation site, CLI, MCP server, and optional plugins.++## Project Layout++- `apps/desktop/` - Vue desktop frontend.+- `crates/dbx-core/` - shared Rust database core.+- `crates/dbx-web/` - Docker/web backend service.+- `src-tauri/` - Tauri desktop shell and native commands.+- `packages/` - Node packages, including CLI, MCP server, shared Node core, and app tests.+- `plugins/` - optional DBX plugins.+- `docs/` - documentation site and docs assets.+- `deploy/` - Docker and deployment assets.++## Development Setup++Required tools:++- Node.js `>=22.13.0`+- pnpm `10.27.0`+- Rust stable+- Java 17, when working on JDBC plugin packaging++Install dependencies:++```bash+pnpm install+```++Run the desktop app during development:++```bash+pnpm dev:tauri+```++Run the web backend:++```bash+pnpm dev:backend+```++## Checks++Before opening a pull request, run:++```bash+pnpm check+cargo fmt --check+cargo check --workspace --locked+```++For package changes, also run:++```bash+pnpm test:packages+pnpm publish:dry-run+```++For Docker or deployment changes, run the relevant Docker Compose or Docker build checks from `deploy/`.++## Pull Requests++- Keep changes focused and reviewable.+- Include tests for behavior changes when practical.+- Update documentation when user-facing behavior changes.+- Use clear commit messages following Conventional Commits, such as `fix(app): clamp window size`.++## Reporting Issues++Use GitHub Issues for reproducible bugs, feature requests, database compatibility reports, and questions. Include the DBX version, operating system, database type, and relevant logs or screenshots when possible.diff --git a/Cargo.toml b/Cargo.tomlindex 390ef8ef7f..52072b2d71 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -1,6 +1,6 @@[workspace]resolver = "2"-members = ["src-tauri", "crates/dbx-core", "src-web"]+members = ["src-tauri", "crates/dbx-core", "crates/dbx-web"][profile.release]panic = "abort"diff --git a/SECURITY.md b/SECURITY.mdnew file mode 100644index 0000000000..31abe6da34--- /dev/null+++ b/SECURITY.md@@ -0,0 +1,30 @@+# Security Policy++## Reporting a Vulnerability++Please do not report security vulnerabilities in public GitHub issues.++Use GitHub's private vulnerability reporting for this repository when available. If that is not available to you, open a minimal GitHub issue asking for a private security contact without including exploit details, credentials, tokens, connection strings, database dumps, or screenshots containing secrets.++## What to Include++Helpful reports include:++- Affected DBX version or commit.+- Operating system and installation method.+- The impacted component, such as desktop app, Docker service, CLI, MCP server, or JDBC plugin.+- Steps to reproduce in a safe test environment.+- Impact assessment and any known workaround.++## Scope++Security-sensitive areas include:++- Connection storage, config import/export, and encryption.+- Database credential handling.+- SSH tunnel and proxy handling.+- AI provider keys and OpenAI-compatible endpoint configuration.+- MCP and CLI access to local DBX connections.+- Docker web service authentication and data directory handling.++Please avoid testing against systems you do not own or have explicit permission to assess.diff --git a/src-web/Cargo.toml b/crates/dbx-web/Cargo.tomlsimilarity index 93%rename from src-web/Cargo.tomlrename to crates/dbx-web/Cargo.tomlindex 4b145d77a0..4969b9b105 100644--- a/src-web/Cargo.toml+++ b/crates/dbx-web/Cargo.toml@@ -8,7 +8,7 @@ name = "dbx-web"path = "src/main.rs"[dependencies]-dbx-core = { path = "../crates/dbx-core" }+dbx-core = { path = "../dbx-core" }axum = { version = "0.8", features = ["multipart"] }tower-http = { version = "0.6", features = ["cors", "fs", "compression-gzip", "trace"] }tokio = { version = "1", features = ["full"] }diff --git a/src-web/src/auth.rs b/crates/dbx-web/src/auth.rssimilarity index 100%rename from src-web/src/auth.rsrename to crates/dbx-web/src/auth.rsdiff --git a/src-web/src/error.rs b/crates/dbx-web/src/error.rssimilarity index 100%rename from src-web/src/error.rsrename to crates/dbx-web/src/error.rsdiff --git a/src-web/src/main.rs b/crates/dbx-web/src/main.rssimilarity index 100%rename from src-web/src/main.rsrename to crates/dbx-web/src/main.rsdiff --git a/src-web/src/routes/ai.rs b/crates/dbx-web/src/routes/ai.rssimilarity index 100%rename from src-web/src/routes/ai.rsrename to crates/dbx-web/src/routes/ai.rsdiff --git a/src-web/src/routes/connection.rs b/crates/dbx-web/src/routes/connection.rssimilarity index 100%rename from src-web/src/routes/connection.rsrename to crates/dbx-web/src/routes/connection.rsdiff --git a/src-web/src/routes/database_export.rs b/crates/dbx-web/src/routes/database_export.rssimilarity index 100%rename from src-web/src/routes/database_export.rsrename to crates/dbx-web/src/routes/database_export.rsdiff --git a/src-web/src/routes/history.rs b/crates/dbx-web/src/routes/history.rssimilarity index 100%rename from src-web/src/routes/history.rsrename to crates/dbx-web/src/routes/history.rsdiff --git a/src-web/src/routes/layout.rs b/crates/dbx-web/src/routes/layout.rssimilarity index 100%rename from src-web/src/routes/layout.rsrename to crates/dbx-web/src/routes/layout.rsdiff --git a/src-web/src/routes/mod.rs b/crates/dbx-web/src/routes/mod.rssimilarity index 100%rename from src-web/src/routes/mod.rsrename to crates/dbx-web/src/routes/mod.rsdiff --git a/src-web/src/routes/mongo.rs b/crates/dbx-web/src/routes/mongo.rssimilarity index 100%rename from src-web/src/routes/mongo.rsrename to crates/dbx-web/src/routes/mongo.rsdiff --git a/src-web/src/routes/plugins.rs b/crates/dbx-web/src/routes/plugins.rssimilarity index 100%rename from src-web/src/routes/plugins.rsrename to crates/dbx-web/src/routes/plugins.rsdiff --git a/src-web/src/routes/query.rs b/crates/dbx-web/src/routes/query.rssimilarity index 100%rename from src-web/src/routes/query.rsrename to crates/dbx-web/src/routes/query.rsdiff --git a/src-web/src/routes/redis.rs b/crates/dbx-web/src/routes/redis.rssimilarity index 100%rename from src-web/src/routes/redis.rsrename to crates/dbx-web/src/routes/redis.rsdiff --git a/src-web/src/routes/saved_sql.rs b/crates/dbx-web/src/routes/saved_sql.rssimilarity index 100%rename from src-web/src/routes/saved_sql.rsrename to crates/dbx-web/src/routes/saved_sql.rsdiff --git a/src-web/src/routes/schema.rs b/crates/dbx-web/src/routes/schema.rssimilarity index 100%rename from src-web/src/routes/schema.rsrename to crates/dbx-web/src/routes/schema.rsdiff --git a/src-web/src/routes/schema_cache.rs b/crates/dbx-web/src/routes/schema_cache.rssimilarity index 100%rename from src-web/src/routes/schema_cache.rsrename to crates/dbx-web/src/routes/schema_cache.rsdiff --git a/src-web/src/routes/sql_file.rs b/crates/dbx-web/src/routes/sql_file.rssimilarity index 100%rename from src-web/src/routes/sql_file.rsrename to crates/dbx-web/src/routes/sql_file.rsdiff --git a/src-web/src/routes/table_import.rs b/crates/dbx-web/src/routes/table_import.rssimilarity index 100%rename from src-web/src/routes/table_import.rsrename to crates/dbx-web/src/routes/table_import.rsdiff --git a/src-web/src/routes/transfer.rs b/crates/dbx-web/src/routes/transfer.rssimilarity index 100%rename from src-web/src/routes/transfer.rsrename to crates/dbx-web/src/routes/transfer.rsdiff --git a/src-web/src/routes/update.rs b/crates/dbx-web/src/routes/update.rssimilarity index 100%rename from src-web/src/routes/update.rsrename to crates/dbx-web/src/routes/update.rsdiff --git a/src-web/src/sse.rs b/crates/dbx-web/src/sse.rssimilarity index 100%rename from src-web/src/sse.rsrename to crates/dbx-web/src/sse.rsdiff --git a/src-web/src/state.rs b/crates/dbx-web/src/state.rssimilarity index 100%rename from src-web/src/state.rsrename to crates/dbx-web/src/state.rsdiff --git a/deploy/Dockerfile b/deploy/Dockerfileindex 7cc9e2ee15..9253a0d983 100644--- a/deploy/Dockerfile+++ b/deploy/Dockerfile@@ -34,10 +34,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \# This layer is cached by GHA as long as Cargo.toml/Cargo.lock don't change.COPY Cargo.toml Cargo.lock ./COPY crates/dbx-core/Cargo.toml crates/dbx-core/-COPY src-web/Cargo.toml src-web/+COPY crates/dbx-web/Cargo.toml crates/dbx-web/COPY src-tauri/Cargo.toml src-tauri/RUN mkdir -p crates/dbx-core/src && echo '' > crates/dbx-core/src/lib.rs \- && mkdir -p src-web/src && echo 'fn main() {}' > src-web/src/main.rs \+ && mkdir -p crates/dbx-web/src && echo 'fn main() {}' > crates/dbx-web/src/main.rs \&& mkdir -p src-tauri/src && echo 'fn main() {}' > src-tauri/src/main.rs && echo 'pub fn run() {}' > src-tauri/src/lib.rsCOPY src-tauri/build.rs src-tauri/@@ -56,12 +56,11 @@ RUN case "$TARGETARCH" in \# Copy real sources and rebuild (only application code recompiles)COPY crates/ crates/-COPY src-web/ src-web/# Docker COPY preserves original file timestamps, which may be older than the# dummy-source binary compiled above. Touch all .rs files so cargo detects the# source change and recompiles instead of reusing the dummy binary.-RUN find crates/ src-web/ -name '*.rs' -exec touch {} ++RUN find crates/ -name '*.rs' -exec touch {} +RUN case "$TARGETARCH" in \amd64) rust_target=x86_64-unknown-linux-gnu; lib_arch=x86_64-linux-gnu ;; \