Commit Graph

17 Commits

Author SHA1 Message Date
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
icy
e58fbfa10b Merge branch 'dev' into beta
# Conflicts:
#	config/database.go
#	main.go
2025-11-02 22:11:07 +08:00
yuanshi2016
7302f96e8e K线获取方式改为websocket组合流. 带重拨机制
流程为下:
1. 启动时使用所有交易员设置的币种(去重) 如果交易员未配置,则使用系统默认
2. 在决策获取K线时 如果没有缓存 则先实时获取后再添加订阅. ps: 适用于Api方式的币种列表
2025-11-02 14:03:13 +08:00
icy
266481caee Add beta mode 2025-11-02 02:31:19 +08:00
icy
182d0b695d Merge branch 'dev' of https://github.com/tinkle-community/nofx 2025-11-01 20:09:17 +08:00
SkywalkerJi
5ad135310f Supports custom system prompts and custom models. 2025-11-01 19:45:54 +08:00
icy
6d81a773f2 Resolve merge conflicts in AITradersPage.tsx
- Fixed import statement conflict (using 'type Language')
- Merged exchange configuration logic preserving support for multiple exchange types
- Kept comprehensive form handling for Binance, Hyperliquid, Aster, and OKX exchanges
- Updated security warning messages to use proper translation keys
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-11-01 19:01:44 +08:00
icy
8d93a8a095 Fixed health check; Fixed dex config; Add rank trader info view; 2025-11-01 18:58:32 +08:00
SkywalkerJi
7542f9df49 * Fixed the custom model URL.
*   Added functionality for custom model names.
2025-11-01 16:09:15 +08:00
icy
d1d9810075 竞赛fix、交易员新增参数 2025-11-01 02:17:11 +08:00
icy
0f9978ec6b Sync config.json to config.db for manual modify admin_mode and other configs 2025-10-31 15:24:18 +08:00
icy
12550b26e9 admin_mode config 2025-10-31 14:34:53 +08:00
icy
142863f554 Add MarginMode configration 2025-10-31 13:14:24 +08:00
icy
72e14c1f0d rename fix 2025-10-31 04:07:14 +08:00
icy
ceb2f7b435 account system、custom prompt 2025-10-31 03:42:01 +08:00
icy
82beac0920 sync fork 2025-10-30 20:51:22 +08:00