Motivation & Problem
During the architectural audit, several layer boundary violations and circular imports were identified:
- Core-to-Feature Inverted Imports:
- lib/core/database/mysql_connection.dart, lib/core/database/mongodb_connection.dart, and lib/core/database/redis_connection.dart import package:querya_desktop/features/connections/ssl_certificate_support.dart. Low-level database drivers should not depend on feature packages.
- lib/core/extensions/extension_driver_catalog.dart imports package:querya_desktop/features/connections/connection_type_choice.dart and package:querya_desktop/features/connections/new_connection_dialog.dart.
- Circular Feature Imports:
- new_connection_dialog.dart imports connection_type_choice.dart, while connection_type_choice.dart imports new_connection_dialog.dart because enum ConnectionType is defined in the dialog file.
Proposed Scope
- Extract SSL Support to Core:
- Move lib/features/connections/ssl_certificate_support.dart to lib/core/security/ssl_certificate_support.dart.
- Update imports in mysql_connection.dart, mongodb_connection.dart, redis_connection.dart, redis_connection_form.dart, and mongodb_connection_form.dart.
- Extract Connection Models to Core:
- Move enum ConnectionType and ConnectionTypeChoice models from features/connections/ to lib/core/database/connection_type.dart and lib/core/database/connection_type_choice.dart.
- Update ExtensionDriverCatalog and new_connection_dialog.dart to import from lib/core/database/.
- Eliminate circular imports between connection dialog and choice models.
- Verify that zero files in lib/core/ import from lib/features/.
Acceptance Criteria
- Zero imports of package:querya_desktop/features/ exist inside lib/core/.
- No circular imports exist between new_connection_dialog.dart and connection choice models.
- All existing tests and static analysis pass (flutter analyze).
Reactions are currently unavailable
Motivation & Problem
During the architectural audit, several layer boundary violations and circular imports were identified:
Proposed Scope
Acceptance Criteria