A comprehensive, production-ready trading bot platform with live trading capabilities, automated bot execution, real-time performance tracking, and full subscription management.
| Feature | Status | Details |
|---|---|---|
| User Authentication | โ Complete | JWT, Google OAuth, email verification, password reset |
| Subscription Management | โ Complete | Stripe integration, tiered plans, webhook handling |
| API Key Management | โ Complete | Encrypted storage, exchange integration |
| Bot Creation & Management | โ Complete | CRUD operations, strategy configuration |
| Live Trading Engine | โ Complete | Real-time market analysis, order execution |
| Bot Scheduler | โ Complete | Automated execution, cron jobs |
| Backtesting System | โ Complete | Historical data analysis, strategy validation |
| Performance Tracking | โ Complete | Real-time PnL, win rate, trade history |
| Error Handling & Logging | โ Complete | Comprehensive error tracking, bot status management |
| Frontend Dashboard | โ Complete | Modern UI, real-time updates, responsive design |
- Runtime: Node.js 18+ with TypeScript
- Framework: Express.js with middleware architecture
- Database: MongoDB with Mongoose ODM
- Authentication: JWT + Google OAuth
- Payments: Stripe (subscriptions, webhooks)
- Trading: Binance API integration
- Scheduling: node-cron for bot automation
- Security: bcrypt, encryption, CORS, rate limiting
- Framework: React 18 with TypeScript
- State Management: Redux Toolkit
- Styling: Tailwind CSS
- Charts: Recharts for performance visualization
- HTTP Client: Axios with interceptors
- Routing: React Router with protected routes
- Multi-provider login: Email/password + Google OAuth
- Email verification: Secure account activation
- Password reset: Secure token-based reset flow
- Profile management: User settings and preferences
- Subscription validation: Plan-based feature access
- Tiered plans: Basic (2 bots), Pro (10 bots), Enterprise (unlimited)
- Stripe integration: Secure checkout, subscription management
- Webhook handling: Real-time payment status updates
- Plan enforcement: Feature restrictions based on subscription
- Payment portal: User self-service subscription management
- Secure storage: AES-256 encryption for API credentials
- Exchange support: Binance (extensible to other exchanges)
- Real-time validation: Tests API keys with exchanges before saving
- Format validation: Basic length and format checks
- Account verification: Checks trading permissions and account info
- Duplicate prevention: One API key per exchange per user
- User isolation: Secure key access per user
- Deletion protection: Prevents deletion of keys in use by bots
- Usage tracking: Shows which bots are using each API key
- Safe deletion: Validates bot dependencies before allowing deletion
- Strategy framework: Modular, extensible strategy system
- Moving Average Crossover: Implemented and tested
- Live trading: Real-time market analysis and order execution
- Position tracking: State management for open positions
- Risk management: Basic position sizing and signal validation
- Scheduler: Cron-based execution (every minute)
- Job management: Start/stop/cleanup operations
- Error recovery: Automatic error handling and status updates
- Logging: Comprehensive execution logs and error tracking
- Historical data: Real market data from exchanges
- Strategy simulation: Complete trade simulation
- Performance metrics: PnL, win rate, trade count
- Visualization: Interactive charts and performance graphs
- Real-time metrics: Live PnL and win rate calculation
- Trade history: Complete trade recording with timestamps
- Performance analytics: 30-day rolling performance metrics
- Status monitoring: Bot health and execution status
// Core entities with full relationships
User: { auth, subscription, profile }
Bot: { strategy, status, performance, user reference }
ApiKey: { encrypted credentials, exchange, user reference }
Trade: { bot reference, order details, timestamps }
BotLog: { execution logs, errors, status updates }Authentication:
POST /api/auth/register
POST /api/auth/login
POST /api/auth/google
GET /api/auth/me
POST /api/auth/verify-email
POST /api/auth/forgot-password
POST /api/auth/reset-password
Subscription:
POST /api/subscription/create-checkout
POST /api/subscription/webhook
GET /api/subscription/portal
API Keys:
GET /api/keys
POST /api/keys
POST /api/keys/test
GET /api/keys/:id/usage
DELETE /api/keys/:id
Bots:
GET /api/bots
POST /api/bots
PUT /api/bots/:id
DELETE /api/bots/:id
POST /api/bots/:id/toggle
GET /api/bots/:id/logs
GET /api/bots/:id/performance
POST /api/bots/:id/test
POST /api/bots/backtest
PUT /api/bots/:id/api-key
- JWT authentication: Secure token-based auth
- API key encryption: AES-256 for sensitive data
- Password hashing: bcrypt with salt rounds
- CORS protection: Configured for production
- Rate limiting: API request throttling
- Input validation: Comprehensive request validation
- Node.js 18+
- MongoDB 5+
- Stripe account (for payments)
- Binance API keys (for trading)
# Backend environment variables
MONGODB_URI=mongodb://localhost:27017/trading-bot
JWT_SECRET=your-jwt-secret
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret# Backend
cd backend
npm install
npm run dev
# Frontend
cd frontend
npm install
npm start- Strategy Analysis: Real-time market data analysis
- Signal Generation: Moving average crossover signals
- Order Execution: Market orders on Binance
- Trade Recording: Complete trade history tracking
- Performance Update: Real-time PnL calculation
- Position tracking: Prevents duplicate signals
- Error handling: Automatic bot status updates
- Logging: Comprehensive execution monitoring
- Manual testing: Test run capability for validation
- Real-time logs: Execution status and errors
- Performance metrics: Live PnL and win rates
- Bot status: Running/stopped/error states
- Trade history: Complete audit trail
- Paper Trading Mode: Risk-free testing environment
- Advanced Strategies: RSI, MACD, Bollinger Bands
- Portfolio Management: Multi-bot coordination
- Risk Limits: Position size and loss limits
- Admin Dashboard: User management and analytics
- Copy Trading: Follow successful traders
- Social Features: Strategy sharing and leaderboards
- Mobile App: React Native implementation
- WebSocket Integration: Real-time price updates
- Load Balancing: High-frequency trading support
- Advanced Analytics: Machine learning insights
- Compliance: GDPR, PCI-DSS compliance
- โ Encrypted API key storage
- โ JWT authentication
- โ Input validation
- โ CORS protection
- โ Rate limiting
- โ Modular architecture
- โ Database indexing
- โ Efficient queries
- โ Error handling
- โ Comprehensive logging
- โ Error tracking
- โ Performance metrics
- โ Health checks
- API Documentation: See
/docsfolder - Frontend Guide: See
frontend/README.md - Deployment Guide: See
DEPLOYMENT.md - Troubleshooting: See
TROUBLESHOOTING.md
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Current Status: LIVE TRADING PLATFORM READY
The platform is now fully functional with live trading capabilities, automated bot execution, and comprehensive user management. Users can create bots, configure strategies, and execute real trades on Binance with full performance tracking and monitoring.