Page cover

Technical Architecture

Overview:

  • Frontend: Web-based interface built with React and TypeScript.

    • Includes an IDE-like code editor for advanced users.

    • Chat interface powered by LLM for natural language strategy creation.

    • Visualization components for backtest/live results (charts, graphs).

    • UI elements: sliders, dropdowns, toggles, tables, and searchable marketplace listings.

  • Backend: Python-based microservices.

    • Handles strategy parsing, backtesting (using Freqtrade), and live trading.

    • RESTful or GraphQL API layer for authentication, strategy management, and marketplace operations.

    • Token-based authentication (e.g., JWT).

  • Containerization & Isolation:

    • All microservices run in Docker containers, orchestrated via Kubernetes.

    • User sessions/strategies isolated in containers to prevent data leaks.

    • Follows Docker best practices (read-only file systems, security profiles).

2. Infrastructure (Hosted on GCP)

  • Kubernetes Cluster:

    • Autoscaling handles spikes in load (e.g., during backtests).

    • Load balancers distribute traffic across pods.

    • Secrets managed via Kubernetes Secrets.

  • Networking & Security:

    • VPC with private subnets for databases and compute clusters.

    • Public subnets for UI/API gateways.

    • All traffic encrypted with TLS/SSL.

    • Role-based access control (RBAC) for Kubernetes resources.

    • API rate limiting and OAuth 2.0/JWT-based access control.

  • Storage & Logging:

    • Historical price data stored in BigQuery or Cloud Storage.

    • Backtest results (CSV, JSON, performance charts) stored in Cloud Storage.

    • Logs and metrics sent to Cloud Logging and Monitoring.

    • Persistent volumes for data, logs, and backtest results.

  • Databases:

    • Managed databases (Cloud SQL or Firestore) store user data, strategies, and marketplace metadata.

  • Failover & Redundancy:

    • Geo-redundant hosting for high availability.

    • Automated backups and restore procedures for critical data.

3. Freqtrade Integration

  • Leverages Freqtrade for both backtesting and live trading.

  • Custom adapters support:

    • Data cleaning and transformation.

    • Indicator calculations.

    • Order execution and management.

Last updated