DB Storage Manager is a cross-platform desktop application built with Python and PyQt6. It follows a secure, modular architecture designed for professional database management.
- Main Window: QMainWindow with tabbed interface
- Widgets: Modular PyQt6 widgets for each feature
- Threading: QThread for background database operations
- Event Loop: Qt event loop for async operations
- Connection Factory: Centralized database connection management
- Async Operations: asyncio for non-blocking database operations
- Query Execution: Safe query execution with validation
- Analysis Engine: Storage analysis and metrics calculation
- Driver Abstraction: Unified interface for all database types
- Encrypted Storage: cryptography (Fernet) for credential encryption
- Safe Mode: Prevents dangerous operations by default
- SSH Tunneling: Secure remote database access (planned)
- Input Validation: Comprehensive input sanitization
- Master Key: Per-installation encryption key
- PyQt6 Components: Native Qt widgets
- Tabbed Interface: Main window with multiple tabs
- Responsive Design: Adapts to different screen sizes
- Theme Support: Light, dark, and system themes
- Threading: Background operations don't block UI
- Adapter Pattern: Pluggable backup storage adapters
- Local Adapter: File system backups
- S3 Adapter: AWS S3 and compatible services
- Google Drive Adapter: Google Drive integration
- Scheduler: Automated backup scheduling
- PyQt6 6.6+: Modern Qt framework for Python
- PyQt6-Charts: Data visualization (optional)
- QThread: Background processing
- Qt Signals/Slots: Event-driven architecture
- Python 3.10+: Modern Python with async support
- asyncio: Asynchronous operations
- Database Drivers:
- psycopg2-binary (PostgreSQL)
- pymysql (MySQL/MariaDB)
- aiosqlite (SQLite)
- pymongo (MongoDB)
- redis (Redis)
- cryptography: Cryptographic library (Fernet)
- paramiko: SSH tunneling support (planned)
- boto3: AWS S3 integration
- google-api-python-client: Google Drive API
- schedule: Backup scheduling
- setuptools: Package management
- pytest: Testing framework
- black: Code formatting
- flake8: Code linting
- mypy: Static type checking
User Input → Connection Dialog → Validation → Encryption → Secure Storage
Connection → Factory → Driver → Async Query → Data Processing → UI Update
Query Input → Validation → Safe Mode Check → Async Execution → Results → UI
Connection → Database Export → Compression → Encryption → Adapter → Storage
- All credentials encrypted with cryptography (Fernet)
- Master key generated per installation
- Stored in user data directory with restrictive permissions
- Local-only storage (no external transmission)
- Blocks dangerous operations by default
- User can override with explicit confirmation
- Prevents accidental data modification
- Validates queries before execution
- Algorithm: Fernet (symmetric encryption)
- Key Management: Master key stored securely
- Key Derivation: PBKDF2 for key generation
- Storage: Encrypted JSON files
- Async/await for non-blocking operations
- Connection pooling (planned)
- Lazy loading for large datasets
- Background processing for heavy operations
- QThread for background operations
- Efficient widget updates
- Lazy loading for large tables
- Minimal re-rendering
- Smart resource cleanup
- Efficient data structures
- Proper async context management
- Garbage collection optimization
- base.py: Abstract base classes and interfaces
- factory.py: Connection factory pattern
- postgres.py: PostgreSQL implementation
- mysql.py: MySQL/MariaDB implementation
- sqlite.py: SQLite implementation
- mongo.py: MongoDB implementation
- redis.py: Redis implementation
- base.py: Backup adapter interface
- manager.py: Backup orchestration
- local.py: Local file system adapter
- s3.py: AWS S3 adapter
- googledrive.py: Google Drive adapter
- scheduler.py: Scheduled backup manager
- main_window.py: Main application window
- dashboard.py: Storage analysis dashboard
- connections.py: Connection management
- query.py: Query console
- backups.py: Backup management
- settings.py: Application settings
- store.py: Encrypted storage implementation
- Plugin API for extensions
- Third-party plugin support
- Plugin marketplace
- Driver interface for new databases
- Custom analysis modules
- Integration with external tools
- Implement BackupAdapter interface
- Register with BackupManager
- Support for new storage backends
- Windows: Executable with PyInstaller (planned)
- macOS: Application bundle (planned)
- Linux: AppImage or package (planned)
- Virtual environment for isolation
- Requirements.txt for dependencies
- Setup.py for package installation
- pytest for testing
- All database operations use async/await
- QThread bridges async code with Qt event loop
- Non-blocking UI during database operations
- Proper error handling and cancellation
- Async backup creation and restoration
- Progress reporting through signals
- Background processing for large backups
- Cancellation support
- Connection errors handled gracefully
- Query errors displayed to user
- Retry logic for transient errors
- Detailed error messages
- User-friendly error dialogs
- Error logging for debugging
- Graceful degradation
- Recovery suggestions
- Test individual modules
- Mock database connections
- Test error handling
- Test encryption/decryption
- Test full workflows
- Test with real databases (optional)
- Test backup/restore cycles
- Test UI interactions
- Test with large datasets
- Test concurrent operations
- Test memory usage
- Test response times
Made with ❤️ by VoxHash
DB Storage Manager - Professional database management made simple! 🗄️✨