Skip to content

Fariborz-Ai/Fariboorz-Website

Repository files navigation

Fariboorz ICO

Fariboorz AI - Advanced Autonomous Trading Bot

Version Node TypeScript License

Fariboorz AI is a next-generation, fully autonomous cryptocurrency trading platform powered by AI-driven signal generation, robust risk management, and a modern web dashboard. The system is designed for scalability, reliability, and high performance, supporting thousands of users and multiple exchanges.


πŸš€ Features

  • AI-Powered Multi-Strategy Trading: Simultaneous execution of advanced strategies (Bollinger Bands, MACD, RSI+SMA, Multi-Session)
  • Real-Time Data Processing: Live market data via WebSocket connections
  • Automatic Trade Execution: End-to-end automation from signal to trade
  • Advanced Risk Management: Take profit, stop loss, and position sizing
  • Multi-Exchange Support: Bingx, Bitunix, and more
  • User Dashboard: Modern Next.js dashboard for analytics, notifications, and settings
  • Telegram Notifications: Real-time trade and system alerts
  • Cluster-Based Architecture: High performance and fault tolerance
  • Health Monitoring: System health checks and recovery

πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Fariboorz AI System                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  🌐 WebSocket Layer (Data Collection)                      β”‚
β”‚  β”œβ”€β”€ Bingx Public WS    β”œβ”€β”€ Bitunix Public WS             β”‚
β”‚  └── Real-time Data     └── Historical Data                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  🧠 Strategy Engine (Analysis & Signal Generation)         β”‚
β”‚  β”œβ”€β”€ Bollinger Bands    β”œβ”€β”€ MACD Crossover                 β”‚
β”‚  β”œβ”€β”€ RSI + SMA          └── Multi-Session Trading          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ’Ύ Database Layer (Data Persistence)                      β”‚
β”‚  β”œβ”€β”€ MongoDB            β”œβ”€β”€ User Management                β”‚
β”‚  β”œβ”€β”€ Signal Tracking    └── Trade History                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ”„ Trade Manager (Execution & Management)                 β”‚
β”‚  β”œβ”€β”€ Order Execution    β”œβ”€β”€ Risk Management                β”‚
β”‚  └── Position Tracking  └── Notification System            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🌐 Web Application (Frontend)

  • Framework: Next.js 14, React, TypeScript
  • UI: Tailwind CSS, Framer Motion, Custom Components
  • Pages:
    • Authentication (Sign In, Sign Up, Forgot Password)
    • Dashboard (Analytics, Trades, Notifications, Settings)
    • Responsive, modern, and accessible design
  • State Management: React Context, NextAuth.js for authentication
  • API Integration: Connects to backend for user, trade, and signal data

🧠 Backend (Core Trading Engine)

  • Language: TypeScript (Node.js)
  • Core Modules:
    • Strategy Engine: AI/TA-based signal generation
    • WebSocket Core: Real-time data ingestion
    • Trade Manager: Automated trade execution and management
    • Notification System: Telegram and dashboard alerts
    • Crash Recovery: Auto-healing and state recovery
  • Database: MongoDB (User, Signal, Trade collections)
  • API: RESTful endpoints for health, monitoring, and management

πŸ“¦ Project Structure

app/
	api/           # API routes (Next.js)
	auth/          # Authentication pages and logic
	components/    # UI and chart components
	dashboard/     # Dashboard pages (analytics, trades, settings)
	models/        # Data models (user, trade, notification, strategy)
	public/        # Static assets (fonts, images)
	utils/         # Utility functions (auth, MongoDB, helpers)
	...

πŸ› οΈ Getting Started

Prerequisites

  • Node.js >= 18.0.0
  • MongoDB >= 5.0
  • TypeScript >= 5.8.3
  • Exchange API keys (Bingx/Bitunix)

Installation

  1. Clone the repository
    git clone https://github.com/your-username/fariboorz-ai.git
    cd fariboorz-ai
  2. Install dependencies
    npm install
  3. Configure environment
    cp .env.example .env
    # Edit .env with your MongoDB URI, API keys, etc.
  4. Start MongoDB
    mongod
  5. Run the application
    # Development
    npm run dev
    # Production
    npm run build
    npm start

πŸ”’ Authentication & Security

  • Secure authentication with NextAuth.js
  • Passwords hashed and never stored in plain text
  • Session management and role-based access
  • Environment variables for sensitive data

πŸ“Š Dashboard & Monitoring

  • Real-time analytics and trade history
  • User settings and strategy management
  • System health and performance metrics
  • Notification center for trade and system events

🧠 Trading Strategies (Core)

  • Bollinger Bands: Mean reversion, multi-timeframe
  • MACD Crossover: Trend following, volume confirmation
  • RSI + SMA: Momentum and trend, multi-timeframe
  • Multi-Session: Session-based, breakout logic

πŸ—„οΈ Database Models (Sample)

User

interface User {
	uid: string;
	name: string;
	email: string;
	role: 'ROOT' | 'ADMIN' | 'MEMBER';
	exchange: { name: 'bitunix' | 'bingx'; apiKey: string; apiSecret: string; isActive: boolean; };
	trade_settings: { strategyId: ObjectId; leverage: number; marginType: 'cross' | 'isolated'; margin: number; tradeLimit: number; isActive: boolean; };
	telegram: { chatId: string; token: string; isActive: boolean; };
}

Signal

interface Signal {
	signalId: string;
	strategyId: string;
	exchange: string;
	symbol: string;
	timeframe: string;
	signal: 'buy' | 'sell' | 'hold';
	takeProfit: number[];
	stopLoss: number;
	confidence: number;
	status: 'pending' | 'triggered' | 'closed';
	events: SignalEvent[];
}

Trade

interface Trade {
	tradeId: string;
	signalId: string;
	userId: string;
	exchange: string;
	symbol: string;
	side: 'BUY' | 'SELL';
	entryPrice: number;
	takeProfit: number[];
	stopLoss: number;
	status: 'open' | 'closed' | 'cancelled';
	closedPortion: number;
	events: TradeEvent[];
}

πŸ“– Documentation & API

  • Full API reference for health, monitoring, and management endpoints
  • System and strategy documentation in /docs
  • Example API endpoints:
    • /api/health - System health
    • /api/status - System status
    • /api/performance - Performance metrics

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to your branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ž Support & Contact


πŸ† Performance Metrics

  • Signal Generation: 100-500 signals/hour
  • Trade Execution: 50-200 trades/hour
  • Signal Accuracy: 75-85%
  • Trade Success Rate: 70-80%
  • Recovery Time: < 30 seconds

Made with ❀️ by Fariboorz AI Team

⭐ Star this repo β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature

About

Fariboorz ai Dashboard and official website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published