Skip to content

feat(web): Google-Finance-style web dashboard for Azoth VN data - #91

Merged
toreleon merged 3 commits into
masterfrom
feat/google-finance-web-dashboard
Jul 23, 2026
Merged

feat(web): Google-Finance-style web dashboard for Azoth VN data#91
toreleon merged 3 commits into
masterfrom
feat/google-finance-web-dashboard

Conversation

@toreleon

Copy link
Copy Markdown
Owner

Summary

  • Adds web/ — a self-contained Google-Finance-style web dashboard for Azoth's Vietnam-market data (HOSE/HNX/UPCOM). It reuses the existing src/data/** clients (DNSE / SSI / VNDirect / CafeF) through a thin Node http API server and renders a React + Vite frontend that clones Google Finance's information architecture and visual language (light + dark).
  • Frontend (React 18 + TS, lightweight-charts, react-router):
    • Home — market-indices strip with sparklines, VN30 movers (gainers/losers/active), market-news feed, Lists watchlist sidebar, Research panel.
    • Quote — price header, interactive chart (Area/Candles, 1D–MAX ranges, SMA/Bollinger overlays, prev-close line, Compare multi-ticker % overlay), and Overview / Financials / News tabs. The Financials tab shows annual key metrics (EPS, BVPS, ROE, ROA, margins, P/E) from CafeF as a chart + table.
    • Ticker search, theme toggle, responsive 3-column layout.
  • Server (web/server/index.ts) — JSON API under /api/* (indices, movers, watchlist, market-news, search, quote, ohlcv, indicators, news, about, financials), TTL-cached via Azoth's SQLite cache. No secrets — all sources are public.

Reviewer notes

  • Isolated & additive: everything is under web/; no src/** files changed. web/ is a private sub-project (not part of the published @toreleon/azoth package) and not a pnpm-workspace member. Run with cd web && pnpm install && pnpm dev (requires root pnpm install first, since the server imports ../src).
  • VN data quirks handled: SSI ref/ceiling/floor are plain VND → normalized to board (thousand-VND) units; DNSE index symbols are HNX/UPCOM (not HNXINDEX/UPCOMINDEX); intraday chart timestamps shifted +7h to show ICT exchange time; CafeF's ratio feed is annual-only (presented as annual, not a fake quarterly toggle).
  • Scope: data/visualization only. The Research (AI) panel is a visual preview (the AI analyst lives in the CLI); live broker/portfolio (which needs auth) is intentionally not wired.

Validation

  • pnpm typecheck — root clean; web/ has its own tsc --noEmit, also clean
  • pnpm test — 87 passed, 4 skipped (unaffected; change is isolated to web/)
  • pnpm build — succeeds
  • Added a changeset, or this change does not affect users — does not affect users of the published package (web/ is private and not published)

🤖 Generated with Claude Code

Add `web/` — a self-contained React + Vite dashboard that clones Google
Finance's UI/UX over Azoth's Vietnam-market data (HOSE/HNX/UPCOM), backed by a
dependency-light Node http API server that reuses the existing `src/data/**`
clients (DNSE / SSI / VNDirect / CafeF).

Frontend (React 18 + TS, lightweight-charts, react-router):
- Home: market-indices strip with sparklines, VN30 movers (gainers/losers/
  active), market-news feed, Lists watchlist sidebar, Research panel.
- Quote: price header, interactive chart (Area/Candles, ranges, SMA/Bollinger,
  prev-close line, Compare multi-ticker % overlay), and Overview/Financials/News
  tabs. Financials tab shows annual key metrics (EPS/BVPS/ROE/ROA/margins/P/E)
  from CafeF as a chart + table.
- Ticker search, light/dark themes, responsive 3-column layout.

Server (web/server/index.ts): JSON API under /api/* (indices, movers, watchlist,
market-news, search, quote, ohlcv, indicators, news, about, financials), TTL-
cached via Azoth's SQLite cache. No secrets — all sources are public.

Notes:
- SSI ref/ceiling/floor are plain VND; normalized to board (thousand VND) units.
- DNSE index symbols are HNX/UPCOM (not HNXINDEX/UPCOMINDEX).
- Intraday chart timestamps shifted +7h to show ICT exchange time.
- Scope is data/visualization only; the Research (AI) panel is a preview and
  live broker/portfolio is intentionally not wired.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@toreleon toreleon closed this Jul 23, 2026
@toreleon toreleon reopened this Jul 23, 2026
toreleon and others added 2 commits July 23, 2026 16:37
Extend the dashboard with the remaining Google Finance features, all
backed by Azoth's Vietnam-market data:

- Persistent user watchlists: multiple lists, create/rename/delete,
  add/remove symbols. New web_* SQLite tables (web/server/store.ts) +
  method-aware REST endpoints (watchlists/portfolios/holdings).
- Manual Portfolio page: holdings (shares + cost basis) with live
  gain/loss, day change, and weights. Google-Finance style, NOT
  broker-linked.
- Market Trends pages: active / gainers / losers / indexes with a
  Liquid vs VN30 universe toggle.
- "Add to list" popover on the quote header (follow/save).
- "You may be interested in" discover strip on Home.
- Shared client state via UserDataProvider (useWatchlists /
  usePortfolios) and the new routes.

Persistence uses its own web_* tables in the shared Azoth SQLite DB
and does not touch Azoth's managed schema.sql. Frontend typecheck is
clean; all endpoints verified against live VN data.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Match Google Finance's actual composition and visual weight:

Home
- Default to light theme (GF's default), FOUC-safe via an inline
  pre-hydration script; toggle still honored/persisted.
- Compact index cards (dense name/value/spark) replacing the tall
  big-price cards; drop the dead Vietnam/Global toggle.
- Remove the VN30 movers table from home (movers live at /markets);
  add a GF-style market-summary news block (source chips + times).
- Add a sector-performance rail to the sidebar ("Stock sectors"),
  backed by a new GET /api/sectors (avg constituent change + a
  synthetic normalized sector sparkline).

Stock page
- One-line performance summary + a 1M/3M/YTD row under the price,
  from new quote.stats.change_pct_1m/_3m/_ytd (computed from bars).
- Chart toolbar becomes GF-style dropdowns (Chart type / Indicators /
  Compare); range row unchanged; all chart behavior preserved.
- Denser multi-column key-stats grid.

Also: light/typography tuning in the design tokens, and remove the
now-orphaned MoversTable component. Frontend typecheck clean;
/api/sectors and perf fields verified against live VN data.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@toreleon
toreleon merged commit 5888059 into master Jul 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant