<?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: Kevin Wang</title>
    <description>The latest articles on DEV Community by Kevin Wang (@kevin_wang_2523c220e0cf8d).</description>
    <link>https://dev.to/kevin_wang_2523c220e0cf8d</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%2F3181285%2F8fac0568-46df-4859-9bea-6508d8d0c97e.png</url>
      <title>DEV Community: Kevin Wang</title>
      <link>https://dev.to/kevin_wang_2523c220e0cf8d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kevin_wang_2523c220e0cf8d"/>
    <language>en</language>
    <item>
      <title>How I Serve 80 HTML5 Games, Auth, and Weekly Leaderboards for Under $1/Month on AWS + Cloudflare</title>
      <dc:creator>Kevin Wang</dc:creator>
      <pubDate>Sat, 28 Nov 2026 03:24:35 +0000</pubDate>
      <link>https://dev.to/kevin_wang_2523c220e0cf8d/how-i-serve-80-html5-games-auth-and-weekly-leaderboards-for-under-1month-on-aws-cloudflare-4776</link>
      <guid>https://dev.to/kevin_wang_2523c220e0cf8d/how-i-serve-80-html5-games-auth-and-weekly-leaderboards-for-under-1month-on-aws-cloudflare-4776</guid>
      <description>&lt;p&gt;Most browser game portals either drown players in heavy SDKs and third-party trackers or burn money on always-on servers. When I built &lt;strong&gt;&lt;a href="https://adsaiagentic.com/" rel="noopener noreferrer"&gt;Agentic Arcade&lt;/a&gt;&lt;/strong&gt; — 80 instant-play HTML5 games under 1 MB each — I wanted three things: sub-second boot times, &lt;strong&gt;0 Cumulative Layout Shift (3/3 on Google PageSpeed Agentic Browsing)&lt;/strong&gt;, and near-$0 idle cost.&lt;/p&gt;

&lt;p&gt;Here is the exact architecture running in production today.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Zero-Tracker Static Edge (CloudFront Free + Cloudflare Free Worker)
&lt;/h2&gt;

&lt;p&gt;All 80 games (79 single-file 11–20 KB HTML5 games + an 820 KB Three.js roguelite, &lt;strong&gt;&lt;a href="https://adsaiagentic.com/play/nova-drift-3d" rel="noopener noreferrer"&gt;NOVA DRIFT 3D&lt;/a&gt;&lt;/strong&gt;) and 102 pre-rendered SEO/GEO pages sit in S3 behind AWS CloudFront, fronted by a lightweight Cloudflare Free Worker at &lt;code&gt;adsaiagentic.com&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Static routes (&lt;code&gt;GET&lt;/code&gt;/&lt;code&gt;HEAD&lt;/code&gt;) go straight to CloudFront with a 3.7 KB CloudFront Function handling clean URL rewrites (&lt;code&gt;/play/*&lt;/code&gt;, &lt;code&gt;/genre/*&lt;/code&gt;, &lt;code&gt;/collections/*&lt;/code&gt;, &lt;code&gt;/atlas&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Allowlisted API paths (&lt;code&gt;/api/auth/*&lt;/code&gt;, &lt;code&gt;/api/me/*&lt;/code&gt;, &lt;code&gt;/api/leaderboard/*&lt;/code&gt;, &lt;code&gt;/api/vote&lt;/code&gt;, &lt;code&gt;/api/geo-telemetry&lt;/code&gt;) proxy to an AWS Singapore HTTP API + Node 22 Lambda.&lt;/li&gt;
&lt;li&gt;Staff moderation &amp;amp; analytics endpoints stay isolated on a separate origin and return &lt;code&gt;403&lt;/code&gt;/&lt;code&gt;405&lt;/code&gt; at the edge.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Progressive Identity (Zero Login Wall)
&lt;/h2&gt;

&lt;p&gt;Casual web gamers bounce if you force registration before play. Instead, identity upgrades progressively:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Guest Arcade Pass (Default):&lt;/strong&gt; Every visitor immediately gets a &lt;code&gt;localStorage&lt;/code&gt; pass tracking a deterministic UTC Daily Challenge, daily streak, favorites, personal bests, and an 80-game Passport with 6 mastery badges — plus direct &lt;strong&gt;&lt;code&gt;?beat=Handle:Score&lt;/code&gt; friend challenge links&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optional Cloud Member Sync:&lt;/strong&gt; Players who want cross-device sync or per-game Weekly Top-50 rankings sign up via AWS Cognito (Free Tier: 10,000 MAU), and their local guest pass merges idempotently into DynamoDB.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  3. Single-Partition-Key DynamoDB With Zero Table Scans
&lt;/h2&gt;

&lt;p&gt;Everything lives in one pay-per-request DynamoDB table (&lt;code&gt;pk&lt;/code&gt; only + &lt;code&gt;expiresAt&lt;/code&gt; TTL):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;member:v1:profile#&amp;lt;subId&amp;gt;&lt;/code&gt; — Cloud member profile &amp;amp; per-game personal bests (1 RCU read)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;member:v1:lb#&amp;lt;YYYY-Www&amp;gt;#&amp;lt;gameId&amp;gt;&lt;/code&gt; — Per-game Weekly Top 50 stored as a compact sorted JSON array with optimistic-concurrency &lt;code&gt;ver&lt;/code&gt; CAS and a 35-day TTL&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;member:v1:metrics#day#&amp;lt;YYYY-MM-DD&amp;gt;&lt;/code&gt; — Atomic &lt;code&gt;UpdateItem ADD&lt;/code&gt; daily rollups (95-day TTL) so the founder dashboard loads 30-day trends across all 80 games using two &lt;code&gt;BatchGetItem&lt;/code&gt; calls and zero scans.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Hitting 3/3 on PageSpeed Insights Agentic Browsing (0 CLS, 100 SEO)
&lt;/h2&gt;

&lt;p&gt;While auditing mobile performance on PageSpeed Insights, two subtle SPA traps showed up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;0.269 Mobile CLS:&lt;/strong&gt; Replacing server-prerendered HTML with a short &lt;code&gt;"Loading..."&lt;/code&gt; box during JS boot caused the footer to jump into the mobile viewport and get pushed back out 300 ms later. Preserving the SSR markup during boot, reserving &lt;code&gt;min-height: 100svh&lt;/code&gt; on &lt;code&gt;&amp;lt;main&amp;gt;&lt;/code&gt;, locking mobile genre chips to a single horizontally scrollable row, and switching Google Fonts to &lt;code&gt;display=optional&lt;/code&gt; dropped mobile CLS straight to &lt;strong&gt;&lt;code&gt;0&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ARIA Tree Conformance:&lt;/strong&gt; Swapping &lt;code&gt;&amp;lt;article role="button" tabindex="0"&amp;gt;&lt;/code&gt; game cards to native semantic &lt;code&gt;&amp;lt;a href="/play/..."&amp;gt;&lt;/code&gt; links fixed the accessibility tree audit and boosted crawlable internal links simultaneously.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Automated QA Across 32 Touch-First Games
&lt;/h2&gt;

&lt;p&gt;For the 32 original games in the &lt;strong&gt;&lt;a href="https://adsaiagentic.com/atlas" rel="noopener noreferrer"&gt;Arcade Atlas&lt;/a&gt;&lt;/strong&gt; collection, every build runs through an automated test suite that verifies puzzles (Sudoku, Nonogram, Box Pusher, Car Unblock, Tile Pairs) are solvable without guessing and simulates 60 seconds of random touch input per game to catch uncaught errors before deploy.&lt;/p&gt;

&lt;p&gt;If you want to poke at the live site or test a 2-minute game on mobile, try &lt;strong&gt;&lt;a href="https://adsaiagentic.com/" rel="noopener noreferrer"&gt;Agentic Arcade&lt;/a&gt;&lt;/strong&gt; (or jump straight into &lt;strong&gt;&lt;a href="https://adsaiagentic.com/play/nova-drift-3d" rel="noopener noreferrer"&gt;NOVA DRIFT 3D&lt;/a&gt;&lt;/strong&gt; / &lt;strong&gt;&lt;a href="https://adsaiagentic.com/collections/2-minute-break-games" rel="noopener noreferrer"&gt;2-Minute Break Games&lt;/a&gt;&lt;/strong&gt;) — I'd love feedback on both the games and the serverless architecture!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>aws</category>
      <category>gamedev</category>
      <category>cloudflare</category>
    </item>
  </channel>
</rss>
