03Case study
Viral Hunter
Web app · AI · Creator tools
A web product for discovering short-form content that is gaining momentum, understanding why it works, and turning those patterns into ideas worth posting.

03 / Viral Hunter
Real screenshot
How it’s built
From the project’s source code
01Vercel Cron
Secret-protected trigger
→ Apify fallback chain
02Apify fallback chain
Server-side scraping
→ Supabase Postgres
03Supabase Postgres
Reels · metric snapshots · RLS
→ Virality engine
04Virality engine
Velocity · acceleration · Viral Score
→ Auto-analyze gate
05Auto-analyze gate
Score & tier thresholds
→ LLM analysis
06LLM analysis
Zod-validated structured output
→ Analysis & ideas
07Analysis & ideas
Cached once per reel
→ Next.js app
08Next.js app
Dashboard · trends · ideas
- SQL migrations, with Row Level Security from the first
- 12
- API route handlers
- 20
- test files (Vitest)
- 17
- swappable provider interfaces — data, AI, billing
- 3
Viral Hunter tracks public Instagram Reels over time, ranks them with a Viral Score and uses an LLM to break down hooks, formats and retention triggers. Creators can save reels to a swipe file and generate their own version — script, shot list and caption ideas.
The problem
Creators spend hours scrolling for inspiration and usually find trends after they've peaked. Copying a reel also doesn't explain why it worked, so the lesson doesn't transfer.
My role
Solo founder-developer — product, architecture, data pipeline, AI prompts and schemas, UI, billing and deployment. I'm documenting the build in public on YouTube.
Technical approach
- Scheduled ingestion: a Vercel cron job triggers a server-side Apify pipeline with a provider fallback chain.
- Metric snapshots stored in Supabase Postgres; velocity, acceleration and the Viral Score are computed from successive snapshots.
- High-signal reels are auto-analysed behind score and tier gates to keep AI costs predictable, with one cached analysis per reel.
- Provider interfaces for data, AI and billing, so a vendor can be swapped without rewriting product logic.
Engineering decisions
Structured, not free-form, AI
Model responses are validated against Zod schemas before they reach the UI, so the app only renders well-formed analysis.
Cost-aware by design
Monthly per-user usage counters, de-duplication of in-flight analysis requests and AI usage logs keep spend proportional to value.
Security from the first migration
Row Level Security on user-facing tables, locked-down privileged database functions, a secret-protected cron endpoint and atomic job locking to prevent overlapping scrapes.
What's shipped
Implemented
- Breakout feed ranked by Viral Score
- AI reel analysis (hook, format, retention triggers)
- “Create my version” script and idea generation
- Saved reels and an ideas library
- Email and Google sign-in
- Free plan with monthly limits
- Paid Pro plan via Razorpay subscriptions
Status
Live at viralhunter.in with free sign-up and a paid Pro plan. It's an early-stage product — I don't publish user or revenue numbers until there's something meaningful to report.

