React-based frontend for the Live Trading System.
See Live Trading System for overview and setup instructions.
- Dashboard: Overview of all operations and overall statistics
- Operations Management: List, view, create, pause, resume, and stop operations
- Operation Details: Detailed view with positions, transactions, trades, and orders
- Real-time Updates: Auto-refreshes data every 5 seconds
- Responsive Design: Clean and modern UI
- Node.js 18+ and npm (Node.js 16 may work but 18+ is recommended)
- Install dependencies:
npm install- Configure API URL (optional):
Create a
.envfile:
VITE_API_URL=http://localhost:8000- Start development server:
npm run devThe frontend will be available at http://localhost:3000
Note: Make sure you're accessing http://localhost:3000 (not 3001). If port 3000 is already in use, Vite will automatically use the next available port (e.g., 3001). Check the terminal output to see which port Vite is actually using.
npm run buildThe built files will be in the dist directory.
src/
├── api/
│ └── client.js # API client with axios
├── pages/
│ ├── Dashboard.jsx # Main dashboard
│ ├── Operations.jsx # Operations list
│ ├── CreateOperation.jsx # Create operation form
│ └── OperationDetail.jsx # Operation details view
├── utils/
│ └── formatters.js # Utility functions for formatting
├── App.jsx # Main app component with routing
├── App.css # App styles
├── main.jsx # Entry point
└── index.css # Global styles
The frontend communicates with the FastAPI backend through the API client in src/api/client.js. All API calls are centralized there.
- Overall statistics (total operations, active operations, total trades, P/L)
- Recent active operations list
- Quick access to create new operations
- Filter by status (active, paused, closed)
- View all operations with key metrics
- Actions: View, Pause, Resume, Stop
- Form to create new trading operations
- Configure asset, bar sizes, strategy
- Risk management settings (stop loss, take profit)
- Crash recovery configuration
- Tabbed interface with:
- Overview: Operation details and statistics
- Positions: Open and closed positions
- Transactions: All buy/sell transactions
- Trades: Completed round-trip trades
- Orders: All placed orders
The frontend uses:
- React 18 with hooks
- React Router for navigation
- Axios for API calls
- Vite as build tool
- Plain CSS for styling (no CSS framework)
- WebSocket integration for real-time updates
- Charts for P/L visualization
- Strategy performance graphs
- Position charts
- Alerts and notifications