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
Parent issue: #112
Implement the full lifecycle management for MongoDB connections, covering UI, state management, and backend integration.
Scope
mongodb-connect-dialog.vuewith fields for connection name, MongoDB URI (mongodb:///mongodb+srv://), host/port, username, password, auth source, auth mechanism, database name, and TLS options — with validation viavee-validate+zodmongodbcrate)connectionStore.ts) and the Tauri store layersrc-tauri/src/mongo_client.rswith Tauri commands formongo_test_connection, register inmain.rs, addmongodbcrate toCargo.tomlDatabaseType.MONGODB,MongoDBConnection,MongoCollectiontypes inconnectionStore.ts, extendConnectionunionenUS.tsandzhCN.tsKey files to create/modify
src-tauri/src/mongo_client.rs(new)src-tauri/src/main.rssrc-tauri/Cargo.tomlsrc/views/connect/components/mongodb-connect-dialog.vue(new)src/views/connect/components/connect-list.vuesrc/store/connectionStore.tssrc/datasources/mongoApi.ts(new)src/assets/svg/mongodb.svg(new)src/lang/enUS.ts,src/lang/zhCN.tsAcceptance criteria
Parent issue: #112