How I Built a Viral Trend Detector in 5 Days
By PostSpark Team
Day 0: The Problem That Wouldn't Leave Me Alone
I've been creating content for years. Twitter threads, LinkedIn posts, Reddit comments—you name it. And I kept making the same mistake: showing up too late.
I'd see a post on HackerNews with 500 upvotes and think "perfect, I should write about this." Three hours later, I'd publish my take and get... 12 likes. The conversation had already moved on.
Last Monday, after missing yet another viral moment, I had enough. I opened a new Next.js project and started coding.
Day 1: Racing Against Time
The hackathon deadline was Friday. Five days to build something useful.
I started with the basics: what if I could see posts that were rising instead of already popular? Not the front page of Reddit—the posts climbing toward it.
First technical decision: Use real APIs, not mock data. This had to work on day one.
I wired up the Reddit API first. Their /r/programming/rising endpoint was perfect. Posts that had momentum but weren't saturated yet.
// The first API call that worked
const response = await fetch(
'https://www.reddit.com/r/programming/rising.json'
);
Seeing those first 25 rising posts render on my screen at 11 PM? That hit different.
Day 2: The Velocity Breakthrough
I had rising posts. Great. But how do I know which ones are about to explode?
I spent the morning thinking about the math. A post with 50 upvotes could be 5 minutes old or 5 hours old. Those are completely different signals.
Then it clicked: velocity matters more than volume.
const ageInMinutes = (Date.now() - post.created) / 60000;
const velocity = post.upvotes / ageInMinutes;
const viralScore = Math.min((velocity / 50) * 10, 10);
A post getting 10 upvotes per minute? That's a 9/10 viral score. A post with 1000 upvotes over 8 hours? That's a 4/10.
Suddenly my dashboard made sense. The posts at the top weren't just popular—they were accelerating.
Day 3: Cross-Platform Signals
One platform could be noise. But what if the same topic appears on multiple platforms simultaneously?
I added HackerNews. Then Dev.to. Then Google Trends.
When I saw "new AI coding tool" appear on both Reddit and HN within 10 minutes of each other, both with high velocity—that's when I knew this actually worked.
I built a simple keyword matcher:
// If 2+ platforms mention the same keywords = gold
const crossPlatformTrends = trends.filter(t =>
otherPlatforms.some(p =>
hasMatchingKeywords(t.title, p.title)
)
);
These cross-platform matches became my "guaranteed viral" category. They almost never miss.
Day 4: The AI Content Generator
Finding trends was solved. But I still had to write the actual content. Fast.
I integrated Claude's API. But not just "write a tweet about X." I built prompts that understood:
- Which platform you're posting to
- Your content angle
- The trend's context
- Optimal timing
The first time I clicked "Generate" and got back a full Twitter thread in 3 seconds, tailored to the trend, with a hook that actually made sense—I knew I had something.
Day 5: Launch Day
Friday morning. 8 hours until submission.
I had been so focused on building that I forgot to make it... you know, sellable. No pricing page. No auth. No way to actually use this.
I spent the morning speed-running:
- Supabase auth (2 hours)
- Stripe integration (2 hours)
- A basic landing page (1 hour)
- Deploying to Vercel (30 minutes)
At 5:47 PM, I submitted. At 6:03 PM, I posted on Twitter.
At 6:31 PM, someone signed up.
The First Week After Launch
I wasn't expecting much. Maybe a few signups from the hackathon judges.
Day 1: 12 signups Day 2: 31 signups Day 3: 89 signups
People were actually using it. And they were finding trends before they hit the front page.
The best message I got was from a developer who caught a trend about a new framework 47 minutes after it was posted on HN. He wrote a quick blog post, shared it in the thread, and got 2,400 visitors in 4 hours.
That's the dream, right? Being early.
What Actually Worked
Real APIs from day one. Mock data would have been faster initially, but I'd still be building the real thing now.
Velocity over popularity. This single insight made everything else possible.
Solving my own problem. I built exactly what I wanted to use. Turns out a lot of other creators wanted it too.
Shipping before it's perfect. My day 1 UI was ugly. My day 5 UI was barely acceptable. But people cared about the functionality, not the polish.
What I'd Do Differently
Start with one platform. I tried to do four at once. Just nailing Reddit first would have been smarter.
Add email alerts sooner. Everyone asked for this. I waited two weeks to build it.
Write about the journey while building. I stayed heads-down coding. Should have been tweeting progress daily.
The Unfair Advantage
Here's the thing about trend monitoring: timing is binary. You're either early or you're not.
If you show up 3 hours after something goes viral, you're competing with hundreds of other posts. If you show up in the first hour? You're one of five voices.
PostSpark gives you that hour back.
Where We're Going
We're adding Twitter/X real-time monitoring next. Then mobile apps with push notifications. Then team collaboration features.
But the core will stay the same: catch trends while they're rising, not after they've peaked.
Try It Yourself
I built PostSpark because I was tired of being late to every conversation. If you've felt that frustration—seeing the perfect trend to comment on, but it's already got 5,000 comments—give it a shot.
Free tier gets you 3 alerts per week. Enough to catch your first viral moment.
And hey, if you're early enough to read this post before everyone else does... you already get it.