Trend Setter

Created
Status
MVP
Comments
–
Detail level

Whether something is going up or down depends on how far back you look. A share price can be down on the week and up on the year. A room can sound quieter than a minute ago and still be getting louder over the afternoon. The longer trends are often the hardest to see.

The idea is simple: a row of red, amber and green indicators, one for each time window. Each compares the last minute with the minute before, the last day with the day before, the last year with the year before, and so on, all shown at once.

Like Slime Tray, it was vibe coded with Claude. I described the idea, asked for audio first, and kept adding to it: Google Trends, then a dashboard, then stocks, then making it installable.

How it works

Open the dashboard. Each row is a source and each column is a time window, from 10 seconds on the left to 2 years on the right.

  • Green means it's moving the way you want, amber means steady and red means the wrong way. Each source chooses whether rising or falling counts as good.
  • Show changes puts the numbers in the squares.
  • Click a row to open its detail: a sparkline for every window and a chart comparing the latest window with the one before it.
  • Add a source from the form under the table: a Google search term in a region, a stock, ETF, index or crypto ticker, or the microphone.

Install it. The Install app button puts it on your home screen or in your dock. It opens in its own window and shows the last data it loaded when you're offline.

Technical details

  • Sources:
    • Microphone: RMS level in dBFS, measured ten times a second in an AudioWorklet so it keeps going in a background tab. Echo cancellation, noise suppression and auto-gain are switched off, because they'd flatten exactly the trend you're looking for. History is kept in IndexedDB, so the day and week windows keep filling across reloads.
    • Google Trends: each window uses its own fetch at a suitable resolution, from 8-minute steps for the hour up to weekly for 2 years. Google scales every fetch to 0–100 on its own, so a window only ever compares two halves of the same fetch.
    • Stocks: five years of daily closes from Nasdaq's public data. Windows count trading days, so a week is 5 trading days and a year 252; crypto trades every day, so it uses calendar days.
  • Maths: every source goes into time buckets with running totals, so the average of any window is two subtractions however long it is. A week of one-second audio buckets stays cheap.
  • Steady band: a change within ±1 dB for audio, ±10% for searches or ±2% for prices counts as steady. Each band can be changed.
  • Backend: two Netlify Functions in TypeScript fetch Google Trends and Nasdaq on the page's behalf, since neither allows a browser to call it directly. Responses are cached on Netlify's CDN for 20 minutes (searches) or an hour (prices).
  • App: one HTML file with no libraries, plus a web app manifest and a service worker. The page, icons and fonts are served from cache; data comes from the network and falls back to the last copy offline.

Updates

  1. New projectTrend Setter goes live

    Built with Claude over a weekend, starting from the microphone and ending with a dashboard of searches and stock prices. Have a look, or install it as an app.

Comments

Loading comments…

Add a comment