<?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: Zargham ALi</title>
    <description>The latest articles on DEV Community by Zargham ALi (@zargham5091).</description>
    <link>https://dev.to/zargham5091</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4269101%2F1cdba0ac-bde6-4070-8c90-218a14dd2045.jpg</url>
      <title>DEV Community: Zargham ALi</title>
      <link>https://dev.to/zargham5091</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zargham5091"/>
    <language>en</language>
    <item>
      <title>From Serverless to a $9 VPS: Lessons Learned Running a 12,800-Page Next.js Discovery Engine</title>
      <dc:creator>Zargham ALi</dc:creator>
      <pubDate>Fri, 27 Nov 2026 14:28:09 +0000</pubDate>
      <link>https://dev.to/zargham5091/from-serverless-to-a-9-vps-lessons-learned-running-a-12800-page-nextjs-discovery-engine-4a0b</link>
      <guid>https://dev.to/zargham5091/from-serverless-to-a-9-vps-lessons-learned-running-a-12800-page-nextjs-discovery-engine-4a0b</guid>
      <description>&lt;p&gt;Choosing what to watch tonight shouldn't take longer than watching an episode. Most discovery sites either cover a single format (anime-only or K-drama-only) or dump thousands of titles into broad genres like "Drama" where a cozy slice-of-life sits next to a dark psychological thriller.&lt;/p&gt;

&lt;p&gt;While building side projects, I noticed that most recommendation platforms organize content by genre, not by mood. Someone looking for a relaxing, feel-good watch often ends up scrolling through hundreds of unrelated titles.&lt;/p&gt;

&lt;p&gt;To solve that problem, I built WatchMoodly, a mood-based discovery platform that helps users find anime, movies, K-dramas, TV series, and manga based on how they want to feel rather than traditional genre categories.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mood-First Discovery:&lt;/strong&gt; Instead of relying on a single genre tag, titles are matched against multiple tonal and thematic signals (Happy, Emotional, Thriller, Chill, Romantic, Nostalgic, Dark, Adventure) so users can browse by how they actually feel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spoiler-Free Decision Guides:&lt;/strong&gt; Every enriched title page includes a mood rationale, episode/runtime commitment, a "Watch If / Skip If" breakdown, official trailers, and verified links to legal streaming platforms or book retailers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unified Catalog &amp;amp; Watchlist:&lt;/strong&gt; The platform currently serves more than 12,800 statically generated and ISR-powered pages, covering anime, movies, K-dramas, TV series, and manga backed by TMDB and AniList metadata.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend &amp;amp; SSR:&lt;/strong&gt; Next.js (App Router), TypeScript, Tailwind CSS, Framer Motion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database:&lt;/strong&gt; MongoDB Atlas (Mongoose)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ingestion &amp;amp; Enrichment:&lt;/strong&gt; Multi-source sync workers (TMDB + AniList) with smart DB page offsets so existing enriched records are never overwritten&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN &amp;amp; Security:&lt;/strong&gt; Cloudflare (Edge caching, Smart Tiered Cache, Bot Fight Mode, AI Crawl Control)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Biggest Lesson: Serverless vs. a $9 VPS for Programmatic SEO
&lt;/h2&gt;

&lt;p&gt;When you submit a 12,800-page sitemap to Google and Bing, crawlers and AI bots hit thousands of unique URLs fast.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Image Optimization Quotas:&lt;/strong&gt; On serverless free tiers, proxying thousands of external posters through Next.js Image Optimization burns through monthly transformation limits quickly. Since TMDB and AniList already serve resized CDN images (&lt;code&gt;/w342/&lt;/code&gt;, &lt;code&gt;/w1280/&lt;/code&gt;), setting &lt;code&gt;images: { unoptimized: true }&lt;/code&gt; and requesting exact CDN sizes fixed both quota burn and LCP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hidden &lt;code&gt;cookies()&lt;/code&gt; Dynamic Rendering:&lt;/strong&gt; Calling &lt;code&gt;cookies()&lt;/code&gt; inside a server component silently disables &lt;code&gt;export const revalidate = 86400&lt;/code&gt; ISR caching. Moving the navbar auth check behind a lightweight client-side hint cookie restored full static/ISR caching across every public detail page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moving to a $9/month VPS:&lt;/strong&gt; Even with optimizations, free serverless CPU/credit caps don't mix well with active multi-crawler indexing. Moving Next.js to a Contabo Cloud VPS running &lt;strong&gt;Node.js 22 + PM2 + Nginx&lt;/strong&gt; behind &lt;strong&gt;Cloudflare Origin SSL&lt;/strong&gt; dropped US East TTFB from &lt;code&gt;441ms&lt;/code&gt; to &lt;code&gt;364ms&lt;/code&gt; (95 Lighthouse score) while using less than 7% of server RAM — with zero monthly function limits.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try It Out
&lt;/h2&gt;

&lt;p&gt;If you want to browse by mood or check where a show is legally streaming, you can try it here: &lt;a href="https://www.watchmoodly.com" rel="noopener noreferrer"&gt;https://www.watchmoodly.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy to answer any questions about the Next.js App Router caching fixes, Cloudflare rules, or PM2 + Nginx setup in the comments!&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>nextjs</category>
      <category>sideprojects</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
