High-Velocity Stock Market Watchlist, Logical Chart Annotation Engine & Trade Execution Journal
MarketView is a local-first, keyboard-driven market workstation built around a strict headless core (src/core/). Designed in accordance with Mooers' Law—an information system will be used only when it is more painless and trouble-free to use than not to use—MarketView starts in seconds with zero API keys required, anchors every chart drawing to logical (timestamp, price) coordinates, and persists your entire workspace locally in IndexedDB with 1-click JSON/CSV portability.
npm install
npm run devOpen http://localhost:5173 in your browser. Live market quotes and multi-timeframe OHLCV candles stream automatically via the built-in /api/yahoo proxy.
Build the optimized production bundle and launch the zero-dependency standalone Node server (serves dist/ + the live /api/yahoo market data proxy):
npm run build
npm startOpen http://localhost:4173 (or set a custom port with PORT=8080 npm start).
MarketView ships with a Web App Manifest (public/manifest.json) and standalone viewport configuration so you can run it like a native desktop or mobile terminal:
- Chrome / Edge / Brave (Desktop): Click the Install MarketView icon inside the right edge of the address bar (or open
Menu ⋮ → Save and share → Install MarketView...). MarketView launches in its own dedicated OS window without browser chrome. - iOS / iPadOS (Safari): Open MarketView, tap Share, and select Add to Home Screen.
- Android (Chrome): Tap
Menu ⋮ → Install app(or Add to Home screen).
Keep your hands on the keyboard during active market sessions. Every core action has a direct single-key binding (automatically suppressed when typing inside an input field):
| Shortcut | Action |
|---|---|
/ |
Search Symbol: Focus the top ticker search input to jump to or add any symbol (AAPL, NVDA, BTC-USD, SPY) |
b |
Zen Chart Mode: Toggle the left Watchlist & Price Alerts sidebar to maximize chart canvas area |
1 – 4 |
Switch Timeframe: 1 = 15m, 2 = 1h, 3 = 1D, 4 = 1W |
s |
Sticker Tool: Arm emoji sticker placement (🚀, ⚠️, 🎯, 💎, 🔥, 📉) at a logical (timestamp, price) |
t |
Trendline Tool: Arm 2-point logical trendline drawing (click anchor A, then click anchor B) |
f |
Fibonacci Tool: Arm 2-point Fibonacci retracement drawing (0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%) |
m |
Trade Marker Tool: Arm BUY or SELL execution marker placement on the chart |
Del / Backspace |
Delete Annotation: Remove the currently selected chart annotation |
j |
Trade Journal Drawer: Toggle the bottom Trade Execution Journal & Equity Curve Analytics drawer |
Esc |
Cancel / Reset: Cancel active drawing tool, deselect active annotation, or close open modals/drawers |
? |
Shortcuts Guide: Open or close the interactive Keyboard Shortcuts & Quick Reference modal |
Tip: Click any existing Sticker, Trendline, Fibonacci retracement, or Trade Marker on the chart to select it, drag its anchor handles to adjust its logical
(timestamp, price)coordinates in real time, or pressDelete/Backspaceto remove it.
Switch data providers anytime from the top header bar without losing your watchlists, annotations, or journal entries:
- Yahoo Finance Live Stream (Default — Zero API Key)
- Works out-of-the-box with no registration or API key required.
- Fetches real-time quotes and multi-timeframe OHLCV history (
15m,1h,1D,1W) for equities, ETFs, indices, and crypto via the local/api/yahooproxy. - Automatically falls back to deterministic synthetic candles if your machine goes offline.
- Finnhub REST API Mode
- Select Finnhub in the header data-source selector and paste a free Finnhub API key (or configure
VITE_FINNHUB_API_KEYin.env). - All requests pass through
CachedMarketDataProviderwith TTL caching and in-flight promise deduplication to protect free-tier rate limits.
- Select Finnhub in the header data-source selector and paste a free Finnhub API key (or configure
- Deterministic Offline Demo Mode
- Select Demo for 100% offline, reproducible market data powered by a seeded PRNG (
mulberry32) and Box-Muller volatility generator.
- Select Demo for 100% offline, reproducible market data powered by a seeded PRNG (
- No Brittle Pixel Coordinates: Every chart drawing is validated with
ChartAnnotationSchemaand stored exclusively as logical(timestamp, price)anchors. Drawings automatically stay locked to price action across zoom, pan, window resize, and timeframe switches. - Full Annotation Suite:
- Emoji Stickers (
s): Rapid visual callouts anchored to specific candle timestamps and price levels. - 2-Point Trendlines (
t): Support, resistance, and channel lines with customizable stroke color and width. - Fibonacci Retracements (
f): Automatic 7-level retracement grids (0.0%to100.0%) with shaded price zones and live price labels. - Trade Execution Markers (
m): High-contrastBUY/SELLbadges anchored directly to execution bars.
- Emoji Stickers (
- Interactive Anchor Dragging: Select any annotation on the canvas and drag its anchor points (
PointerDown→PointerMove→PointerUp) with automatic persistence toStorageRepository. - Horizontal Price Alert Lines: Armed price alerts for the active ticker render directly on the chart canvas as dashed horizontal target lines (
▲ ABOVEin emerald /▼ BELOWin amber) with right-axis price tags.
- Computed via pure, zero-DOM mathematical utilities in
src/core/utils/indicators.ts:- SMA 20 (Simple Moving Average)
- EMA 50 (Exponential Moving Average)
- BB 20 (20-period Bollinger Bands,
±2σupper/lower envelopes) - VWAP (Cumulative Volume-Weighted Average Price)
- Volume Histogram (Color-coded bullish/bearish volume bars)
- Live RSI (14) Badge: Real-time Relative Strength Index readout in the chart header with automatic overbought (
≥ 70) and oversold (≤ 30) highlighting.
- FIFO Realized PnL & Portfolio Metrics: Log
LONGandSHORTexecutions with quantity, price, stop-loss, and setup notes. MarketView automatically computes Total Realized PnL, Win Rate %, Profit Factor, Average R-Multiple, Max Drawdown, and renders an interactive SVG Cumulative Equity Curve. - 1-Click CSV Export: Export your complete trade execution ledger to a standard
.csvfile for spreadsheet analysis or tax reporting. - 1-Click Workspace JSON Backup & Restore: Export or restore all watchlists, chart annotations, trade journal entries, and price alerts as a single Zod-validated
.jsonworkspace file.
- Model Context Protocol (MCP) Server (
src/mcp/server.mjs):- Connect Claude Desktop, Cursor, or any MCP client to MarketView's financial data engine over
stdio:npm run mcp
- Exposes
get_live_quote,get_historical_candles,get_technical_summary(SMA 20,EMA 50,RSI 14,BB 20,VWAP), andrender_ascii_chart.
- Connect Claude Desktop, Cursor, or any MCP client to MarketView's financial data engine over
- Headless Mobile Simulation (
npm run demo:mobile):- Demonstrates that
src/core/runs 100% unmodified in a non-browser runtime (React Native / Expo / Node CLI):npm run demo:mobile
- Demonstrates that
MarketView enforces strict architectural boundaries between its portable domain core (src/core/) and the web presentation layer (src/ui/, src/features/):
src/
├── core/
│ ├── schemas/ # Zod schemas & inferred types (TickerQuote, OHLCVCandle, ChartAnnotation, Watchlist, TradeEntry, PriceAlert)
│ ├── providers/ # MarketDataProvider port, CachedMarketDataProvider decorator, YahooFinanceProvider, FinnhubProvider, DeterministicDemoProvider
│ ├── repositories/ # StorageRepository port, InMemoryStorageRepository (tests/CLI), IndexedDBStorageRepository (browser + localStorage fallback)
│ ├── stores/ # Headless Zustand vanilla store factories (watchlistStore, chartStore, annotationStore, journalStore, alertStore)
│ └── utils/ # Pure technical indicators (SMA, EMA, Bollinger Bands, VWAP, RSI) & workspace backup/CSV serializers
├── features/
│ ├── chart/ # TradingView Lightweight Charts v5 host + HTML5 Canvas overlay engine (Sticker, Trendline, Fibonacci, TradeMarker, Alert lines)
│ └── journal/ # Trade execution logging drawer, FIFO PnL analytics & SVG equity curve
├── ui/ # Watchlist sidebar, Price Alerts panel, Keyboard Shortcuts modal, Workspace backup controls
└── mcp/ # Standalone Model Context Protocol (MCP) financial server (stdio)
Run the full verification suite at any time:
# 1. Strict TypeScript check (strict: true, noUncheckedIndexedAccess: true)
npm run typecheck
# 2. Headless Core & Domain Unit Tests (Vitest)
npm run test
# 3. Production Bundle Build
npm run build
# 4. Headless Mobile Core Portability Proof
npm run demo:mobile