DEV Community

peter_anderson33
peter_anderson33

Posted on • Edited on

I Built a Twitter Viewer in 3 Weeks with Next.js 14 - Here's What I Learned#privacy#opensource

The Problem

Twitter's mandatory login broke a simple use case: quickly checking a tweet without creating yet another account. As a researcher, I got tired of hitting login walls.

So I built Twitter Viewer(twitterwebviewer.com) - view any public profile, search tweets, download videos. No account needed.

Tech Stack

Next.js 14 + Vercel Edge + Redis

Why this combo?

  • Server Components for instant SEO
  • Edge runtime = <100ms globally
  • Redis caching solved the biggest problem...

The Hard Problem: Rate Limits

Twitter's guest API allows ~500 requests/hour. With 100+ users, that's instant death.

Solution: Aggressive caching + deduplication

// Cache for 10 minutes
const cached = await redis.get(`profile:${username}`);
if (cached) return cached;

const fresh = await fetchTwitterAPI(username);
await redis.set(`profile:${username}`, fresh, 'EX', 600);
return fresh;
Enter fullscreen mode Exit fullscreen mode

Result: 85% cache hit rate. API calls dropped from disaster to manageable.

Results (30 Days)
• 704 users (~23 DAU)
• 12-minute avg session (people actually use it!)
• 67.6% engagement rate
• Zero paid marketing
The 12-minute session time shocked me. Turns out researchers and journalists really need this.

Lessons Learned

  1. Start with caching Don't wait until you hit rate limits. Design for it day one.
  2. Ship fast, iterate MVP in 3 weeks. Added features based on real usage, not assumptions.
  3. Privacy sells "No tracking" became a key differentiator. Users actually care.
  4. Vercel bill surprise Tried hosting videos initially. Bill hit $200 in 3 days. Now just proxy direct links.

What's Next
• Thread unroller (most requested)
• Browser extension
• Possibly open-sourcing
Questions

  1. How would you handle Twitter's ToS concerns?
  2. Should I open-source it or keep it proprietary?
  3. Best practices for API-heavy Next.js apps?

Try it: https://twitterwebviewer.com
Let me know your thoughts! Thank you in advance!

Top comments (3)

Collapse
 
peter_anderson33 profile image
peter_anderson33

Re:On open-sourcing: I’m leaning toward it, but with a twist—release the core (caching, basic search) as open source, but keep the video parsing and advanced API logic proprietary. That way, I keep a moat but build trust. Would that balance work for you all? Or would you prefer full transparency even if it means more clones?

Collapse
 
peter_anderson33 profile image
peter_anderson33

Want to share a quick behind-the-scenes pain point I didn’t mention in the post: When I first launched, Vercel’s bill wasn’t just $200—they actually flagged the account for “unusual bandwidth usage” (video hosting) and threatened to suspend it. That’s why we switched to proxy links—scary moment for a solo founder!

Collapse
 
peter_anderson33 profile image
peter_anderson33

Just keeping this thread from sinking. Would love to hear from you all!