DEV Community

duanrh
duanrh

Posted on

Building a 311-Page Static Mobile Puzzle Guide with Node.js, Lite YouTube Embeds, and Zero Frameworks

Last week I shipped Jelly Busters Level Guide, a static mobile game walkthrough site covering 311 stages of Moon Active's Jelly Busters (including every level from 16 through 150 and late-game boards up to Level 666).

Instead of spinning up Next.js or WordPress, I kept the entire generator to plain Node.js ESM modules, one stylesheet, and one vanilla JS file. Here are four small engineering choices that made the biggest difference in speed and maintainability.

1. Compiling 330+ HTML pages in under 200ms

Everything lives in two JSON data files (levels.json and videos.json). A single build.mjs script validates every entry before writing a single HTML file:

  • Rejects missing primary video IDs or duplicate level numbers
  • Verifies release builds always set an https:// origin and never leak noindex
  • Hashes site.css and site.js with SHA-256 to append a ?v=<8-char-hash> query string automatically

Because there is no React hydration or bundler pipeline, rebuilding all 311 level pages, the directory, sitemaps, and long-form guides takes under a quarter of a second.

2. Click-to-load YouTube facades instead of raw iframes

Embedding a standard YouTube iframe directly pulls hundreds of kilobytes of third-party scripts before the user ever taps play. Every level page renders a lightweight static thumbnail button (.yt-facade) with the video duration and channel attribution, and only mounts a youtube-nocookie.com iframe on click.

If a stage has both a primary and a backup playthrough, a small tab bar swaps the thumbnail or active player without reloading the page.

3. Catching bad data with Pillow contact sheets

YouTube search results for mobile puzzle levels are full of multi-level compilations (like "Level 127 and 128") or unrelated games with similar names. Before adding any batch of levels to the How to Play guide or the Hard & Super Hard levels breakdown, a small Python script pulls hqdefault, hq1, hq2, and hq3 frames and tiles six levels per contact sheet so I can visually confirm the exact pixel board, colour palette, and Hard banner in a few minutes.

The open reference notes and CSV index for the dataset are also tracked on GitHub.

4. A small Windows zip pitfall on Cloudflare Pages

One gotcha worth sharing if you deploy static zips to Cloudflare Pages from Windows: PowerShell's Compress-Archive writes backslash separators (\) into zip entries, which causes nested routes like /level/117/index.html to return 404 after extraction on Linux. Packing the release zip with Python's zipfile using POSIX forward slashes (/) and asserting zero backslashes in a pre-deploy check fixed it permanently.

If you are building content-heavy niche guides or reference tools, skipping the framework layer and spending that time on fast HTML, clean structured data, and real visual checks is hard to beat.

Top comments (0)