Building a Twitter-like social media app, need advice on implementing home feed, and view count tracking.

I’m building a Twitter-like social media app using Next.js 15 and Supabase. Unlike Twitter, I’m sticking to a unified Home timeline that shows all global posts to everyone (discovery-focused). I'm ...

By · · 1 min read
Building a Twitter-like social media app, need advice on implementing home feed, and view count tracking.

Source: DEV Community

I’m building a Twitter-like social media app using Next.js 15 and Supabase. Unlike Twitter, I’m sticking to a unified Home timeline that shows all global posts to everyone (discovery-focused). I'm trying to avoid using expensive services like getStream, etc., to do this, for now. I'm stuck on how to implement the features mentioned in the title: The home feed: unlike Twitter, I'm using a unified home feed that shows all global posts to everyone (discovery-focused). I'm confused about what the discovery algorithm should be. I'm also using useSWRinfinite for infinite scroll, so how do I handle DOM bloat? Virtualisation, or just a "hard limit" at ~500 items to force a refresh? And instead of automatically adding posts to the feed, I want to do it periodically and only if the user wants to, as Twitter does by showing the "show x new posts" floating banner at the top of the feed and only adding new posts when I click it. How do I do this? View count tracking: Planning to use IntersectionObs

Related Posts

Similar Topics

#ai (163)#for (113)#learn (104)#programming (98)#javascript (82)#productivity (80)#tutorial (64)#artificial intelligence (25)#showdev (41)#data science (26)#opensource (42)#devops (34)#architecture (31)#instrument (15)#python (34)#react (30)#security (32)#data visualization (19)#language (27)#seo (19)

Trending on ShareHub

  1. Understanding Modern JavaScript Frameworks in 2026
    by Alex Chen · Feb 12, 2026 · 0 likes
  2. The System Design Primer
    by Sarah Kim · Feb 12, 2026 · 0 likes
  3. Just shipped my first open-source project!
    by Alex Chen · Feb 12, 2026 · 0 likes
  4. OpenAI Blog
    by Sarah Kim · Feb 12, 2026 · 0 likes
  5. Building Accessible Web Applications: A Practical Guide
    by Alex Chen · Feb 12, 2026 · 0 likes
  6. Rapper Lil Poppa dead at 25, days after releasing new music
    Rapper Lil Poppa dead at 25, days after releasing new music
    by Anonymous User · Feb 19, 2026 · 0 likes
  7. write-for-us
    by Volt Raven · Mar 7, 2026 · 0 likes
  8. Before the Coffee Gets Cold: Heartfelt Story of Time Travel and Second Chances
    Before the Coffee Gets Cold: Heartfelt Story of Time Travel and Second Chances
    by Anonymous User · Feb 12, 2026 · 0 likes
    #coffee gets cold #the #time travel
  9. Best DoorDash Promo Code Reddit Finds for Top Discounts
    Best DoorDash Promo Code Reddit Finds for Top Discounts
    by Anonymous User · Feb 12, 2026 · 0 likes
    #doordash #promo #reddit
  10. Premium SEO Services That Boost Rankings & Revenue | VirtualSEO.Expert
    by Anonymous User · Feb 12, 2026 · 0 likes
  11. NBC under fire for commentary about Team USA women's hockey team
    NBC under fire for commentary about Team USA women's hockey team
    by Anonymous User · Feb 18, 2026 · 0 likes
  12. Where to Watch The Nanny: Streaming and Online Viewing Options
    Where to Watch The Nanny: Streaming and Online Viewing Options
    by Anonymous User · Feb 12, 2026 · 0 likes
    #streaming #the nanny #where
  13. How Much Is Kindle Unlimited? Subscription Cost and Plan Details
    How Much Is Kindle Unlimited? Subscription Cost and Plan Details
    by Anonymous User · Feb 12, 2026 · 0 likes
    #kindle unlimited #subscription #unlimited
  14. Russian skater facing backlash for comment about Amber Glenn
    Russian skater facing backlash for comment about Amber Glenn
    by Anonymous User · Feb 18, 2026 · 0 likes
  15. Google News
    Google News
    by Anonymous User · Feb 18, 2026 · 0 likes

Latest on ShareHub

Browse Topics

#artificial intelligence (31561)#data science (24017)#ai (17041)#generative ai (15034)#crypto (15000)#machine learning (14680)#bitcoin (14245)#featured (13561)#news & insights (13064)#crypto news (11085)

Around the Network