Commit Graph

6 Commits

Author SHA1 Message Date
icy
e73e427e35 feat: crypto for key 2025-11-07 01:25:18 +08:00
icy
bbf34e70c2 feat: improve model/exchange deletion and selection logic
- Add soft delete support for AI models
  * Add deleted field to ai_models table
  * Implement soft delete with sensitive data cleanup
  * Filter deleted records in queries
- Replace browser confirm dialogs with custom styled modals
  * Create DeleteConfirmModal component with Binance theme
  * Add proper warning messages and icons
  * Improve user experience with consistent styling
- Fix duplicate model/exchange display in selection dropdowns
  * Use supportedModels/supportedExchanges for modal selectors
  * Use configuredModels/configuredExchanges for panel display
  * Remove redundant selectableModels/selectableExchanges logic
- Enhance data management
  * Refresh data after deletion operations
  * Proper state cleanup after modal operations
  * Clear sensitive data during soft delete
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-11-06 22:05:21 +08:00
icy
08f57fe5c9 feat: soft deleted exchange add 2025-11-06 20:39:46 +08:00
icy
b15b0fb01a refactor: drop sqlite fallback and admin mode 2025-11-06 17:52:30 +08:00
icy
7d58f56e49 feat: implement hybrid database architecture and frontend encryption
- Add PostgreSQL + SQLite hybrid database support with automatic switching
- Implement frontend AES-GCM + RSA-OAEP encryption for sensitive data
- Add comprehensive DatabaseInterface with all required methods
- Fix compilation issues with interface consistency
- Update all database method signatures to use DatabaseInterface
- Add missing UpdateTraderInitialBalance method to PostgreSQL implementation
- Integrate RSA public key distribution via /api/config endpoint
- Add frontend crypto service with proper error handling
- Support graceful degradation between encrypted and plaintext transmission
- Add directory creation for RSA keys and PEM parsing fixes
- Test both SQLite and PostgreSQL modes successfully
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-11-06 01:50:06 +08:00
icy
6426696258 feat: migrate from SQLite to PostgreSQL + Redis architecture
Major database migration to modernize the AI trading system:
• **Database Migration**:
  - Add PostgreSQL 15 and Redis 7 services to docker-compose
  - Create comprehensive PostgreSQL schema with proper indexes and triggers
  - Implement DatabaseInterface for multi-database support
  - Add automatic environment-based database selection
• **Infrastructure**:
  - PostgreSQL: ACID transactions, better concurrency, JSON support
  - Redis: High-performance caching layer (prepared for future use)
  - Docker services with health checks and dependency management
  - Persistent volumes for data safety
• **Code Refactoring**:
  - Abstract database operations through DatabaseInterface
  - Implement PostgreSQL-specific operations with proper syntax
  - Update all SQL queries to support both SQLite and PostgreSQL
  - Fix foreign key constraints and data type conversions
• **Migration Tools**:
  - Automated data migration script from SQLite to PostgreSQL
  - Complete backup and restore procedures
  - One-click migration script with validation
• **Compatibility**:
  - Backward compatible with existing SQLite deployments
  - Environment variable driven database selection
  - Preserved all existing functionality and data
🎯 Benefits: Better performance, scalability, and reliability for production deployments
2025-11-04 15:09:11 +08:00