Crypto trading bot: engine, brokers, backtester, dashboard, deploy
FastAPI backend with a single-strategy async engine, paper and Binance brokers, pure-python indicators, a backtester that shares the engine's portfolio math, and a Vue dashboard with a live WebSocket feed. Adds the Gitea Actions CI/CD workflow that deploys to Traefik via docker_default.
This commit is contained in:
1 parent
98028248c2
commit
9c3bee87ac
73 files changed
+9759
-1
No files matched your search
@@ -0,0 +1,45 @@
|
||||
PY := .venv/bin/python
|
||||
BACKEND := backend
|
||||
FRONTEND := frontend
|
||||
|
||||
.PHONY: install dev-backend dev-frontend test test-backend test-frontend lint fmt build up down deploy
|
||||
|
||||
install:
|
||||
python3 -m venv .venv
|
||||
$(PY) -m pip install -r $(BACKEND)/requirements-dev.txt
|
||||
cd $(FRONTEND) && npm install
|
||||
|
||||
dev-backend:
|
||||
cd $(BACKEND) && ../$(PY) -m uvicorn app.main:app --reload --port 8000
|
||||
|
||||
dev-frontend:
|
||||
cd $(FRONTEND) && npm run dev
|
||||
|
||||
test: test-backend test-frontend
|
||||
|
||||
test-backend:
|
||||
cd $(BACKEND) && ../$(PY) -m pytest
|
||||
|
||||
test-frontend:
|
||||
cd $(FRONTEND) && npm test
|
||||
|
||||
lint:
|
||||
cd $(BACKEND) && ../.venv/bin/ruff check .
|
||||
cd $(BACKEND) && ../.venv/bin/ruff format --check .
|
||||
|
||||
fmt:
|
||||
cd $(BACKEND) && ../.venv/bin/ruff format .
|
||||
cd $(BACKEND) && ../.venv/bin/ruff check --fix .
|
||||
|
||||
build:
|
||||
cd $(FRONTEND) && npm run build
|
||||
|
||||
up:
|
||||
docker compose -f docker-compose.local.yml up --build
|
||||
|
||||
down:
|
||||
docker compose -f docker-compose.local.yml down
|
||||
|
||||
# Production stack (requires the shared docker_default network + Traefik).
|
||||
deploy:
|
||||
docker compose up -d --build
|
||||
Reference in new issue
Block a user