chore: sync current workspace changes

This commit is contained in:
2026-03-27 11:27:26 +08:00
parent 6ecc224427
commit 5c08c1865c
33 changed files with 1450 additions and 724 deletions

View File

@@ -1,31 +1,56 @@
## QuickStart
## Frontend Quick Start
```bash
cd frontend
npm install
npm run dev
```
## Optional Direct Service Calls
Default dev URL: `http://localhost:5173`
The frontend still works with the compatibility backend entrypoint by default.
In the current test-stage setup, split services are the recommended default.
Point the frontend directly at those standalone services:
The frontend expects the EvoTraders gateway WebSocket on `ws://localhost:8765` unless overridden.
## Recommended Local Backend Stack
Start the split backend services from the project root:
```bash
./start-dev.sh
```
That gives you:
- control plane at `http://localhost:8000/api`
- trading service at `http://localhost:8001`
- news service at `http://localhost:8002`
- runtime service at `http://localhost:8003/api/runtime`
- gateway WebSocket at `ws://localhost:8765`
## Frontend Environment Variables
You can point the frontend directly at those services with:
```bash
VITE_CONTROL_API_BASE_URL=http://localhost:8000/api
VITE_RUNTIME_API_BASE_URL=http://localhost:8003/api/runtime
VITE_NEWS_SERVICE_URL=http://localhost:8002
VITE_TRADING_SERVICE_URL=http://localhost:8001
VITE_WS_URL=ws://localhost:8765
```
Current direct-call coverage:
There is also a starter template at [frontend/env.template](./env.template).
- runtime panel + gateway port discovery
## Direct-Service Coverage
Current direct-call coverage includes:
- runtime panel data loading
- gateway port/runtime discovery
- `story`
- `similar days`
- `range explain`
- `news for date`
- `news categories`
- selected trading reads such as price history and insider trades
If these variables are not set, the frontend falls back to the existing
WebSocket-driven compatibility flow.
If these variables are not set, the frontend falls back to local defaults and compatibility paths where they still exist.