Cumfiesta.24.06.16.ryan.reid.the.rise.of.the.cu... Apr 2026
@@index([trendScore(sort: Desc)]) @@index([contentType, category])
export default function TrendingFeed() const [items, setItems] = useState<TrendingItem[]>([]); const [loading, setLoading] = useState(false); const [page, setPage] = useState(0); const observerTarget = useRef(null);
enum ContentType VIDEO MEME ARTICLE TRAILER
score = math.log10(max(interactions, 1)) / ((hours_since_publish + 2) ** gravity) CumFiesta.24.06.16.Ryan.Reid.The.Rise.Of.The.Cu...
const trendingContent = await prisma.trendingContent.findMany( where: whereClause, orderBy: trendScore: 'desc' , take: parseInt(limit), skip: parseInt(offset), include: _count: select: userBookmarks: true
useEffect(() => fetchTrending(); , [page]);
res.json( success: true ); ); // components/TrendingFeed.tsx import useState, useEffect, useRef from 'react'; import motion from 'framer-motion'; import HeartIcon, ShareIcon, ChatBubbleLeftIcon from '@heroicons/react/24/outline'; import HeartIcon as HeartSolidIcon from '@heroicons/react/24/solid'; interface TrendingItem 'MEME'; @@index([trendScore(sort: Desc)]) @@index([contentType
createdAt DateTime @default(now()) updatedAt DateTime @updatedAt
# Total interactions interactions = content.views + (content.likes * 2) + (content.shares * 5) + (content.comments * 3)
# Gravity factor (newer content gets boost) gravity = 1.5 if hours_since_publish < 24 else 1.8 setItems] = useState<
enum Category MOVIES MUSIC VIRAL GAMING TV
# Reddit-style logarithmic hotness if hours_since_publish < 1: hours_since_publish = 1
// POST /api/trending/:id/interact router.post('/:id/interact', async (req, res) => const type = req.body; // 'like', 'share', 'view' const contentId = req.params.id;
// Time decay decayStartedAt DateTime @default(now())









