Menu

How I Built a "For You" Feed Ranking Algorithm in Flutter + Supabase
📰

How I Built a "For You" Feed Ranking Algorithm in Flutter + Supabase

DEV Community: flutter·Mohsin Abid·3 days ago
#q4XyWTEE
#devtoflutter#devto#dev#feed#creator
Long article (299 words) — no AI summary yet.
Reading 0:00
15s threshold

When I built SARAIKI STAR, my TikTok-style short-video app, the feed could not just be "newest first". With 140+ videos from a handful of creators, a naive feed repeats the same creator endlessly and buries new uploads. Here is the ranking I shipped.

The scoring formula

Every video gets a score in a Postgres function:

score = (likes*3 + comments*5 + shares*4 + saves*2 + views*0.05 + 15) / (age_hours + 2)^1.3

Comments weigh more than likes (they cost the viewer more effort), shares weigh almost as much, and the +15 constant gives brand-new videos a fair chance against old hits.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.