chore(deploy): keep start scripts and systemd units in deploy/

The three services become quant-trading-monitor, quant-trading-api and
quant-trading-vite, run from /home/gahow/projects/quant-trading. Their
units were previously untracked files in ~/.config/systemd/user.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-25 11:42:40 +08:00
parent 96a845ebcd
commit 83495bcd23
8 changed files with 90 additions and 26 deletions

View File

@@ -1,6 +1,8 @@
# Personal Stock Agent
# quant-trading web
统一个人股票监控 MVP,支持 A股、港股、美股自选股,按日生成监控报告。数据接口固定使用 IPADS Responses API,密钥从 `.env` 的 `IPADS_API_KEY` 读取。
Web UI and API for the quant-trading repository: strategy backtests and live books (via `../bridge.py`), plus a personal watchlist agent.
统一个人股票监控 MVP,支持 A股、港股、美股自选股,按日生成监控报告。数据接口固定使用 IPADS Responses API,密钥从仓库根目录 `.env` 的 `IPADS_API_KEY` 读取。
## Run
@@ -61,10 +63,6 @@ The response output text must be JSON matching the stock snapshot schema used by
## Local cache
Persistent app data defaults to `./data` and can be moved with:
Web state lives in the repo-level `data/web/` (see `src/server/paths.ts`): `watchlist.json`, per-stock snapshot/K-line/financial data under `cache/`, and backtest results under `strategy_cache/`. The strategy page reads `data/precomputed/backtest_results.json`, written by `precompute_backtest.py` at the repo root.
```env
STOCK_AGENT_DATA_DIR=/path/to/stock-agent-data
```
The backend stores watchlist data in `watchlist.json` and per-stock cached snapshot/K-line/financial data under `cache/`.
Production runs as systemd services; see "Server Deployment" in the root `CLAUDE.md`.

View File

@@ -1,14 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT_DIR}"
export PATH="/home/gahow/.local/bin:/home/gahow/.nvm/versions/node/v24.13.1/bin:$PATH"
export HOST="127.0.0.1"
export PORT="${PORT:-8787}"
# Node's built-in fetch does not read HTTPS_PROXY unless this opt-in is enabled.
# The configured Nasdaq/Yahoo data sources require the host's local proxy.
export NODE_USE_ENV_PROXY="${NODE_USE_ENV_PROXY:-1}"
exec npx tsx src/server/index.ts

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT_DIR}"
export PATH="/home/gahow/.nvm/versions/node/v24.13.1/bin:$PATH"
# The public HTTPS entrypoint is nginx on :5443. Keep Vite as a localhost-only
# upstream so the development server is not exposed as a second LAN entrypoint.
exec npx vite --host 127.0.0.1 --port 5174