# AGENTS.md ## Cursor Cloud specific instructions This is **Personal Trading System V1** — a futures trading system with a Python/FastAPI backend and a Vue 3 frontend. ### Services | Service | Directory | Dev Command | Port | |---------|-----------|------------|------| | Backend (FastAPI) | `backend/` | `uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload` | 8000 | | Frontend (Vue 3) | `frontend/` | `npm run dev` | 5173 | The frontend Vite dev server proxies `/api` and `/ws` to the backend at port 8000. ### Key commands - **Backend lint**: `cd backend && ruff check app/ tests/` - **Backend tests**: `cd backend && python3 -m pytest tests/ -v` - **Frontend build**: `cd frontend && npm run build` - **Frontend lint**: `cd frontend && npx vue-tsc --noEmit` (if TypeScript added) ### Architecture notes - Market data is **simulated** (no external exchange connection needed). 12 futures contracts are generated with realistic price movements on startup. - Quantitative strategies (`strategies/`) run as async tasks; each evaluates signals every 2 seconds against in-memory kline data. - The backend uses SQLite via `aiosqlite` for persistence — no external database setup required. - WebSocket at `/ws/market` streams real-time market updates to the frontend. - `$HOME/.local/bin` must be on `PATH` for `uvicorn`, `pytest`, and `ruff` to be found (already added to `~/.bashrc`).