Skip to content

Latest commit

 

History

History
117 lines (96 loc) · 9.01 KB

File metadata and controls

117 lines (96 loc) · 9.01 KB

CryptoWildfire Architecture

System Overview

CryptoWildfire follows a modular architecture focused on cost optimization by leveraging free APIs and efficient data processing. The platform collects data from multiple sources, processes it to generate signals, and presents insights through a dashboard.

┌─────────────────────────────────────────────────────────────────────┐
│                         Data Collection Layer                        │
├───────────────┬─────────────────┬───────────────┬──────────────────┤
│  CoinGecko    │  Reddit API     │ Fear & Greed  │  CryptoCompare   │
│  Market Data  │  Social Data    │     Index     │   Social Stats   │
└───────┬───────┴────────┬────────┴───────┬───────┴────────┬─────────┘
        │                │                │                │
        ▼                ▼                ▼                ▼
┌─────────────────────────────────────────────────────────────────────┐
│                          Processing Layer                            │
├───────────────┬─────────────────┬───────────────┬──────────────────┤
│  Market Data  │   Sentiment     │    Signal     │    Technical     │
│  Processing   │   Analysis      │  Aggregation  │    Analysis      │
└───────┬───────┴────────┬────────┴───────┬───────┴────────┬─────────┘
        │                │                │                │
        ▼                ▼                ▼                ▼
┌─────────────────────────────────────────────────────────────────────┐
│                           Storage Layer                              │
├───────────────────────────────────────────────────────────────────┐
│                        Supabase Database                           │
│                                                                     │
│  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│  │    Assets    │ │  Market Data │ │    Social    │ │    Market    │ │
│  │              │ │              │ │   Mentions   │ │  Sentiment   │ │
│  └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ │
│                                                                     │
│  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐                │
│  │   Signals    │ │  On-chain    │ │    User      │                │
│  │              │ │    Data      │ │   Settings   │                │
│  └──────────────┘ └──────────────┘ └──────────────┘                │
└───────────────────────────────────────────────────────────────────┘
        │                │                │                │
        ▼                ▼                ▼                ▼
┌─────────────────────────────────────────────────────────────────────┐
│                          Presentation Layer                          │
├───────────────────────────────────────────────────────────────────┐
│                      React Frontend (Vite + TS)                    │
│                                                                     │
│  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│  │  Dashboard   │ │  Analysis    │ │  ML Insights │ │  Risk Mgmt   │ │
│  │  Overview    │ │  Cards       │ │  & Validity  │ │  (Planned)   │ │
│  └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ │
└───────────────────────────────────────────────────────────────────┘

Data Flow

  1. Collection: Data is collected from various sources:

    • Market data from CoinGecko
    • Social data from Reddit
    • External sentiment indicators from Fear & Greed Index and CryptoCompare
  2. Processing: The collected data is processed:

    • Market data is normalized and stored
    • Social mentions are analyzed for sentiment
    • External sentiment indicators are integrated directly
  3. Analysis Aggregation: Results from Technical Analysis, Sentiment Synthesis, and Risk Assessment are aggregated by the Decision Engine:

    • Technical indicators are analyzed to determine overall technical posture.
    • Synthesized sentiment scores reflect market mood from various sources (AI, social, market).
    • Risk assessment provides context on volatility and liquidity.
    • These components are combined using configurable weights to produce a final analysis score and outlook (e.g., Buy, Sell, Hold).
  4. Storage: All data is stored in Supabase database tables:

    • assets: Basic information about tracked cryptocurrencies
    • market_data: Price, volume, and market cap information
    • social_mentions: Social media mentions with sentiment analysis
    • market_sentiment: External sentiment indicators
    • signals: Generated trading signals (potentially from backend aggregator)
    • ml_feedback_log: Logs for ML model feedback (if implemented)
  5. Visualization: Data is fetched by the React frontend via the backend API and presented through a custom dashboard:

    • Interactive charts (TradingView, custom)
    • Analysis cards displaying ML predictions with validity
    • Sentiment trends and indicators
    • System health monitoring

Key Components

Collectors

  • CoinGeckoCollector: Fetches market data while managing API rate limits
  • RedditClient: Collects social mentions from Reddit using PRAW
  • MarketSentimentCollector: Gathers sentiment data from external sources

Processing

  • AdvancedTechnicalAnalyzer: Calculates a wide range of technical indicators.
  • SentimentSynthesizer: Aggregates sentiment from AI, market, social, and technical sources.
  • RiskAssessor: Calculates volatility and liquidity-based risk metrics.
  • DecisionEngine (aggregator.py): Consolidates scores from TA, Sentiment, and Risk modules using configurable weights to produce a final analysis score and outlook.

Database

  • DatabaseClient: Handles database operations and schema management

Frontend

  • React App: Vite + TypeScript + React + Tailwind CSS frontend located in the frontend/ directory.
  • Components: Reusable UI elements for charts, cards, layout, etc.
  • ML Layer: Frontend-specific ML logic including prediction engines (High Freq, Medium, Macro), ensemble layer, validity tracking, and monitoring.
  • API Service: Handles communication with the Python backend API.

Evolution of Architecture

The system has evolved significantly from its initial design:

  1. Initial Plan: Heavy reliance on in-house sentiment analysis and Twitter data
  2. Current Architecture: Hybrid approach leveraging external sentiment APIs for efficiency
  3. Future Direction: Add more data sources while maintaining cost efficiency