How pandaai-tech/panda_quantflow works
Project Type & Purpose
After reviewing the file tree and README, this is a full-stack, modular microservices platform (“PandaAI QuantFlow”) for end-to-end quantitative research, backtesting, live trading and ML workflows. It provides:
– A browser-based UI for visual workflow design (“panda_web”)
– A FastAPI-based backend API (“panda_server”)
– Dedicated backtest engine (“panda_backtest”)
– Live trading engine (“panda_trading”)
– Plugin framework for custom processing nodes (“panda_plugins”)
– ML orchestration support (“panda_ml”)
– Scheduling/cron service (“panda_schedule”)
– Shared common utilities (connectors, logging, config under “common”)
Key Directories & Architectural Patterns
• src/common: shared connectors (MongoDB, MySQL, Redis), config, logging, cron helpers
• panda_server: HTTP routes → business logic → data models → connectors → persistence
• panda_backtest & panda_trading: standalone engines with event-driven cores and exchange/quotation adapters
• panda_plugins: base classes & discovery of @work_node plugins for extending the workflow graph
• panda_ml: data/compute nodes for ML pipelines
• panda_schedule: cron/periodic task runner
• panda_web: static assets (JS/CSS), Monaco editor, React-style pages for charts & workflow design
Architectural patterns:
– Microservices / modular Python packages
– Event-driven engine in backtest & trading
– Plugin/extension registry via decorators
– REST API + WebSocket for real-time monitoring & chat (LLM agents)
– Asynchronous messaging (RabbitMQ) for workflow tasks
Detailing Essentials
– Show each microservice’s entry points (HTTP routes, message consumers)
– Capture the event-driven core_context & engine in backtest/trading
– Highlight connectors (mongodb_handler, redis_client, mysql_client)
– Include the plugin discovery & execution path (BaseWorkNode → custom nodes)
– Annotate scheduling flows from crontab_manager → cron_run