TellWang
Dashboard

A stocks dashboard from one prompt

Wang was told "Build a stocks dashboard with live prices and a watchlist." The app runs at stocks.tellwang.com, and this post walks through what one prompt actually produced: a watchlist with live prices and day change, an add-ticker box, and updates that land in open tabs without a reload.

The prompt

The whole specification fit in one chat message:

prompt
Build a stocks dashboard on a new Wok called stocks. Schema: a
tickers table (symbol PK, name), a prices table (symbol PK →
tickers, price, prev_close, change_pct, currency, updated_at),
and a trades log. Seed AAPL/MSFT/NVDA/GOOGL/AMZN/TSLA. RLS: anon
reads all; anon inserts tickers + trades; only the service role
writes prices. Deploy an edge function refresh-quotes that reads
tickers, fetches each symbol's quote, computes change%, and
upserts prices. Add prices to realtime. Deploy a polished dark
frontend (watchlist table, live price + green/red change%,
add-ticker box, auto-refresh) wired to the Wok with the anon key.
Map it to stocks.tellwang.com, then browser-check it and send me
the link.

That message is the entire handoff. Everything below is what came back.

The schema, and who gets to write what

Three tables: tickers, prices, trades. The interesting part is the write boundary. The prompt states the policy in one sentence, and the agent turned it into actual row-level security: anyone can read the watchlist, a visitor can add a ticker or log a trade, but prices accepts writes only from the service role — so the quote feed is the single source of price data and a visitor can't insert a fake one. That rule lives in the database, not in frontend code that a curious user can bypass.

Live prices with nothing extra to operate

Quotes come from refresh-quotes, an edge function deployed next to the data. It reads the tickers table, fetches each symbol's quote from a public market-data API, computes the day change against the previous close, and upserts prices. The outbound call happens inside the function, which is the pattern worth stealing: the market-data credential never reaches the browser, and the database doesn't need an HTTP extension to go fetch things itself.

Because prices is wired into realtime, an update lands in every open tab over a websocket. If a websocket isn't available, the page polls every 30 seconds.

Keeping it fresh when nobody's watching

A scheduled job refreshes quotes every few minutes, even when nobody is watching. The scheduler is part of the same Wok, so this is one more ask in the same chat.

Shipped means tested on Preview

Before handing back the link, the agent runs the project's checks, targeted quote-refresh and realtime tests, and a browser check against Preview. It shows you that exact Preview and the results, then publishes only after you approve it.

Build your own

The same flow runs from a connected coding agent. The dashboard's Build with an agent view prepares the scoped prompt; Deploy a Claude Code project shows the MCP setup, and the quickstart is the shortest path to a live URL.