feat: Refactor services architecture and update project structure
- Remove Docker-based microservices (docker-compose.yml, Makefile, Dockerfiles) - Update start-dev.sh to use backend.app:app entry point - Add shared schema and client modules for service communication - Add team coordination modules (messenger, registry, task_delegator, coordinator) - Add evaluation hooks and skill adaptation hooks - Add skill template and gateway server - Update frontend WebSocket URL configuration - Add explain components for insider and technical analysis Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
75
services/README.md
Normal file
75
services/README.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# EvoTraders Services Architecture
|
||||
|
||||
This document describes the modular service architecture for EvoTraders.
|
||||
|
||||
## Architecture
|
||||
|
||||
EvoTraders uses a **modular single-process architecture** with services as Python modules:
|
||||
|
||||
```
|
||||
backend/
|
||||
├── app.py # FastAPI entry point (port 8000)
|
||||
├── main.py # CLI trading system entry point
|
||||
├── api/ # REST API routes
|
||||
│ ├── agents.py # Agent management
|
||||
│ ├── guard.py # Tool guard
|
||||
│ ├── runtime.py # Runtime management
|
||||
│ └── workspaces.py # Workspace management
|
||||
├── agents/ # Multi-agent system
|
||||
│ ├── base/ # Base agent classes
|
||||
│ ├── team/ # Team coordination
|
||||
│ └── skills/ # Agent skills
|
||||
├── core/ # Pipeline & scheduler
|
||||
├── services/ # Core services
|
||||
│ ├── gateway.py # WebSocket gateway
|
||||
│ ├── market.py # Market data service
|
||||
│ └── storage.py # Storage service
|
||||
└── services/ # Modular services (optional)
|
||||
├── trading/ # Trading module
|
||||
├── news/ # News module
|
||||
└── agents/ # Agents module
|
||||
```
|
||||
|
||||
## Entry Points
|
||||
|
||||
| Entry Point | Port | Purpose |
|
||||
|------------|------|---------|
|
||||
| `backend/app.py` | 8000 | FastAPI REST API |
|
||||
| `backend/main.py` | CLI | Trading system (live/backtest) |
|
||||
|
||||
## Running
|
||||
|
||||
```bash
|
||||
# Development mode (FastAPI only)
|
||||
./start-dev.sh
|
||||
|
||||
# Or manually
|
||||
python -m uvicorn backend.app:app --port 8000 --reload
|
||||
|
||||
# Trading system (CLI)
|
||||
evotraders live --mock
|
||||
evotraders backtest --start 2025-11-01 --end 2025-12-01
|
||||
```
|
||||
|
||||
## Service Modules
|
||||
|
||||
| Module | Description |
|
||||
|--------|-------------|
|
||||
| `gateway.py` | WebSocket gateway for frontend communication |
|
||||
| `market.py` | Market data fetching (prices, news, financials) |
|
||||
| `storage.py` | Dashboard state and trade history persistence |
|
||||
|
||||
## Module Dependencies
|
||||
|
||||
```
|
||||
app.py (FastAPI)
|
||||
├── runtime_router
|
||||
│ └── backend/main.py (when task starts)
|
||||
│ └── Gateway
|
||||
│ ├── MarketService
|
||||
│ ├── StorageService
|
||||
│ └── TradingPipeline
|
||||
│ ├── Analysts (4x)
|
||||
│ ├── RiskManager
|
||||
│ └── PortfolioManager
|
||||
```
|
||||
Reference in New Issue
Block a user