<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rahul Upadhyay</title>
    <description>The latest articles on DEV Community by Rahul Upadhyay (@rahul_upadhyay_90949812a3).</description>
    <link>https://dev.to/rahul_upadhyay_90949812a3</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3964484%2Fa3ca16f4-151f-404e-ba7f-5a3f50f56826.jpg</url>
      <title>DEV Community: Rahul Upadhyay</title>
      <link>https://dev.to/rahul_upadhyay_90949812a3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rahul_upadhyay_90949812a3"/>
    <language>en</language>
    <item>
      <title>I built an AI news app with Next.js, Supabase, and Gemini, here's how the pipeline works</title>
      <dc:creator>Rahul Upadhyay</dc:creator>
      <pubDate>Tue, 02 Jun 2026 11:19:52 +0000</pubDate>
      <link>https://dev.to/rahul_upadhyay_90949812a3/i-built-an-ai-news-app-with-nextjs-supabase-and-gemini-heres-how-the-pipeline-works-1ncm</link>
      <guid>https://dev.to/rahul_upadhyay_90949812a3/i-built-an-ai-news-app-with-nextjs-supabase-and-gemini-heres-how-the-pipeline-works-1ncm</guid>
      <description>&lt;p&gt;I was spending hours every week keeping up with AI news. So I built Kapyn (kapyn.app) — a mobile-first app that turns AI/tech news into 30-second swipeable summaries with an AI-powered "Why it matters" explainer.&lt;br&gt;
Here's how it works under the hood.&lt;/p&gt;

&lt;p&gt;The stack:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Next.js 14 (app router)&lt;/li&gt;
&lt;li&gt;Supabase (database + auth)&lt;/li&gt;
&lt;li&gt;Gemini API (summarization + "Why it matters" generation)&lt;/li&gt;
&lt;li&gt;Automated RSS ingestion pipeline&lt;/li&gt;
&lt;li&gt;Vercel (hosting + cron jobs)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;How the news pipeline works?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Kapyn has zero manual curation. Everything is automated.&lt;br&gt;
Every 4 hours, a Vercel Cron job triggers the ingestion pipeline. It pulls RSS feeds from a curated list of sources — Google AI Blog, OpenAI Blog, TechCrunch AI, HuggingFace, The Decoder, Simon Willison's blog, The Verge AI, and Wired AI. Product Hunt featured products get fetched separately, once a day.&lt;/p&gt;

&lt;p&gt;Each new article goes through three steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Dedup and store. The pipeline checks the Supabase database for URL matches. If the article already exists, it's skipped. New articles get stored with their metadata — title, source, publish date, and URL.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Image extraction. For card thumbnails, I extract og:image from the source URL. If that fails, it falls back to RSS media tags. If that also fails, it renders a category-colored gradient so the feed never looks broken.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI summarization. This is where it gets interesting. Each article is sent to Google's Gemini API to generate two things: a 60-80 word summary (optimized for a swipeable card you can read in 30 seconds), and a "Why it matters" explanation that puts the story in context. The prompt is tuned to avoid generic filler — no "in today's rapidly evolving AI landscape." Just the actual significance.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For reliability, I built a fallback chain: Gemini API (primary) → OpenRouter's free Gemini endpoint (backup) → truncated raw content (last resort). The app has never gone empty because of an API outage.&lt;br&gt;
The cost: $0. Gemini's free tier gives 1,000 requests/day. With ~30-50 new articles per cycle across 6 daily runs, I'm well under the limit. Supabase free tier handles the database. Vercel free tier handles hosting and crons. The entire backend runs for nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I'd do differently&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Prompt tuning took longer than building the pipeline. My first Gemini prompts produced summaries that all sounded the same, generic, safe, boring. It took about 15-20 iterations to get summaries that actually felt like a human editor wrote them. If I started over, I'd invest in prompt evaluation tooling from day one instead of eyeballing quality.&lt;br&gt;
Also, I curated RSS sources manually at launch. That doesn't scale. I'm now experimenting with Exa AI's search API as a supplementary source to catch stories my RSS list misses, but keeping it as a layer on top rather than a replacement, since RSS is free and never goes down.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>nextjs</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
