chore: initial trade-visualizer import

This commit is contained in:
u1
2026-01-31 01:14:32 +01:00
commit 37210d9681
48 changed files with 9303 additions and 0 deletions

33
README.md Normal file
View File

@@ -0,0 +1,33 @@
# trade-visualizer
Standalone local frontend (Vite + React) for the `trade` stack.
## Dev (proxy to VPS)
Default target is `https://trade.mpabi.pl`.
```bash
npm ci
npm run dev
```
Optional env:
- `API_PROXY_TARGET` (default: `https://trade.mpabi.pl`)
- `GRAPHQL_PROXY_TARGET` (default: same as `API_PROXY_TARGET`)
- `VITE_API_URL` (default: `/api`)
- `VITE_HASURA_URL` (default: `/graphql`)
The dev server proxies:
- `/api/*` to the upstream API
- `/graphql` + `/graphql-ws` to upstream Hasura (supports WS subscriptions)
- `/auth/*`, `/whoami`, `/logout` to upstream UI (session auth + cookie rewrite for localhost)
## 100% local
Point proxy to your local `trade-frontend` container:
```bash
API_PROXY_TARGET=http://localhost:8081 GRAPHQL_PROXY_TARGET=http://localhost:8081 npm run dev
```