~/trendingtide

how it works

TrendingTide is a lightweight intelligence layer over public technical discussions. It fetches Hacker News stories, lets you save useful threads locally, and generates KTA summaries only when you ask for them.

1. Public HN data

The feed is built from the public Hacker News API. TrendingTide reads story title, URL, author, points, comments, timestamp, and discussion IDs, then computes a Tide Score from engagement and recency.

2. KTA is on-demand

KTA summaries are not generated for every story by default. When you click KTA, the server collects public HN comments for that story and asks Claude Haiku to extract takeaways, why it matters, and the opportunity.

3. Redis cache

Before calling Claude, the server checks Redis for kta:story:ID. If a summary already exists, it returns instantly as cached. This means one useful KTA can serve many users without repeatedly paying for AI generation.

4. 100 users, one KTA

If many users click KTA on the same uncached thread at the same time, the first request takes a short Redis lock. Other requests wait briefly for the cached summary. This prevents a sudden spike from sending the same story to Claude many times.

5. Local saves

Saved threads live in your browser localStorage under tt_saved_threads. No signup is required. If you save a thread after generating KTA, the KTA is saved locally too. If you generate KTA later from the saved page, Redis can still return a cached summary created by someone else.

6. Anonymous counters

TrendingTide tracks simple aggregate counters in Redis for opened threads and KTA clicks. These counters are anonymous and story-level; they are used to show lightweight signals like views and KTA interest, not personal profiles.