Skip to content

Module: MongoDB Connection Management #333

@Blankll

Description

@Blankll

Implement the full lifecycle management for MongoDB connections, covering UI, state management, and backend integration.

Scope

  • Database type picker: Add MongoDB (with logo) to the 'Add New Connection' picker alongside ElasticSearch and DynamoDB
  • Connection form: Create mongodb-connect-dialog.vue with fields for connection name, MongoDB URI (mongodb:// / mongodb+srv://), host/port, username, password, auth source, auth mechanism, database name, and TLS options — with validation via vee-validate + zod
  • Test Connection: Verify MongoDB connectivity before saving (backed by a new Tauri Rust command using the mongodb crate)
  • Persist connections: Save/load MongoDB connections in Pinia store (connectionStore.ts) and the Tauri store layer
  • Connection list: Display MongoDB connections in the connection list with a MongoDB logo badge; support connecting, editing, and removing (with confirmation dialog)
  • Backend (Rust): Create src-tauri/src/mongo_client.rs with Tauri commands for mongo_test_connection, register in main.rs, add mongodb crate to Cargo.toml
  • Types: Add DatabaseType.MONGODB, MongoDBConnection, MongoCollection types in connectionStore.ts, extend Connection union
  • i18n: Add all MongoDB connection strings to enUS.ts and zhCN.ts

Key files to create/modify

  • src-tauri/src/mongo_client.rs (new)
  • src-tauri/src/main.rs
  • src-tauri/Cargo.toml
  • src/views/connect/components/mongodb-connect-dialog.vue (new)
  • src/views/connect/components/connect-list.vue
  • src/store/connectionStore.ts
  • src/datasources/mongoApi.ts (new)
  • src/assets/svg/mongodb.svg (new)
  • src/lang/enUS.ts, src/lang/zhCN.ts

Acceptance criteria

  • User can select MongoDB from the database type picker
  • User can fill, test, and save a MongoDB connection
  • MongoDB connections appear in the connection list with the correct logo
  • User can edit and remove MongoDB connections
  • Backend verifies connectivity via Tauri command
  • feature toggle implemented and connection item hidden in production

Parent issue: #112

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions