Inspiration

Every company says one thing publicly and then the story quietly shifts over time. Tesla says full self driving is months away, then a year later it is still months away. Companies change their messaging on climate goals, layoffs, safety, all sorts of things, and nobody is tracking it in one place. We wanted something that watches the news for a company or person over time and tells you when the story has actually changed instead of you having to remember every headline yourself.

What it does

DriftWatch tracks a company or public figure over time by pulling real news articles about them and measuring how much the coverage has shifted from what is normal for that subject. You add a subject, the system fetches recent articles, and it shows you a current drift score compared to their typical score, how many articles have been logged, whether the current coverage counts as stable or drifting, and a comparison of recent articles against the historical ones so you can see what changed and when.

How we built it

The backend is FastAPI. News comes from SerpApi's Google News search so every article is real, not scraped or faked. Each article gets turned into a vector using sentence transformers, and those vectors get stored in Postgres using the pgvector extension, hosted on Supabase. A background worker using Redis Queue handles fetching and embedding articles so the site stays responsive while that work happens. The drift score itself is a distance calculation between a new article's vector and the average vector of everything we have logged for that subject so far. The frontend is a single HTML page with plain JavaScript and Chart.js for the timeline, no framework needed.

Challenges we ran into

Getting a real database connection working through Supabase's pooler took some trial and error, since the pooler behaves differently than a direct connection and caused a prepared statement error that took real digging to track down. We also spent time making sure the frontend actually handled every backend state cleanly, including when the backend is down, when there is no data yet, and when there are only a few articles logged. News APIs also return dates in a bunch of inconsistent formats, so parsing those reliably took more work than expected.

Accomplishments that we're proud of

We built a full pipeline that goes from a real news search all the way to a readable drift score on a dashboard, using real data the whole way through instead of sample data. We are proud that the site clearly explains what it found instead of just showing a number, telling you how many sources back it up and how confident that finding is. We also caught and fixed a real production style bug live while recording our demo, which is exactly the kind of thing you learn from doing this under pressure.

What we learned

We learned a lot about how connection pooling actually behaves differently from a direct database connection, and why that matters once you are relying on managed infrastructure instead of your own server. We also learned that a good frontend needs to gracefully handle every possible backend state, not just the happy path, or the whole thing feels broken the first time something goes wrong. And we learned that turning a raw similarity score into something a normal person can read and trust takes just as much work as building the pipeline that produces the score.

What's next for DriftWatch

We would like to track more than one type of source, including social media posts (example Twitter) and press releases, not just news articles, so the drift score reflects the full picture of how a subject is talking about themselves versus how they are being covered. We would also like to let users set alerts so they get notified the moment a subject's coverage crosses a drift threshold instead of having to check back manually.

Built With

Share this project:

Updates

Submission history