<?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: anil34anil</title>
    <description>The latest articles on DEV Community by anil34anil (@anil34anil).</description>
    <link>https://dev.to/anil34anil</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%2F4014218%2Fa3a3d667-4400-45ed-b175-04fc439efcbf.png</url>
      <title>DEV Community: anil34anil</title>
      <link>https://dev.to/anil34anil</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anil34anil"/>
    <language>en</language>
    <item>
      <title>How I Built a 6,000-Game Web Portal with Next.js 14 (and Kept Hosting Nearly Free)</title>
      <dc:creator>anil34anil</dc:creator>
      <pubDate>Fri, 03 Jul 2026 23:07:20 +0000</pubDate>
      <link>https://dev.to/anil34anil/how-i-built-a-6000-game-web-portal-with-nextjs-14-and-kept-hosting-nearly-free-2n3n</link>
      <guid>https://dev.to/anil34anil/how-i-built-a-6000-game-web-portal-with-nextjs-14-and-kept-hosting-nearly-free-2n3n</guid>
      <description>&lt;p&gt;I recently launched &lt;a href="https://www.oynava.com" rel="noopener noreferrer"&gt;OYNAVA&lt;/a&gt;, a free HTML5 game portal with 6,000+ games. Here's the architecture, the cost traps I hit in production, and how I fixed them. If you're building a content-heavy site, a few of these will probably bite you too.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Next.js 14 (App Router)&lt;/strong&gt; + TypeScript + Tailwind&lt;/li&gt;
&lt;li&gt;Game feeds: GameMonetize, GamePix, GameDistribution (merged + normalized into one catalog)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redis&lt;/strong&gt; for shared likes/plays counters&lt;/li&gt;
&lt;li&gt;Hosting: Netlify (after migrating off Vercel — more on that below)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lesson 1: dynamic SSR quietly eats your free tier
&lt;/h2&gt;

&lt;p&gt;My i18n read the locale from &lt;code&gt;headers()&lt;/code&gt;, which forced &lt;strong&gt;every&lt;/strong&gt; page to render dynamically (&lt;code&gt;ƒ&lt;/code&gt;). Every request hit the origin, and Vercel's "Fast Origin Transfer" quota (10 GB) filled in days.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; make content pages static/ISR with &lt;code&gt;export const revalidate = 3600&lt;/code&gt; + &lt;code&gt;generateStaticParams&lt;/code&gt;, and move locale to URL prefixes with client-side chrome translation. Origin transfer dropped to almost zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 2: the client-side N+1
&lt;/h2&gt;

&lt;p&gt;Every game card fetched its like-count individually — ~180 requests on a single homepage view. That maxed out serverless CPU.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; an 80 ms client-side batcher that collapses them into one &lt;code&gt;/api/likes/batch&lt;/code&gt; call. Then I went further and removed live counts from cards completely — they only matter on the detail page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 3: node-redis + a full database = silent failure
&lt;/h2&gt;

&lt;p&gt;Two things bit me at once:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Persistent TCP connections (node-redis) are fragile in serverless.&lt;/li&gt;
&lt;li&gt;My free 30 MB Redis silently filled up. With &lt;code&gt;noeviction&lt;/code&gt;, &lt;strong&gt;writes were rejected but reads looked fine&lt;/strong&gt; — so likes "worked" in dev and silently failed in prod.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; TTLs on cache keys (a translation cache was the culprit), plus an admin cleanup endpoint. Lesson: always give cache keys a TTL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Programmatic SEO at scale
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;~60 curated collection pages (&lt;code&gt;/en-iyi-araba-oyunlari&lt;/code&gt;, &lt;code&gt;/ates-ve-su-oyunlari&lt;/code&gt; …)&lt;/li&gt;
&lt;li&gt;~480 tag landing pages generated from game metadata, with a min-games threshold and &lt;code&gt;noindex&lt;/code&gt; for thin ones&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;VideoGame&lt;/code&gt; / &lt;code&gt;FAQPage&lt;/code&gt; / &lt;code&gt;ItemList&lt;/code&gt; JSON-LD everywhere&lt;/li&gt;
&lt;li&gt;One sitemap with ~7,000 URLs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lesson 4: don't advertise duplicate hreflang
&lt;/h2&gt;

&lt;p&gt;After I reverted server-side translation, all locale URLs served identical Turkish content — but I was still emitting hreflang for 8 languages. Google discovered &lt;strong&gt;8× duplicate URLs&lt;/strong&gt; and wasted crawl budget on them instead of indexing the real pages. Removing hreflang (canonical only) refocused the crawler.&lt;/p&gt;

&lt;h2&gt;
  
  
  PWA → Google Play
&lt;/h2&gt;

&lt;p&gt;The site is a PWA (manifest + service worker), packaged as a TWA with PWABuilder and shipped to Google Play. One codebase, and web deploys update the app instantly — no store release needed.&lt;/p&gt;




&lt;p&gt;If you want to poke at the result, it's live at &lt;strong&gt;&lt;a href="https://www.oynava.com" rel="noopener noreferrer"&gt;oynava.com&lt;/a&gt;&lt;/strong&gt;. Happy to answer questions about any of these in the comments. 🎮&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>seo</category>
      <category>sidehustle</category>
    </item>
  </channel>
</rss>
