A modern, feature-rich desktop application for managing the Fusion Alpha Trading Bot system. Built with Electron, React, TypeScript, and Tailwind CSS.
- β Add/remove trading bot users
- β Configure Gate.io API credentials
- β Toggle between REAL and SIMULATED trading modes
- β Start/stop individual users
- β Balance monitoring with configurable thresholds
- β Close all positions with one click
- β Export functionality
- β Add/remove Key Opinion Leaders
- β Support for NORMAL and WWG KOL types
- β Configure Discord channel monitoring
- β Filter by specific Discord author IDs
- β Visual status indicators
- β Link users to KOLs for automated trading
- β
Multiple amount modes:
- Loss Fixed: Set maximum loss threshold
- Fixed: Specify exact amounts per symbol
- Percentage: Use percentage-based amounts
- β Reverse trading option
- β Future symbols filtering
- β Start/stop/restart track control
- β Real-time status monitoring
- β Overview statistics
- β Real-time data updates (configurable interval)
- β Quick action buttons
- β Activity logging
- π¨ Dark mode optimized interface
- π Smooth animations and transitions
- π± Responsive design
- πΎ Persistent settings
- β‘ Fast and lightweight
- Node.js 18+ and npm
- Fusion Alpha API server running (default: http://127.0.0.1:8888)
# Navigate to BotViewer directory
cd BotViewer
# Install dependencies
npm install
# Start in development mode
npm run devThe application will open automatically with:
- React dev server on http://localhost:5173
- Electron window with live reload
# Build the application
npm run build
# Or use the build script
chmod +x build.sh
./build.sh
# Package for distribution
npm run build:electronBuilt applications will be in the release/ directory.
BotViewer/
βββ electron/ # Electron main process
β βββ main.ts # Main process entry
β βββ preload.ts # Preload script
β βββ tsconfig.json # TypeScript config for Electron
βββ src/ # React application
β βββ components/ # React components
β β βββ Dashboard.tsx
β β βββ UserManagement.tsx
β β βββ KOLManagement.tsx
β β βββ TrackManagement.tsx
β β βββ SettingsPanel.tsx
β βββ services/ # API services
β β βββ api.ts # API client
β βββ store/ # State management
β β βββ settings.ts # Settings store (Zustand)
β βββ types/ # TypeScript types
β β βββ index.ts
β βββ App.tsx # Main app component
β βββ main.tsx # React entry point
β βββ index.css # Global styles
βββ package.json
βββ vite.config.ts
βββ tailwind.config.js
βββ tsconfig.json
- Electron: Desktop application framework
- React 18: UI library
- TypeScript: Type-safe development
- Vite: Fast build tool and dev server
- Tailwind CSS: Utility-first CSS framework
- TanStack Query: Data fetching and caching
- Zustand: Lightweight state management
- Axios: HTTP client
- Lucide React: Beautiful icon library
Configure the application in the Settings tab:
- API Base URL: Set your Fusion Alpha API server URL
- Refresh Interval: Control how often data is refreshed (minimum 1000ms)
Settings are automatically persisted to local storage.
The application communicates with the Fusion Alpha API server. All API endpoints from the original client.py are implemented:
POST /user/add- Add new userGET /user/get- Get usersPOST /user/update- Update userDELETE /user/remove- Remove userPOST /user/run- Start userPOST /user/stop- Stop userPOST /user/monitor/run- Start balance monitorPOST /user/monitor/stop- Stop balance monitorPOST /user/close_all- Close all positionsPOST /user/exporter/start- Start exporterPOST /user/exporter/stop- Stop exporter
POST /kol/add- Add new KOLGET /kol/get- Get KOLsDELETE /kol/remove- Remove KOL
POST /kol/track/add- Add track configGET /kol/track/get- Get track configsDELETE /kol/track/remove- Remove track configPOST /kol/track/start- Start trackingPOST /kol/track/stop- Stop trackingPOST /kol/track/restart- Restart tracking
- Click "Add User" in the Users tab
- Fill in:
- Username
- Gate.io API Key
- Gate.io Secret Key
- Trade Mode (REAL/SIMULATED)
- Optionally enable balance monitoring with thresholds
- Click "Add User"
- Ensure you have at least one User and one KOL created
- Go to the Tracks tab
- Click "Add Track Config"
- Select user and KOL
- Choose amount mode and configure parameters
- Optionally add specific futures to track
- Enable reverse trading if needed
- Click "Add Track Config"
- Start the track with the "Start" button
- Verify API server is running
- Check the API Base URL in Settings
- Ensure no firewall is blocking the connection
- Check refresh interval in Settings
- Verify API server is responding
- Check browser console for errors
- Delete
node_modulesandpackage-lock.json - Run
npm installagain - Ensure Node.js version is 18+
- Create types in
src/types/index.ts - Add API methods in
src/services/api.ts - Create/update components in
src/components/ - Use TanStack Query for data fetching
- Follow existing patterns for consistency
- Use TypeScript strict mode
- Follow React best practices
- Use Tailwind utility classes
- Keep components focused and reusable
- Add proper error handling
MIT License - See LICENSE file for details
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For issues and questions:
- Create an issue on GitHub
- Check existing documentation
- Review API server logs
Built as a modern replacement for the Python CLI client with enhanced visualization and user experience.
Fusion Alpha Manager - Professional trading bot management made easy.