Autonomous ML-Powered Trading Platform with Docker Compose local deployment.
ShadowDesk is a system-agnostic autonomous trading platform that provides:
- Real-time stock signal generation via ML inference
- Automated trade execution
- Full ML pipeline (training, validation, deployment)
- Observability stack (metrics, logging, dashboards)
- Demo mode with paper trading (no real money)
This is an educational and portfolio demonstration project.
The docker-compose.yml contains default development credentials for local services (MinIO, Vault, Grafana, Airflow, etc.):
- Intentionally included for local development only
- Not production credentials - for Docker Compose local stack only
- Not connected to real trading - uses Alpaca paper trading
Production secrets are managed via:
- HashiCorp Vault - Primary secrets management
- Sealed Secrets - GitOps-safe encrypted secrets for Kubernetes
Never commit real API keys or production credentials.
ShadowDesk/
├── docker-compose.yml # Local deployment (dev credentials only)
├── config/ # Local configs (prometheus.yml, kind-config.yaml)
├── docker-config/ # Docker build configs
├── project/ # Source code
│ ├── cluster_b/
│ │ ├── api/ # FastAPI trading service
│ │ ├── train/ # ML training & Airflow DAGs
│ │ └── trading/ # Trading execution (Alpaca broker)
│ ├── dashboard-streamlit/ # Streamlit dashboard
│ ├── shared/ # MinIO, Vault, Qdrant helpers
│ └── tests/ # Test suite + local validation
├── k8s/ # Kubernetes manifests + Helm charts
│ ├── argocd/ # ArgoCD AppProject & Applications
│ ├── helm/ # shadowdesk-infra, shadowdesk-compute
│ └── sealed-secrets/ # Encrypted secrets (safe to commit)
└── docs/ # Documentation
- Docker and Docker Compose
- 8GB+ RAM recommended
docker-compose up -d
docker-compose ps
docker-compose logs -f fastapicd project
python tests/local_stack_bootstrap.py| Service | URL | Credentials |
|---|---|---|
| FastAPI | http://localhost:18000 | - |
| Streamlit | http://localhost:18501 | admin/shadowdesk |
| Airflow | http://localhost:18080 | admin / [generated at runtime] |
| MLflow | http://localhost:15000 | - |
| Prometheus | http://localhost:19090 | - |
| Grafana | http://localhost:13000 | admin/admin |
| Vault | http://localhost:18200 | dev token: shadowdesk-devtoken |
| Qdrant | http://localhost:16333 | - |
| MinIO Console | http://localhost:19001 | shadowdesk/shadowdesk123 |
Retrieve Airflow password:
docker compose exec -T airflow cat /opt/airflow/simple_auth_manager_passwords.json.generatedruff check .
black --check .
isort --check-only .
pytest tests/ -vpip install ruff black isort pytest pytest-covcd project
pytest tests/ -vpython tests/validate_local_stack.py --bootstrap # Full validationGET /account/- Account infoGET /account/portfolio- Portfolio summaryGET /account/history- Trade history
GET /trading/signals/{symbol}- Get signalPOST /trading/signals/batch- Batch signalsGET /trading/positions- Current positionsPOST /trading/orders- Submit orderDELETE /trading/orders/{order_id}- Cancel orderPOST /trading/cycle- Run full trading cycle
When no Alpaca API keys are configured, the system runs in demo mode:
- Mock $100,000 portfolio
- Simulated positions (AAPL, NVDA, MSFT)
- Heuristic signals when model unavailable
GitOps pipeline: GitHub Actions → ArgoCD → Kubernetes
| Stage | Tools |
|---|---|
| Lint | ruff, black, isort |
| Test | pytest, pytest-cov |
| Deploy | ArgoCD CLI, Helm |
MIT - see LICENSE