Intelligence, Advanced Charting & Trading Platform
docs(web): add reproducible chart app startup, licensing and deployment gates
davoodmehraban89 committed
Oct 12, 2026 at 00:29 UTC
0c7058c39ac28974d5f2c0cbd8826b6f2201945b
1 file changed
+38
apps/market-terminal/README.md
new
+38
@@ -0,0 +1,38 @@
1
+# ChartNova standalone market terminal (staging scaffold)
2
+
3
+This is a **runnable React + Vite + TradingView Lightweight Charts v5** frontend. It is not deployed to `app.chartnova.ir` and does not replace the existing Worker application.
4
+
5
+## Local build
6
+
7
+```bash
8
+cd apps/market-terminal
9
+npm ci
10
+npm run dev
11
+npm run build
12
+```
13
+
14
+Node.js 20+ is required. `npm ci` uses the committed `package-lock.json`; never commit `node_modules`, `dist`, provider keys, or PostgreSQL URLs.
15
+
16
+The local Vite development server proxies `/api` to `https://app.chartnova.ir`. Current UI symbols are **EUR/USD, EUR/GBP and EUR/CHF ECB daily reference observations** only. The existing REST endpoint returns reference points, which render through `LineSeries`, **not fabricated candlesticks**. The `CandlestickSeries` codepath is present for genuinely licensed, validated source OHLC when the future provider-neutral REST handler is wired.
17
+
18
+`VITE_MARKET_REST_BASE` can point to a trusted REST backend; leave it empty for same-origin API routing. Do not put a database secret in any `VITE_*` variable: all Vite variables are exposed to the browser bundle.
19
+
20
+`VITE_MARKET_WS_BASE` is intentionally empty. After a vetted staging WebSocket deployment, use a **wss://** endpoint ending in `/stream`, for example `wss://<approved-host>/stream`. The client adds `?symbol=<canonicalSymbol>`, sends `stream.subscribe`, and accepts only validated `market.update` frames. WebSocket does **not** replace historical REST reconciliation after loss of connectivity.
21
+
22
+## Required acceptance gates before production
23
+
24
+- Written provider data rights, including public redistribution, storage, derived analytics, and attribution; an API key is not proof of rights.
25
+- Verified real OHLC provider history, no synthetic candles or gap filling, canonical unit/quote side and timezone mapping, and market calendar quality checks.
26
+- Secure Cloudflare `STREAM_INGEST_TOKEN` secret (32+ characters) and `STREAM_ROOMS` Durable Object binding. Origin/allowlist/WAF/rate limits, private publisher routing and potential DO billing must be reviewed. Template: `deploy/chartnova/wrangler.realtime.example.toml`.
27
+- Live REST (read-only Neon history repository) and WSS staging end-to-end tests, reconnection, sequence gaps, staleness, backpressure, provider outages, security negatives, and rollback.
28
+- CI must be green; local build success does not supersede failed GitHub Actions.
29
+
30
+## Copyright / UI licensing
31
+
32
+Lightweight Charts™ is a TradingView product. Keep the visible TradingView attribution/link in the frontend and include the project's NOTICE text in the final distributed package as required by its license: https://tradingview.github.io/lightweight-charts/docs/5.0
33
+
34
+## Explicit limitations
35
+
36
+This stage does not supply live Binance, CoinGecko, Polygon, Navasan or Bonbast feeds; none has been authorized, connected and validated for public commercial charting. The standalone `scripts/research-yfinance.py` is **personal/research only**, not an ingestion path into Neon or any public API.
37
+
38
+The yfinance library license is separate from rights to Yahoo market data. Do not conflate them.